This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import NonFungibleToken from 0x631e88ae7f1d7c20; | |
| import MetadataViews from 0x631e88ae7f1d7c20; | |
| pub contract CatMoji: NonFungibleToken { | |
| pub var totalSupply: UInt64 | |
| pub event ContractInitialized() | |
| pub event Withdraw(id: UInt64, from: Address?) | |
| pub event Deposit(id: UInt64, to: Address?) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SPDX-License-Identifier: MIT | |
| // Source: | |
| // https://github.com/ensdomains/ens-contracts/blob/master/contracts/ethregistrar/StringUtils.sol | |
| pragma solidity >=0.8.4; | |
| library StringUtils { | |
| /** | |
| * @dev Returns the length of a given string | |
| * | |
| * @param s The string to measure the length of |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // https://docs.solana.com/developing/clients/jsonrpc-api#gettokenaccountsbyowner | |
| import axios from "axios"; | |
| async function getTokenAccounts(address: string) { | |
| try { | |
| return new Promise(async (resolve, reject) => { | |
| let data = { | |
| jsonrpc: "2.0", | |
| id: 1, | |
| method: "getProgramAccounts", |
NewerOlder