eth4you
v2.0.3
Published
Function: `generateEthTransaction`
Downloads
550
Readme
Another ETH library ( managed by Noku.io )
Function: generateEthTransaction
Description: Generate an ETH transaction
Arguments:
from {string}
: the sender addressto {string}
to the receiver addressvalue {string}
value hexadecimal transaction value (in WEI),token {Token}
token if defined the token to transfergasPrice {number|string}
gasPrice hexadecimal gasPrice (in WEI)gasLimit {*}
gasLimit hexadecimal gasLimit (in WEI)data {string}
data data field in transactionchainId {number}
chainId the chain idprivkey {string}
privkey the sender private keynonce {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 objectto {string}
: to the receiver addressvalue {string}
: hexadecimal transaction value (in WEI),gasPrice {number|string}
: hexadecimal gasPrice (in WEI)gasLimit {*}
: hexadecimal gasLimit (in WEI)chainId {number}
: chainId the chain idprivkey {string}
: the sender private keynonce {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 objectto {string}
: to the receiver addressvalue {string}
: hexadecimal transaction value (in WEI),gasPrice {number|string}
: hexadecimal gasPrice (in WEI)gasLimit {*}
: hexadecimal gasLimit (in WEI)chainId {number}
: chainId the chain idprivkey {string}
: the sender private keynonce {string}
: the transaction nonce (latest + 1)
Returns a string of the signed transaction