It's a built-in function :)
So you can call it for any address :)
If you feel not comfortable with the call syntax (or want to send nfts) you can also use the payload builder instead to make your intention more clear :)
const payload = TransactionPayload.contractCall()
.setFunction(new ContractFunction("ESDTNFTTransfer"))
.setArgs([
BytesValue.fromUTF8(this.config.nftToken),
new U64Value(nonce),
new BigUIntValue(new BigNumber(1)),
new AddressValue(this.scChest.getAddress()),
BytesValue.fromUTF8("openChest"),
])
.build();
return new Transaction({
receiver: sender,
gasLimit: 5000000,
data: payload,
chainID: this.elrondService.networkConfig.ChainID,
});
It's a built-in function :) So you can call it for any address :) If you feel not comfortable with the call syntax (or want to send nfts) you can also use the payload builder instead to make your intention more clear :) const payload = TransactionPayload.contractCall() .setFunction(new ContractFunction("ESDTNFTTransfer")) .setArgs([ BytesValue.fromUTF8(this.config.nftToken), new U64Value(nonce), new BigUIntValue(new BigNumber(1)), new AddressValue(this.scChest.getAddress()), BytesValue.fromUTF8("openChest"), ]) .build(); return new Transaction({ receiver: sender, gasLimit: 5000000, data: payload, chainID: this.elrondService.networkConfig.ChainID, });