When reading and/or writing you will need to define which NFT you are working with.
/*Before you call any functions on a specific particle, you'll need to specify which one you are going to work with.*/constcontractAddress='0x1234';consttokenId=33;constnft=charged.NFT(contractAddress, tokenId);// This energizes our nft with 47 DAI tokens.consttxReciept=awaitnft.energize('aave.B','0xDAI',ethers.utils.parseEther('47'));// Get the energized massconstmassBN=awaitnft.getMass('aave.B','0xDAI');// Discharges all of the interest accrued by the DAI tokens to my wallet.consttxReceipt2=awaitnft.discharge('0xMYADDRESS','aave.B','0xDAI');
Utilities
The SDK provides a set of utility functions. The example below shows the format that all the functions are called by.
// This will fetch the addresses of a contract associated with the main contractconststateAddress=awaitcharged.utils.getStateAddress()