πbuyNFT
Last updated
npm install @nest25/evm-chains-lib
OR
yarn add @nest25/evm-chains-libconst {NftMarketPlace} = require('@nest25/evm-chains-lib')
// create instance of SOULBOUND
const nftMarketPlace = new NftMarketPlace();
const privateKey = "your private key here"
// nft contract address
let nftContract = '0xaa223c2379daf21526925a07fe466fad7269103a';
const main = async () => {
// buy nft with klay
const contract = await nftMarketPlace.buyNFT(
'klay',
privateKey,
'1',
'10',
nftContract
);
// print result
console.log(contract);
}
main(){
receipt: {
type: 2,
chainId: 1001,
nonce: 247,
maxPriorityFeePerGas: BigNumber { _hex: '0x3b9aca00', _isBigNumber: true },
maxFeePerGas: BigNumber { _hex: '0x0bdfd63e00', _isBigNumber: true },
gasPrice: null,
gasLimit: BigNumber { _hex: '0x5208', _isBigNumber: true },
to: '0x3D5Cc05B5419CcD3c1bD510ab026C76F42D20871',
value: BigNumber { _hex: '0x8ac7230489e80000', _isBigNumber: true },
data: '0x',
accessList: [],
hash: '0xad169c8ebe54a152ae5c50b578b88ef3bd765d62a3161e594b0743636af338b4',
v: 0,
r: '0xb8b9e3326cb0df557cf6f24d8173edbf4fd4df535047ace869e22051bffedd0f',
s: '0x194c5f94dd1cf2644f369b78f2498549fb026d1721692c7b2d340a4836e904be',
from: '0xE668C72D4C67236A712Ce69A91C74358586f31ed',
wait: [Function (anonymous)]
}
}