ERC20 Standard
You can utilize these features of the SDK if your contract implements the ERC20 standard.
Get Token Metadata
- React
- Javascript
- Python
- Go
- Unity
const token = await contract.erc20.get();
This snippet is for v3 of the SDK. Learn how to upgrade.
View in React SDK Documentationconst token = await contract.erc20.get();
This snippet is for v3 of the SDK. Learn how to upgrade.
View in Javascript SDK DocumentationThis feature is missing a code snippet or might not be supported yet.
Check the Python SDK documentation for more information.
Reach out on Discord for further assistance!
View Python SDK DocumentationThis feature is missing a code snippet or might not be supported yet.
Check the Go SDK documentation for more information.
Reach out on Discord for further assistance!
View Go SDK Documentationvar token = await contract.ERC20.Get();
Total Supply
Get how much supply has been minted
- React
- Javascript
- Python
- Go
- Unity
const balance = await contract.erc20.totalSupply();
This snippet is for v3 of the SDK. Learn how to upgrade.
View in React SDK Documentationconst balance = await contract.erc20.totalSupply();
This snippet is for v3 of the SDK. Learn how to upgrade.
View in Javascript SDK DocumentationThis feature is missing a code snippet or might not be supported yet.
Check the Python SDK documentation for more information.
Reach out on Discord for further assistance!
View Python SDK DocumentationThis feature is missing a code snippet or might not be supported yet.
Check the Go SDK documentation for more information.
Reach out on Discord for further assistance!
View Go SDK Documentationvar balance = await contract.ERC20.TotalSupply();
View Token Balance
Get the balance of this token for the given address.
- React
- Javascript
- Python
- Go
- Unity
// Address of the wallet to check token balance
const walletAddress = "{{wallet_address}}";
const balance = await contract.erc20.balanceOf(walletAddress);
This snippet is for v3 of the SDK. Learn how to upgrade.
View in React SDK Documentation// Address of the wallet to check token balance
const walletAddress = "{{wallet_address}}";
const balance = await contract.erc20.balanceOf(walletAddress);
This snippet is for v3 of the SDK. Learn how to upgrade.
View in Javascript SDK DocumentationThis feature is missing a code snippet or might not be supported yet.
Check the Python SDK documentation for more information.
Reach out on Discord for further assistance!
View Python SDK DocumentationThis feature is missing a code snippet or might not be supported yet.
Check the Go SDK documentation for more information.
Reach out on Discord for further assistance!
View Go SDK Documentation// Address of the wallet to check token balance
var walletAddress = "{{wallet_address}}";
var balance = await contract.ERC20.BalanceOf(walletAddress);
Transfer
Transfer tokens from one wallet to another
- React
- Javascript
- Python
- Go
- Unity
// Address of the wallet you want to send the tokens to
const toAddress = "0x...";
// The amount of tokens you want to send
const amount = 0.1;
await contract.erc20.transfer(toAddress, amount);
This snippet is for v3 of the SDK. Learn how to upgrade.
View in React SDK Documentation// Address of the wallet you want to send the tokens to
const toAddress = "0x...";
// The amount of tokens you want to send
const amount = 0.1;
await contract.erc20.transfer(toAddress, amount);
This snippet is for v3 of the SDK. Learn how to upgrade.
View in Javascript SDK DocumentationThis feature is missing a code snippet or might not be supported yet.
Check the Python SDK documentation for more information.
Reach out on Discord for further assistance!
View Python SDK DocumentationThis feature is missing a code snippet or might not be supported yet.
Check the Go SDK documentation for more information.
Reach out on Discord for further assistance!
View Go SDK Documentation// Address of the wallet you want to send the tokens to
var toAddress = "0x...";
// The amount of tokens you want to send
var amount = "0.1";
await contract.ERC20.Transfer(toAddress, amount);
Batch Transfer
Transfer tokens from the connected wallet to many wallets in one transaction.
- React
- Javascript
- Python
- Go
- Unity
This feature is missing a code snippet or might not be supported yet.
Check the React SDK documentation for more information.
Reach out on Discord for further assistance!
View React SDK DocumentationThis feature is missing a code snippet or might not be supported yet.
Check the Javascript SDK documentation for more information.
Reach out on Discord for further assistance!
View Javascript SDK DocumentationThis feature is missing a code snippet or might not be supported yet.
Check the Python SDK documentation for more information.
Reach out on Discord for further assistance!
View Python SDK DocumentationThis feature is missing a code snippet or might not be supported yet.
Check the Go SDK documentation for more information.
Reach out on Discord for further assistance!
View Go SDK DocumentationThis feature is missing a code snippet or might not be supported yet.
Check the Unity SDK documentation for more information.
Reach out on Discord for further assistance!
View Unity SDK DocumentationToken Allowance
Allowance refers to the number of tokens that a wallet is allowed to transfer on behalf of another wallet.
Grant Allowance
Allows the specified spender
wallet to transfer the given amount
of tokens to another wallet
- React
- Javascript
- Python
- Go
- Unity
// Address of the wallet to allow transfers from
const spenderAddress = "0x...";
// The number of tokens to give as allowance
const amount = 100
await contract.erc20.setAllowance(spenderAddress, amount);
This snippet is for v3 of the SDK. Learn how to upgrade.
View in React SDK Documentation// Address of the wallet to allow transfers from
const spenderAddress = "0x...";
// The number of tokens to give as allowance
const amount = 100
await contract.erc20.setAllowance(spenderAddress, amount);
This snippet is for v3 of the SDK. Learn how to upgrade.
View in Javascript SDK DocumentationThis feature is missing a code snippet or might not be supported yet.
Check the Python SDK documentation for more information.
Reach out on Discord for further assistance!
View Python SDK DocumentationThis feature is missing a code snippet or might not be supported yet.
Check the Go SDK documentation for more information.
Reach out on Discord for further assistance!
View Go SDK Documentation// Address of the wallet to allow transfers from
var spenderAddress = "0x...";
// The number of tokens to give as allowance
var amount = "100";
await contract.ERC20.SetAllowance(spenderAddress, amount);
View Token Allowance
Get the allowance of one wallet over another wallet's funds - the allowance of a different address for a token is the amount of tokens that the wallet is allowed to spend on behalf of the specified wallet.
- React
- Javascript
- Python
- Go
- Unity
// Address of the wallet who owns the funds
const owner = "{{wallet_address}}";
// Address of the wallet to check token allowance
const spender = "0x...";
const allowance = await contract.erc20.allowanceOf(owner, spender);
This snippet is for v3 of the SDK. Learn how to upgrade.
View in React SDK Documentation// Address of the wallet who owns the funds
const owner = "{{wallet_address}}";
// Address of the wallet to check token allowance
const spender = "0x...";
const allowance = await contract.erc20.allowanceOf(owner, spender);
This snippet is for v3 of the SDK. Learn how to upgrade.
View in Javascript SDK DocumentationThis feature is missing a code snippet or might not be supported yet.
Check the Python SDK documentation for more information.
Reach out on Discord for further assistance!
View Python SDK DocumentationThis feature is missing a code snippet or might not be supported yet.
Check the Go SDK documentation for more information.
Reach out on Discord for further assistance!
View Go SDK Documentation// Address of the wallet who owns the funds
var owner = "{{wallet_address}}";
// Address of the wallet to check token allowance
var spender = "0x...";
var allowance = await contract.ERC20.AllowanceOf(owner, spender);