Test your contracts by creating your custom code snippets. Web3 1.X.X ready to be used.
- Paste the address of the contract you want to try.
- Choose a name for the variable.
- If the contract is upgradeable by using the proxy pattern, select the checkbox.
- Code.
-
Get the name of a contract:
async function main() { const name = await contract.methods.name().call() return name }
-
Get NFTs owners:
async function main() { const tokenIds = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] const owners = [] for (let i = 0; i < tokenIds.length; i++) { const owner = await contract.methods.ownerOf(i).call() owners.push(owner) } return owners }
-
Transfer tokens:
async function main() { const to = '0x...' const value = 1e18 const txHash = await contract.methods.transfer(to, value).send() return txHash }
-
Get ETH balance:
async function main() { const user = '0x..' const ethBalance = await web3.eth.getBalance(user) return ethBalance }
-
Yes, the snippet runs in the browser.
-
So far, the ones detected by topics as:
-
Event
Upgrade(address,bytes)
=0xe74baeef5988edac1159d9177ca52f0f3d68f624a1996f77467eb3ebfb316537
. -
Event
Upgraded(address)
:0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b
. -
Implementation made by OpenZeppelin. Searching for the storage slot
0x7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c3
-
-
Every RCP call is made to the network selected in your provider.
-
I 've tested it with a few. Also mobile. If you have a wallet and it is not supported, please let me know and I will add it.
-
Yes! Contracts and code are stored at localstorage if any.
-
Yes! please, It will be awesome.
- Share code snippets by hosting them on IPFS