async void Start() { string chain = "ethereum"; string network = "mainnet"; string contract = "0x60f80121c31a0d46b5279700f9df786054aa5ee5"; string account = "0x6b2be2106a7e883f282e2ea8e203f516ec5b77f7"; int balance = await ERC721.BalanceOf(chain, network, contract, account); print(balance); }
async void Start() { string chain = "polygon"; string network = "mainnet"; string contract = "0xbCCaa7ACb552A2c7eb27C7eb77c2CC99580735b9"; string tokenId = "965"; string uri = await ERC721.URI(chain, network, contract, tokenId); print(uri); }
async void Start() { string chain = "moonbeam"; string network = "testnet"; string contract = "0xcB0cbcE06860f6C30C62560f5eFBF918150e056E"; string tokenId = "1"; string ownerOf = await ERC721.OwnerOf(chain, network, contract, tokenId); print(ownerOf); }
public async Task TestGetERC721Data() { // NOTE: // Since CryptoKitties was the first draft of ERC721, many functions were not formalized and decided upon. // Therefore, some functions will not work and some others will. ERC721 cryptokitties = new ERC721("0x06012c8cf97BEaD5deAe237070F9587f8E7A266d", "CryptoKitties", "CK", 0); var balance = await cryptokitties.QueryBalanceOf("0x12b353D1a2842D2272aB5A18C6814D69f4296873"); Assert.IsTrue(balance > 0); }
async void Start() { string chain = "ethereum"; string network = "mainnet"; string contract = "0xA74E199990FF572A320508547Ab7f44EA51e6F28"; string[] tokenIds = { "700", "791" }; string multicall = ""; // optional: multicall contract https://github.com/makerdao/multicall string rpc = ""; // optional: custom rpc List <string> batchOwners = await ERC721.OwnerOfBatch(chain, network, contract, tokenIds, multicall, rpc); foreach (string owner in batchOwners) { print("OwnerOfBatch: " + owner); } }
private void ERC721Tests() { // NOTE: // Since CryptoKitties was the first draft of ERC721, many functions were not formalized and decided upon. // Therefore, some functions will not work and some others will. // You can also initialize it with the values initially setup // ERC721 cryptokitties = new ERC721("0x06012c8cf97BEaD5deAe237070F9587f8E7A266d", "CryptoKitties", "CK", 0); // Here we initialize it without any knowledge of the decimal count, name, or symbol of the address. ERC721 cryptokitties = new ERC721("0x06012c8cf97BEaD5deAe237070F9587f8E7A266d"); cryptokitties.OnInitializationSuccessful(() => { cryptokitties.QueryBalanceOf("0x12b353D1a2842D2272aB5A18C6814D69f4296873") .OnSuccess(balance => Debug.Log(balance)) .OnError(Debug.Log); }); }