ERC-20 Tokens
An ERC20 token must implement the interface IERC20
in IERC20.sol. This is a template contract ERC20Token.template. Users just need to fill in _name
, _symbol
, _decimals
and _totalSupply
according to their own requirements:
Then users can use Remix IDE and Metamask to compile and deploy the ERC20 contract to BizNet.
Interact with Contract with Web3 and NodeJS.
Connect to BizNet's public RPC endpoint
Create a Wallet
Output:
Recover a Wallet
Check Balance
Output:
The balance will be bumped by e18 for BOA.
Create Transaction
Parameters
Object - The transaction object to send:
from - String|Number: The address for the sending account. Uses the web3.eth.defaultAccount property, if not specified. Or an address or index of a local wallet in web3.eth.accounts.wallet.
to - String: (optional) The destination address of the message, left undefined for a contract-creation transaction.
value - Number|String|BN|BigNumber: (optional) The value transferred for the transaction in wei, also the endowment if it’s a contract-creation transaction.
gas - Number: (optional, default: To-Be-Determined) The amount of gas to use for the transaction (unused gas is refunded).
gasPrice - Number|String|BN|BigNumber: (optional) The price of gas for this transaction in wei, defaults to web3.eth.gasPrice.
data - String: (optional) Either a ABI byte string containing the data of the function call on a contract, or in the case of a contract-creation transaction the initialization code.
nonce - Number: (optional) Integer of a nonce. This allows overwriting your own pending transactions that use the same nonce.
Last updated