Smart Contract Overview
Last updated
Last updated
As a cheap, fast, and always functional blockchain (24/7 uptime 5 years running!), the AirDAO Network is an ideal place to develop decentralized applications (dApps) to power the Internet of Value. The following Gitbook documents the specifics of building on AirDAO complete with an overview of deploying smart contracts, using token faucets on test net, and leveraging the latest Dev tools!
AirDAO’s EVM compatibility with Ethereum (through the Constantinople Upgrade) means smart contract deployment is extremely similar. The AirDAO RPC as such is Ethereum compatible and supports all Ethereum JSON-RPC methods. This means that developers on AirDAO can leverage all Ethereum JSON-RPC methods without authentication.
Note: Upgrades
Access to different AirDAO Networks is outlined as follows:
MainNet
RPC Url:
Chain ID: 16718
TestNet
RPC Url:
Chain ID: 22040
RPC Url:
DevNet
RPC Url:
Chain ID: 30746
RPC Url:
With supporting Developer tools and Software Development Kits (SDKs):
The aforementioned tools and developer kits are equally compatible with AirDAO as they are with Ethereum. Importantly, developers on AirDAO will pay Gas fees in $AMB and route transactions through an Apollo Node, as opposed to the Ethereum equivalent.
If you need to access TestNet or DevNet $AMB to test out an application, the following token faucets are readily available:
To access the faucets a user must provide an address and then input the amount of testnet or devnet tokens needed.
To verify a contract that you have deployed the following steps should be following:
Open your smart contract in the Ambrosus Explorer.
Visit the contract page by clicking the ‘contract’ tab and click the verify button.
Provide the Contract Artifact file. An example location for a Hardhat project: /artifacts/build-info/123abc456def789abc123def123abc45.json
Confirm Contract verification.
In the event of a reverted transaction with no reason given, you may wish to troubleshoot what exactly went wrong. The following steps can be taken:
Use a static call (eth_call) method with the same parameters as the transaction you want to send. (An example using ethers.js is: yourContract.callStatic.yourMethodName(arg1, arg2, {from: sender, gasLimit: 0x1337, blockTag: 'latest'})
After using a static call method You probably will get the reverted reason but in hex format. An example would be: Reverted 0x08c379a0123abc123abc123abc
Note: Currently, the AirDAO RPC doesn't return the ‘revert reason’ for the estimateGas method. This is a work in progress by AirDAO Core developers.
In line , AirDAO developers must be attentive to using the correct RPC endpoint and supported EVM version (up through Constantinople on AirDAO). As noted in the , the following frameworks can be used to deploy smart contracts on AirDAO:
.
.
..
.
.
.
.
.
Testnet:
Devnet:
The AirDAO Explorer - - supports smart contract verification. All verified contracts have their source code and ABI displayed on the contract page with the user able to call contract methods directly from the explorer.
An alternative to this approach is to use the Sourcify API: .
This Hex format can then be decoded using an online hex to string converter, or a code snippet as the following: