πmint
Last updated
npm install @nest25/evm-chains-lib
OR
yarn add @nest25/evm-chains-lib// import the Nest SDK
const { ERC20 } = require('@nest25/evm-chains-lib');
// create a new instance of the ERC20 class
const erc20 = new ERC20();
// define the main function
const main = async () => {
// call the mint function
const receipt = await erc20.mint(
'klay',
'0x3c40d011838f0ecd5b601104eeb5e27172c92231',
'0x13CC66D6611bb754647Bf2977881eA0e35A48FB4',
'100',
'your-private-key',
);
// print the receipt
console.log({ receipt });
};
// call the main function
main(); {
receipt: {
type: 2,
chainId: 1001,
nonce: 237,
maxPriorityFeePerGas: BigNumber { _hex: '0x3b9aca00', _isBigNumber: true },
maxFeePerGas: BigNumber { _hex: '0x0bdfd63e00', _isBigNumber: true },
gasPrice: null,
gasLimit: BigNumber { _hex: '0xa822', _isBigNumber: true },
to: '0x3c40d011838F0EcD5B601104EEb5E27172C92231',
value: BigNumber { _hex: '0x00', _isBigNumber: true },
data: '0x40c10f1900000000000000000000000013cc66d6611bb754647bf2977881ea0e35a48fb40000000000000000000000000000000000000000000000000000000000000064',
accessList: [],
hash: '0xadbd2e3e340fa378b87b8d40225c3e9e17daf0f3bb86e2316398549504759562',
v: 1,
r: '0xe377d367c0f892d67884b1134ff5c35dfb9e9ecec15d2409843c560a19a9168c',
s: '0x1477b80e71f3fda2096006fcffd0bb48c7bbe455c73ba8a9f7e8bbaca84c2478',
from: '0xE668C72D4C67236A712Ce69A91C74358586f31ed',
wait: [Function (anonymous)]
}
}