...
// import OpenZeppelin contracts.
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
// A simplified NFT contract with a whitelist mint function that uses a mapping to
// store whitelisted addresses.
// 带有使用映射存储在...
标准erc20合约。
想从前端调用一个地址的币的余额,web3JS 如下做了合约实例化和方法调用:
```
var tokenInstance = new web3js.eth.Contract(tokenABI,"0x6721A1802768D82Df3C113275A4286d6FfCa940E");
tokenInstance.methods.balanceOf("0xCC52C6dF34126e9A00D057663...