Another ETH library ( managed by Noku.io )
Function: generateEthTransaction
Description: Generate an ETH transaction
Arguments:
-
from {string}
: the sender address -
to {string}
to the receiver address -
value {string}
value hexadecimal transaction value (in WEI), -
token {Token}
token if defined the token to transfer -
gasPrice {number|string}
gasPrice hexadecimal gasPrice (in WEI) -
gasLimit {*}
gasLimit hexadecimal gasLimit (in WEI) -
data {string}
data data field in transaction -
chainId {number}
chainId the chain id -
privkey {string}
privkey the sender private key -
nonce {string}
nonce the transaction nonce (latest + 1) -
note {string}
note
Returns a string of the signed transaction
A token object @typedef {{address: string, decimals: number, erc20: bool, erc721: bool}} Token
Function: generateMintCustomToken
Description: Generate mint transaction
Arguments:
-
token {Token}
: the token object -
to {string}
: to the receiver address -
value {string}
: hexadecimal transaction value (in WEI), -
gasPrice {number|string}
: hexadecimal gasPrice (in WEI) -
gasLimit {*}
: hexadecimal gasLimit (in WEI) -
chainId {number}
: chainId the chain id -
privkey {string}
: the sender private key -
nonce {string}
: the transaction nonce (latest + 1)
Returns a string of the signed transaction
A token object @typedef {{address: string, decimals: number, erc20: bool, erc721: bool}} Token
Function: generateBurnCustomToken
Description: Generate burn transaction
Arguments:
-
token {Token}
: the token object -
to {string}
: to the receiver address -
value {string}
: hexadecimal transaction value (in WEI), -
gasPrice {number|string}
: hexadecimal gasPrice (in WEI) -
gasLimit {*}
: hexadecimal gasLimit (in WEI) -
chainId {number}
: chainId the chain id -
privkey {string}
: the sender private key -
nonce {string}
: the transaction nonce (latest + 1)
Returns a string of the signed transaction