Original NFT method call
Calling state-changing method
function executeCall(
uint256 tokenId,
bytes calldata data,
bytes calldata signature
) external payable;// Using Ethers.js lib for signing and hashing
// data would be calldata being forwarded (expected as hexstring)
const dataHash = ethers.utils.keccak256(data);
const dataHashBin = ethers.utils.arrayify(dataHash);
// signer is type of Signer class defined in Ethers.js lib
const signature = await signer.signMessage(dataHashBin);
return signature;Last updated