Moralis is a powerful Web3 framework for building decentralized apps (dapps). Moralis supports many chains both mainnets and testnets. That's impressive! Ethereum (and other EVM compatible chains and tokens), polygon, binance smart and now avalanche and fantom!! Rad! You can use moralis to build web3 apps quickly. By the way, Moralis has super good documentation, this blog post is just my personal notes. You really don't need it. But you can read it like a summary, initial walk through, guided tour. The moralis documentation is excellente.
Web3 dev platform. Great for creating dapps. Moralis API handles all the common tasks. Moralis projects are organized under email accounts, then each project has its own server (select net to be mainnet testnet ). Once a server is created you will get the API info: server URL app id and secrets.
01 In moralis dashboard initialize a server with your desired blockchain. Use testnet for tutorials and education purpose. Grab the server API key. Launch Moralis Server Initialize SDK in your app.
02 in your app.js or main.js first import moralis then initialize your moralis variables
03 All user info instantly in Moralis Server Database Tokens, MATIC, NFT Balances and Transaction once user logs in.
The server will automatically go to sleep after a period of non use.
Web3 APIs by Moralis : inspect the API endpoints in the admin panel. You can preview sokme of the functionalities and see what values are received as a part of the request. Moralis APIs : can retrieve all transactions in EVM compatible chains that are supported, also Solana. Retrieve all tokens.
It also provides some building blocks and really good looking UI for building DEX (this functionality is limited in the USA but is super useful in places where DEX's are allowed). Ivan talks about the potentially to charge referral fees. Do your own research, know your regulations. This is not advice, not professional advice, not production/commercial used. At your own risk. Crypto is very risky.
On Moralis API page/dashboard, we can see all the GET and POST methods available.
Example Solana API on
Solana API
GET /dateToBlock Gets the closest block of the provided date
GET /block/(block_number_or_hash} Gets block contents by block hash
GET {address}/logs Gets address logs
GET /block/block_number_or_hash)/nft/transfers Gets NFT transfers by bomber or block hash ?
GET /transaction/(transaction_hash} Get transaction details by transaction hash
POST
POST/address)/eventsaddress)/function
Gets events by topic …
Moralis functionalities. Moralis can get price of token. Smart contract events automatically synced to moralis database.
Core functionality of a decentralized app [pro, paid members only] What does a dapp need? Core functionalities of a dApp. dapp functionality and API. [pro] https://ml.learn-to-code.co/skillView.html?skill=6s5vjOJHbl4mq0QyejOD
Moralis new release
What’s Moralis nitro
Supposedly according the newsletter. Coming soon. Not yet available
🚀 10x faster user sync
🚀 10x faster smart contract sync
🚀 10x more robust dApps
Moralis has a JavaScript course for beginners to JavaScript programming and web3. But it has a price tag $2000. The founder Ivan founded the course, and he is an awesome guy. He tweets about this Js course, Moralis, and he seems to be a crypto bull.
Moralis SDK
Moralis JavaScript SDK: v2. "This Node.js library will feature integrations for new Moralis 2.0 products, starting with our Auth API, EVM API, and Solana API.
Moralis Solana API
balance
getSPL
getNFT
getPortfolio gets all three at the same time
It's possible to use Moralis and Serverless cloud functions to create complex web3 apps.
A word on going live: WARNING and reminder our tutorials, codes and contents are not for production use. While you can go live, please use only testnet, throw-away wallet, wallet that contains no real tokens.
When developing on web3, you can test using a test node in one of the ethereum test networks, or a ganache local node, or a free hosted node provided by cloud flare. Blockchain, web3 and crypto applications must be thoroughly tested, using the industry best practice, and being audited and monitored regularly.
Hackers often target these applications. A reminder: warning our code base does not support production usage, does not support live, commercial usage. Our codes have not being tested in live/production/deployed environments. They cannot be used on mainnet. We are not liable for any costs, damages, losses. Please read our full disclaimer, terms of usage.
You have worked with different chains such as mainnet, testnet, or Ganache (Ganache is your own local development chain).
It must be hosted locally on your computer or publicly on a server like Netlify.
The easiest method is with the "Live Server" extension for Visual Studio Code.
You can also use Python's built-in web server.
No comments:
Post a Comment