βοΈcreateStake
Last updated
npm install @nest25/tokenomics-lib
OR
yarn add @nest25/tokenomics-lib// import Nest SDK library
const { staking } = require('@nest25/tokenomics-lib');
// private key of the account you want to use
const TEST_PRIVATE_KEY = 'your-private-key';
// create a new instance of staking
const Staking = new staking();
async function main() {
// create a new stake
const result = await Staking.createStake('1', '100', false, TEST_PRIVATE_KEY);
// print the result
console.log(result);
}
main(); {
type: 2,
chainId: 8888,
nonce: 71,
maxPriorityFeePerGas: BigNumber { _hex: '0x59682f00', _isBigNumber: true },
maxFeePerGas: BigNumber { _hex: '0xd09dc300', _isBigNumber: true },
gasPrice: null,
gasLimit: BigNumber { _hex: '0x03e562', _isBigNumber: true },
to: '0x077e4F1496693B7c45128c436eF933ccaFe6d291',
value: BigNumber { _hex: '0x00', _isBigNumber: true },
data: '0x012cae390000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000000',
accessList: [],
hash: '0x87fe62ca7a46c3bf264857c7073ae5d589ac15b237f9198023befab0b76540d9',
v: 1,
r: '0x6351d9d8fd124e736e1bca8142b6cd867dfa2ccfe33d284666eed512176807aa',
s: '0x692c6c0f54976975f5159d420b5abc0ba28af70e21b457c1ba0db9af4968c488',
from: '0x5712d28795106f0105C01e99A708d018C1d70E52',
confirmations: 0,
wait: [Function (anonymous)]
}