@contractjs/erc721
Version:
A TypeScript utility library for ERC20 contracts.
23 lines • 616 B
JavaScript
import { AbiFunction } from "ox";
export const erc721Utils = {
mintCalldata: (to, tokenId) => {
let mint;
if (tokenId) {
mint = AbiFunction.from([
"function mint(address to, uint256 tokenId)",
]);
}
else {
mint = AbiFunction.from([
"function mint(address to)",
]);
}
if (tokenId) {
return AbiFunction.encodeData(mint, [to, tokenId]);
}
else {
return AbiFunction.encodeData(mint, [to]);
}
}
};
//# sourceMappingURL=erc721Utils.js.map