├── .gitignore ├── images ├── dash1.png ├── dash2.png ├── dash3.png ├── header.png ├── dashboard.png ├── accesstoken.png └── thesubgraph.png ├── Foundationsubgraph ├── tsconfig.json ├── build │ ├── Token │ │ ├── Token.wasm │ │ └── abis │ │ │ └── Token.json │ ├── schema.graphql │ └── subgraph.yaml ├── schema.graphql ├── package.json ├── subgraph.yaml ├── src │ └── mapping.ts ├── generated │ ├── schema.ts │ └── Token │ │ └── Token.ts └── abis │ └── Token.json └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules -------------------------------------------------------------------------------- /images/dash1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dabit3/building-a-subgraph-workshop/HEAD/images/dash1.png -------------------------------------------------------------------------------- /images/dash2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dabit3/building-a-subgraph-workshop/HEAD/images/dash2.png -------------------------------------------------------------------------------- /images/dash3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dabit3/building-a-subgraph-workshop/HEAD/images/dash3.png -------------------------------------------------------------------------------- /images/header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dabit3/building-a-subgraph-workshop/HEAD/images/header.png -------------------------------------------------------------------------------- /images/dashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dabit3/building-a-subgraph-workshop/HEAD/images/dashboard.png -------------------------------------------------------------------------------- /images/accesstoken.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dabit3/building-a-subgraph-workshop/HEAD/images/accesstoken.png -------------------------------------------------------------------------------- /images/thesubgraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dabit3/building-a-subgraph-workshop/HEAD/images/thesubgraph.png -------------------------------------------------------------------------------- /Foundationsubgraph/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@graphprotocol/graph-ts/types/tsconfig.base.json", 3 | "include": ["src"] 4 | } 5 | -------------------------------------------------------------------------------- /Foundationsubgraph/build/Token/Token.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dabit3/building-a-subgraph-workshop/HEAD/Foundationsubgraph/build/Token/Token.wasm -------------------------------------------------------------------------------- /Foundationsubgraph/schema.graphql: -------------------------------------------------------------------------------- 1 | type Token @entity { 2 | id: ID! 3 | tokenID: BigInt! 4 | contentURI: String 5 | tokenIPFSPath: String 6 | name: String! 7 | createdAtTimestamp: BigInt! 8 | creator: User! 9 | owner: User! 10 | } 11 | 12 | type User @entity { 13 | id: ID! 14 | tokens: [Token!]! @derivedFrom(field: "owner") 15 | created: [Token!]! @derivedFrom(field: "creator") 16 | } -------------------------------------------------------------------------------- /Foundationsubgraph/build/schema.graphql: -------------------------------------------------------------------------------- 1 | type Token @entity { 2 | id: ID! 3 | tokenID: BigInt! 4 | contentURI: String 5 | tokenIPFSPath: String 6 | name: String! 7 | createdAtTimestamp: BigInt! 8 | creator: User! 9 | owner: User! 10 | } 11 | 12 | type User @entity { 13 | id: ID! 14 | tokens: [Token!]! @derivedFrom(field: "owner") 15 | created: [Token!]! @derivedFrom(field: "creator") 16 | } -------------------------------------------------------------------------------- /Foundationsubgraph/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "fnddev", 3 | "license": "UNLICENSED", 4 | "scripts": { 5 | "codegen": "graph codegen", 6 | "build": "graph build", 7 | "deploy": "graph deploy --node https://api.thegraph.com/deploy/ dabit3/foundationsubgraph", 8 | "create-local": "graph create --node http://localhost:8020/ dabit3/foundationsubgraph", 9 | "remove-local": "graph remove --node http://localhost:8020/ dabit3/foundationsubgraph", 10 | "deploy-local": "graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001 dabit3/foundationsubgraph" 11 | }, 12 | "dependencies": { 13 | "@graphprotocol/graph-cli": "0.24.0", 14 | "@graphprotocol/graph-ts": "0.24.0" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Foundationsubgraph/subgraph.yaml: -------------------------------------------------------------------------------- 1 | specVersion: 0.0.2 2 | schema: 3 | file: ./schema.graphql 4 | dataSources: 5 | - kind: ethereum/contract 6 | name: Token 7 | network: mainnet 8 | source: 9 | address: "0x3B3ee1931Dc30C1957379FAc9aba94D1C48a5405" 10 | abi: Token 11 | startBlock: 11648721 12 | mapping: 13 | kind: ethereum/events 14 | apiVersion: 0.0.5 15 | language: wasm/assemblyscript 16 | entities: 17 | - Token 18 | - User 19 | abis: 20 | - name: Token 21 | file: ./abis/Token.json 22 | eventHandlers: 23 | - event: TokenIPFSPathUpdated(indexed uint256,indexed string,string) 24 | handler: handleTokenIPFSPathUpdated 25 | - event: Transfer(indexed address,indexed address,indexed uint256) 26 | handler: handleTransfer 27 | file: ./src/mapping.ts 28 | -------------------------------------------------------------------------------- /Foundationsubgraph/build/subgraph.yaml: -------------------------------------------------------------------------------- 1 | specVersion: 0.0.2 2 | schema: 3 | file: schema.graphql 4 | dataSources: 5 | - kind: ethereum/contract 6 | name: Token 7 | network: mainnet 8 | source: 9 | address: "0x3B3ee1931Dc30C1957379FAc9aba94D1C48a5405" 10 | abi: Token 11 | startBlock: 11648721 12 | mapping: 13 | kind: ethereum/events 14 | apiVersion: 0.0.5 15 | language: wasm/assemblyscript 16 | entities: 17 | - Token 18 | - User 19 | abis: 20 | - name: Token 21 | file: Token/abis/Token.json 22 | eventHandlers: 23 | - event: TokenIPFSPathUpdated(indexed uint256,indexed string,string) 24 | handler: handleTokenIPFSPathUpdated 25 | - event: Transfer(indexed address,indexed address,indexed uint256) 26 | handler: handleTransfer 27 | file: Token/Token.wasm 28 | -------------------------------------------------------------------------------- /Foundationsubgraph/src/mapping.ts: -------------------------------------------------------------------------------- 1 | import { 2 | TokenIPFSPathUpdated as TokenIPFSPathUpdatedEvent, 3 | Transfer as TransferEvent, 4 | Token as TokenContract, 5 | } from "../generated/Token/Token" 6 | 7 | import { 8 | Token, User 9 | } from '../generated/schema' 10 | 11 | export function handleTransfer(event: TransferEvent): void { 12 | let token = Token.load(event.params.tokenId.toString()); 13 | if (!token) { 14 | token = new Token(event.params.tokenId.toString()); 15 | token.creator = event.params.to.toHexString(); 16 | token.tokenID = event.params.tokenId; 17 | 18 | let tokenContract = TokenContract.bind(event.address); 19 | token.contentURI = tokenContract.tokenURI(event.params.tokenId); 20 | token.tokenIPFSPath = tokenContract.getTokenIPFSPath(event.params.tokenId); 21 | token.name = tokenContract.name(); 22 | token.createdAtTimestamp = event.block.timestamp; 23 | } 24 | token.owner = event.params.to.toHexString(); 25 | token.save(); 26 | 27 | let user = User.load(event.params.to.toHexString()); 28 | if (!user) { 29 | user = new User(event.params.to.toHexString()); 30 | user.save(); 31 | } 32 | } 33 | 34 | export function handleTokenURIUpdated(event: TokenIPFSPathUpdatedEvent): void { 35 | let token = Token.load(event.params.tokenId.toString()); 36 | if (!token) return 37 | token.tokenIPFSPath = event.params.tokenIPFSPath; 38 | token.save(); 39 | } 40 | -------------------------------------------------------------------------------- /Foundationsubgraph/generated/schema.ts: -------------------------------------------------------------------------------- 1 | // THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | 3 | import { 4 | TypedMap, 5 | Entity, 6 | Value, 7 | ValueKind, 8 | store, 9 | Bytes, 10 | BigInt, 11 | BigDecimal 12 | } from "@graphprotocol/graph-ts"; 13 | 14 | export class Token extends Entity { 15 | constructor(id: string) { 16 | super(); 17 | this.set("id", Value.fromString(id)); 18 | 19 | this.set("tokenID", Value.fromBigInt(BigInt.zero())); 20 | this.set("name", Value.fromString("")); 21 | this.set("createdAtTimestamp", Value.fromBigInt(BigInt.zero())); 22 | this.set("creator", Value.fromString("")); 23 | this.set("owner", Value.fromString("")); 24 | } 25 | 26 | save(): void { 27 | let id = this.get("id"); 28 | assert(id != null, "Cannot save Token entity without an ID"); 29 | if (id) { 30 | assert( 31 | id.kind == ValueKind.STRING, 32 | "Cannot save Token entity with non-string ID. " + 33 | 'Considering using .toHex() to convert the "id" to a string.' 34 | ); 35 | store.set("Token", id.toString(), this); 36 | } 37 | } 38 | 39 | static load(id: string): Token | null { 40 | return changetype(store.get("Token", id)); 41 | } 42 | 43 | get id(): string { 44 | let value = this.get("id"); 45 | return value!.toString(); 46 | } 47 | 48 | set id(value: string) { 49 | this.set("id", Value.fromString(value)); 50 | } 51 | 52 | get tokenID(): BigInt { 53 | let value = this.get("tokenID"); 54 | return value!.toBigInt(); 55 | } 56 | 57 | set tokenID(value: BigInt) { 58 | this.set("tokenID", Value.fromBigInt(value)); 59 | } 60 | 61 | get contentURI(): string | null { 62 | let value = this.get("contentURI"); 63 | if (!value || value.kind == ValueKind.NULL) { 64 | return null; 65 | } else { 66 | return value.toString(); 67 | } 68 | } 69 | 70 | set contentURI(value: string | null) { 71 | if (!value) { 72 | this.unset("contentURI"); 73 | } else { 74 | this.set("contentURI", Value.fromString(value)); 75 | } 76 | } 77 | 78 | get tokenIPFSPath(): string | null { 79 | let value = this.get("tokenIPFSPath"); 80 | if (!value || value.kind == ValueKind.NULL) { 81 | return null; 82 | } else { 83 | return value.toString(); 84 | } 85 | } 86 | 87 | set tokenIPFSPath(value: string | null) { 88 | if (!value) { 89 | this.unset("tokenIPFSPath"); 90 | } else { 91 | this.set("tokenIPFSPath", Value.fromString(value)); 92 | } 93 | } 94 | 95 | get name(): string { 96 | let value = this.get("name"); 97 | return value!.toString(); 98 | } 99 | 100 | set name(value: string) { 101 | this.set("name", Value.fromString(value)); 102 | } 103 | 104 | get createdAtTimestamp(): BigInt { 105 | let value = this.get("createdAtTimestamp"); 106 | return value!.toBigInt(); 107 | } 108 | 109 | set createdAtTimestamp(value: BigInt) { 110 | this.set("createdAtTimestamp", Value.fromBigInt(value)); 111 | } 112 | 113 | get creator(): string { 114 | let value = this.get("creator"); 115 | return value!.toString(); 116 | } 117 | 118 | set creator(value: string) { 119 | this.set("creator", Value.fromString(value)); 120 | } 121 | 122 | get owner(): string { 123 | let value = this.get("owner"); 124 | return value!.toString(); 125 | } 126 | 127 | set owner(value: string) { 128 | this.set("owner", Value.fromString(value)); 129 | } 130 | } 131 | 132 | export class User extends Entity { 133 | constructor(id: string) { 134 | super(); 135 | this.set("id", Value.fromString(id)); 136 | } 137 | 138 | save(): void { 139 | let id = this.get("id"); 140 | assert(id != null, "Cannot save User entity without an ID"); 141 | if (id) { 142 | assert( 143 | id.kind == ValueKind.STRING, 144 | "Cannot save User entity with non-string ID. " + 145 | 'Considering using .toHex() to convert the "id" to a string.' 146 | ); 147 | store.set("User", id.toString(), this); 148 | } 149 | } 150 | 151 | static load(id: string): User | null { 152 | return changetype(store.get("User", id)); 153 | } 154 | 155 | get id(): string { 156 | let value = this.get("id"); 157 | return value!.toString(); 158 | } 159 | 160 | set id(value: string) { 161 | this.set("id", Value.fromString(value)); 162 | } 163 | 164 | get tokens(): Array { 165 | let value = this.get("tokens"); 166 | return value!.toStringArray(); 167 | } 168 | 169 | set tokens(value: Array) { 170 | this.set("tokens", Value.fromStringArray(value)); 171 | } 172 | 173 | get created(): Array { 174 | let value = this.get("created"); 175 | return value!.toStringArray(); 176 | } 177 | 178 | set created(value: Array) { 179 | this.set("created", Value.fromStringArray(value)); 180 | } 181 | } 182 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## The Graph - Subgraph Workshop 2 | 3 | Learn how to build a GraphQL API on top of the Ethereum blockchain to query data from [Foundation](https://foundation.app/). 4 | 5 | ![Subgraph Workshop](images/header.png) 6 | 7 | In this workshop you'll learn how to build and deploy a subgraph using the [Foundation NFT](https://foundation.app/) smart contract. 8 | 9 | ### Prerequisites 10 | 11 | To be successful in this workshop, you should have [Node.js](https://github.com/nvm-sh/nvm#node-version-manager---) installed on your machine. 12 | 13 | ## Getting started 14 | 15 | To get started, open [The Graph Hosted Service](https://thegraph.com/hosted-service/dashboard) and either sign in or create a new account. 16 | 17 | ![Hosted studio dashboard](images/dash1.png) 18 | 19 | Next, go to the [dashboard](https://thegraph.com/hosted-service/dashboard) and click on __Add Subgraph__ to create a new subgraph. 20 | 21 | ![Hosted studio dashboard](images/dash2.png) 22 | 23 | Configure your subgraph with the following properties: 24 | 25 | - Subgraph Name - __Foundationsubgraph__ 26 | - Subtitle - __A subgraph for querying NFTs__ 27 | - Optional - Fill the description and GITHUB URL properties 28 | 29 | ![Hosted studio dashboard](images/dash3.png) 30 | 31 | Once the subgraph is created, we will initialize the subgraph locally using the Graph CLI. 32 | 33 | ### Initializing a new subgraph using the Graph CLI 34 | 35 | Next, install the Graph CLI: 36 | 37 | ```sh 38 | npm install -g @graphprotocol/graph-cli 39 | 40 | # or 41 | 42 | yarn global add @graphprotocol/graph-cli 43 | ``` 44 | 45 | Once the Graph CLI has been installed you can initialize a new subgraph with the Graph CLI `init` command. 46 | 47 | There are two ways to initialize a new subgraph: 48 | 49 | 1 - From an example subgraph (example command, do not run) 50 | 51 | ```sh 52 | graph init --from-example / [] 53 | ``` 54 | 55 | 2 - From an existing smart contract (example command, do not run) 56 | 57 | If you already have a smart contract deployed to Ethereum mainnet or one of the testnets, initializing a new subgraph from this contract is an easy way to get up and running. 58 | 59 | ```sh 60 | graph init --from-contract \ 61 | [--network ] \ 62 | [--abi ] \ 63 | / [] 64 | ``` 65 | 66 | In our case we'll be starting with the [Foundation proxy contract](https://etherscan.io/address/0xc9fe4ffc4be41d93a1a7189975cd360504ee361a#code) so we can initialize from that contract address by passing in the contract address using the `--from-contract` flag. 67 | 68 | __Run the following command:__ 69 | 70 | ```sh 71 | graph init --from-contract 0xc9fe4ffc4be41d93a1a7189975cd360504ee361a --protocol ethereum \ 72 | --network mainnet --contract-name Token --index-events 73 | 74 | ? Product for which to initialize › hosted-service 75 | ? Subgraph name › your-username/Foundationsubgraph 76 | ? Directory to create the subgraph in › Foundationsubgraph 77 | ? Ethereum network › Mainnet 78 | ? Contract address › 0xc9fe4ffc4be41d93a1a7189975cd360504ee361a 79 | ? Contract Name · Token 80 | ``` 81 | 82 | This command will generate a basic subgraph based off of the contract address passed in as the argument to `--from-contract`. By using this contract address, the CLI will initialize a few things in your project to get you started (including fetching the `abis` and saving them in the __abis__ directory). 83 | 84 | > By passing in `--index-events` the CLI will automatically populate some code for us both in __schema.graphql__ as well as __src/mapping.ts__ based on the events emitted from the contract. 85 | 86 | The main configuration and definition for the subgraph lives in the __subgraph.yaml__ file. The subgraph codebase consists of a few files: 87 | 88 | - __subgraph.yaml__: a YAML file containing the subgraph manifest 89 | - __schema.graphql__: a GraphQL schema that defines what data is stored for your subgraph, and how to query it via GraphQL 90 | - __AssemblyScript Mappings__: AssemblyScript code that translates from the event data in Ethereum to the entities defined in your schema (e.g. mapping.ts in this tutorial) 91 | 92 | The entries in __subgraph.yaml__ that we will be working with are: 93 | 94 | - `description` (optional): a human-readable description of what the subgraph is. This description is displayed by the Graph Explorer when the subgraph is deployed to the Hosted Service. 95 | - `repository` (optional): the URL of the repository where the subgraph manifest can be found. This is also displayed by the Graph Explorer. 96 | - `dataSources.source`: the address of the smart contract the subgraph sources, and the abi of the smart contract to use. The address is optional; omitting it allows to index matching events from all contracts. 97 | - `dataSources.source.startBlock` (optional): the number of the block that the data source starts indexing from. In most cases we suggest using the block in which the contract was created. 98 | - `dataSources.mapping.entities` : the entities that the data source writes to the store. The schema for each entity is defined in the the schema.graphql file. 99 | - `dataSources.mapping.abis`: one or more named ABI files for the source contract as well as any other smart contracts that you interact with from within the mappings. 100 | - `dataSources.mapping.eventHandlers`: lists the smart contract events this subgraph reacts to and the handlers in the mapping — __./src/mapping.ts__ in the example — that transform these events into entities in the store. 101 | 102 | ### Defining the entities 103 | 104 | With The Graph, you define entity types in __schema.graphql__, and Graph Node will generate top level fields for querying single instances and collections of that entity type. Each type that should be an entity is required to be annotated with an `@entity` directive. 105 | 106 | The entities / data we will be indexing are the `Token` and `User`. This way we can index the Tokens created by the users as well as the users themselves. 107 | 108 | To do this, update __schema.graphql__ with the following code: 109 | 110 | ```graphql 111 | type Token @entity { 112 | id: ID! 113 | tokenID: BigInt! 114 | contentURI: String 115 | tokenIPFSPath: String 116 | name: String! 117 | createdAtTimestamp: BigInt! 118 | creator: User! 119 | owner: User! 120 | } 121 | 122 | type User @entity { 123 | id: ID! 124 | tokens: [Token!]! @derivedFrom(field: "owner") 125 | created: [Token!]! @derivedFrom(field: "creator") 126 | } 127 | ``` 128 | 129 | ### On Relationships via `@derivedFrom` (from the docs): 130 | 131 | Reverse lookups can be defined on an entity through the `@derivedFrom` field. This creates a virtual field on the entity that may be queried but cannot be set manually through the mappings API. Rather, it is derived from the relationship defined on the other entity. For such relationships, it rarely makes sense to store both sides of the relationship, and both indexing and query performance will be better when only one side is stored and the other is derived. 132 | 133 | For one-to-many relationships, the relationship should always be stored on the 'one' side, and the 'many' side should always be derived. Storing the relationship this way, rather than storing an array of entities on the 'many' side, will result in dramatically better performance for both indexing and querying the subgraph. In general, storing arrays of entities should be avoided as much as is practical. 134 | 135 | Now that we have created the GraphQL schema for our app, we can generate the entities locally to start using in the `mappings` created by the CLI: 136 | 137 | ```sh 138 | graph codegen 139 | ``` 140 | 141 | In order to make working smart contracts, events and entities easy and type-safe, the Graph CLI generates AssemblyScript types from a combination of the subgraph's GraphQL schema and the contract ABIs included in the data sources. 142 | 143 | ## Updating the subgraph with the entities and mappings 144 | 145 | Now we can configure the __subgraph.yaml__ to use the entities that we have just created and configure their mappings. 146 | 147 | To do so, first update the `dataSources.mapping.entities` field with the `User` and `Token` entities: 148 | 149 | ```yaml 150 | entities: 151 | - Token 152 | - User 153 | ``` 154 | 155 | Next, update the `dataSources.mapping.eventHandlers` to include only the following three event handlers: 156 | 157 | ```yaml 158 | - event: TokenIPFSPathUpdated(indexed uint256,indexed string,string) 159 | handler: handleTokenIPFSPathUpdated 160 | - event: Transfer(indexed address,indexed address,indexed uint256) 161 | handler: handleTransfer 162 | ``` 163 | 164 | Finally, update the configuration to add the startBlock and change the contract `address` to the [main contract](https://etherscan.io/address/0x3B3ee1931Dc30C1957379FAc9aba94D1C48a5405) address: 165 | 166 | ```yaml 167 | source: 168 | address: "0x3B3ee1931Dc30C1957379FAc9aba94D1C48a5405" 169 | abi: Token 170 | startBlock: 11565020 171 | ``` 172 | 173 | ## Assemblyscript mappings 174 | 175 | Next, open __src/mappings.ts__ to write the mappings that we defined in our subgraph subgraph `eventHandlers`. 176 | 177 | Update the file with the following code: 178 | 179 | ```typescript 180 | import { 181 | TokenIPFSPathUpdated as TokenIPFSPathUpdatedEvent, 182 | Transfer as TransferEvent, 183 | Token as TokenContract, 184 | } from "../generated/Token/Token" 185 | 186 | import { 187 | Token, User 188 | } from '../generated/schema' 189 | 190 | export function handleTransfer(event: TransferEvent): void { 191 | let token = Token.load(event.params.tokenId.toString()); 192 | if (!token) { 193 | token = new Token(event.params.tokenId.toString()); 194 | token.creator = event.params.to.toHexString(); 195 | token.tokenID = event.params.tokenId; 196 | 197 | let tokenContract = TokenContract.bind(event.address); 198 | token.contentURI = tokenContract.tokenURI(event.params.tokenId); 199 | token.tokenIPFSPath = tokenContract.getTokenIPFSPath(event.params.tokenId); 200 | token.name = tokenContract.name(); 201 | token.createdAtTimestamp = event.block.timestamp; 202 | } 203 | token.owner = event.params.to.toHexString(); 204 | token.save(); 205 | 206 | let user = User.load(event.params.to.toHexString()); 207 | if (!user) { 208 | user = new User(event.params.to.toHexString()); 209 | user.save(); 210 | } 211 | } 212 | 213 | export function handleTokenURIUpdated(event: TokenIPFSPathUpdatedEvent): void { 214 | let token = Token.load(event.params.tokenId.toString()); 215 | if (!token) return 216 | token.tokenIPFSPath = event.params.tokenIPFSPath; 217 | token.save(); 218 | } 219 | ``` 220 | 221 | These mappings will handle events for when a new token is created, transferred, or updated. When these events fire, the mappings will save the data into the subgraph. 222 | 223 | ### Running a build 224 | 225 | Next, let's run a build to make sure that everything is configured properly. To do so, run the `build` command: 226 | 227 | ```sh 228 | graph build 229 | ``` 230 | 231 | If the build is successful, you should see a new __build__ folder generated in your root directory. 232 | 233 | ## Deploying the subgraph 234 | 235 | To deploy, we can run the `deploy` command using the Graph CLI. To deploy, you will first need to copy the __Access token__ for your account, available in the [Graph Explorer](https://thegraph.com/explorer/dashboard): 236 | 237 | ![Graph Explorer](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/820lwqh8yo3iyu7fsbhj.jpg) 238 | 239 | Next, run the following command: 240 | 241 | ```sh 242 | $ graph auth 243 | ✔ Product for which to initialize · hosted-service 244 | ✔ Deploy key · ******************************** 245 | 246 | yarn deploy 247 | ``` 248 | 249 | Once the subgraph is deployed, you should see it show up in your dashboard: 250 | 251 | ![Graph Dashboard](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q548jeq4kuhgddrjv0dv.jpg) 252 | 253 | When you click on the subgraph, it should open the Graph explorer: 254 | 255 | ![The Foundation Subgraph](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9qremconu1io72z3g6pa.png) 256 | 257 | ## Querying for data 258 | 259 | Now that we are in the dashboard, we should be able to start querying for data. Run the following query to get a list of tokens and their metadata: 260 | 261 | ```graphql 262 | { 263 | tokens { 264 | id 265 | tokenID 266 | contentURI 267 | tokenIPFSPath 268 | } 269 | } 270 | ``` 271 | 272 | We can also configure the order direction: 273 | 274 | ```graphql 275 | { 276 | tokens( 277 | orderBy:id, 278 | orderDirection: desc 279 | ) { 280 | id 281 | tokenID 282 | contentURI 283 | tokenIPFSPath 284 | } 285 | } 286 | ``` 287 | 288 | Or choose to skip forward a certain number of results to implement some basic pagination: 289 | 290 | ```graphql 291 | { 292 | tokens( 293 | skip: 100, 294 | orderBy:id, 295 | orderDirection: desc 296 | ) { 297 | id 298 | tokenID 299 | contentURI 300 | tokenIPFSPath 301 | } 302 | } 303 | ``` 304 | 305 | Or query for users and their associated content: 306 | 307 | ```graphql 308 | { 309 | users { 310 | id 311 | tokens { 312 | id 313 | contentURI 314 | } 315 | } 316 | } 317 | ``` 318 | 319 | We can also query by timestamp to view the most recently created NFTS: 320 | 321 | ```graphql 322 | { 323 | tokens( 324 | orderBy: createdAtTimestamp, 325 | orderDirection: desc 326 | ) { 327 | id 328 | tokenID 329 | contentURI 330 | } 331 | } 332 | ``` 333 | 334 | > The codebase for this project is located [here](https://github.com/dabit3/building-a-subgraph-workshop/tree/main/Foundationsubgraph) 335 | 336 | ## Next steps 337 | 338 | If you are interested in learning more about Web3, building Dapps, or building subgraphs, check out the following resources: 339 | 340 | The Graph on Twitter - [@graphprotocol](https://twitter.com/graphprotocol) 341 | 342 | [The Complete Guide to Full Stack Ethereum Development](https://dev.to/dabit3/the-complete-guide-to-full-stack-ethereum-development-3j13) 343 | 344 | [The Graph Discord](thegraph.com/discord) 345 | 346 | [Solidity Docs](https://docs.soliditylang.org/) 347 | 348 | [Ethereum Developer Documentation](https://ethereum.org/en/developers/docs/) 349 | 350 | Austin Griffith on Twitter [@austingriffith](https://twitter.com/austingriffith) & [Scaffold Eth](https://github.com/austintgriffith/scaffold-eth) 351 | 352 | [Crypto Zombies](https://cryptozombies.io/) -------------------------------------------------------------------------------- /Foundationsubgraph/abis/Token.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "indexed": true, 7 | "internalType": "address", 8 | "name": "owner", 9 | "type": "address" 10 | }, 11 | { 12 | "indexed": true, 13 | "internalType": "address", 14 | "name": "approved", 15 | "type": "address" 16 | }, 17 | { 18 | "indexed": true, 19 | "internalType": "uint256", 20 | "name": "tokenId", 21 | "type": "uint256" 22 | } 23 | ], 24 | "name": "Approval", 25 | "type": "event" 26 | }, 27 | { 28 | "anonymous": false, 29 | "inputs": [ 30 | { 31 | "indexed": true, 32 | "internalType": "address", 33 | "name": "owner", 34 | "type": "address" 35 | }, 36 | { 37 | "indexed": true, 38 | "internalType": "address", 39 | "name": "operator", 40 | "type": "address" 41 | }, 42 | { 43 | "indexed": false, 44 | "internalType": "bool", 45 | "name": "approved", 46 | "type": "bool" 47 | } 48 | ], 49 | "name": "ApprovalForAll", 50 | "type": "event" 51 | }, 52 | { 53 | "anonymous": false, 54 | "inputs": [ 55 | { 56 | "indexed": false, 57 | "internalType": "string", 58 | "name": "baseURI", 59 | "type": "string" 60 | } 61 | ], 62 | "name": "BaseURIUpdated", 63 | "type": "event" 64 | }, 65 | { 66 | "anonymous": false, 67 | "inputs": [ 68 | { 69 | "indexed": true, 70 | "internalType": "address", 71 | "name": "creator", 72 | "type": "address" 73 | }, 74 | { 75 | "indexed": true, 76 | "internalType": "uint256", 77 | "name": "tokenId", 78 | "type": "uint256" 79 | }, 80 | { 81 | "indexed": true, 82 | "internalType": "string", 83 | "name": "indexedTokenIPFSPath", 84 | "type": "string" 85 | }, 86 | { 87 | "indexed": false, 88 | "internalType": "string", 89 | "name": "tokenIPFSPath", 90 | "type": "string" 91 | } 92 | ], 93 | "name": "Minted", 94 | "type": "event" 95 | }, 96 | { 97 | "anonymous": false, 98 | "inputs": [ 99 | { 100 | "indexed": true, 101 | "internalType": "uint256", 102 | "name": "tokenId", 103 | "type": "uint256" 104 | }, 105 | { 106 | "indexed": true, 107 | "internalType": "address", 108 | "name": "originalAddress", 109 | "type": "address" 110 | }, 111 | { 112 | "indexed": true, 113 | "internalType": "address", 114 | "name": "newAddress", 115 | "type": "address" 116 | } 117 | ], 118 | "name": "NFTCreatorMigrated", 119 | "type": "event" 120 | }, 121 | { 122 | "anonymous": false, 123 | "inputs": [ 124 | { 125 | "indexed": true, 126 | "internalType": "address", 127 | "name": "nftMarket", 128 | "type": "address" 129 | } 130 | ], 131 | "name": "NFTMarketUpdated", 132 | "type": "event" 133 | }, 134 | { 135 | "anonymous": false, 136 | "inputs": [ 137 | { 138 | "indexed": false, 139 | "internalType": "string", 140 | "name": "name", 141 | "type": "string" 142 | }, 143 | { 144 | "indexed": false, 145 | "internalType": "string", 146 | "name": "symbol", 147 | "type": "string" 148 | }, 149 | { 150 | "indexed": false, 151 | "internalType": "string", 152 | "name": "baseURI", 153 | "type": "string" 154 | } 155 | ], 156 | "name": "NFTMetadataUpdated", 157 | "type": "event" 158 | }, 159 | { 160 | "anonymous": false, 161 | "inputs": [ 162 | { 163 | "indexed": true, 164 | "internalType": "uint256", 165 | "name": "tokenId", 166 | "type": "uint256" 167 | }, 168 | { 169 | "indexed": true, 170 | "internalType": "address", 171 | "name": "originalAddress", 172 | "type": "address" 173 | }, 174 | { 175 | "indexed": true, 176 | "internalType": "address", 177 | "name": "newAddress", 178 | "type": "address" 179 | } 180 | ], 181 | "name": "NFTOwnerMigrated", 182 | "type": "event" 183 | }, 184 | { 185 | "anonymous": false, 186 | "inputs": [ 187 | { 188 | "indexed": true, 189 | "internalType": "uint256", 190 | "name": "tokenId", 191 | "type": "uint256" 192 | }, 193 | { 194 | "indexed": true, 195 | "internalType": "address", 196 | "name": "originalAddress", 197 | "type": "address" 198 | }, 199 | { 200 | "indexed": true, 201 | "internalType": "address", 202 | "name": "newAddress", 203 | "type": "address" 204 | }, 205 | { 206 | "indexed": false, 207 | "internalType": "address", 208 | "name": "originalPaymentAddress", 209 | "type": "address" 210 | }, 211 | { 212 | "indexed": false, 213 | "internalType": "address", 214 | "name": "newPaymentAddress", 215 | "type": "address" 216 | } 217 | ], 218 | "name": "PaymentAddressMigrated", 219 | "type": "event" 220 | }, 221 | { 222 | "anonymous": false, 223 | "inputs": [ 224 | { 225 | "indexed": true, 226 | "internalType": "address", 227 | "name": "proxyCallContract", 228 | "type": "address" 229 | } 230 | ], 231 | "name": "ProxyCallContractUpdated", 232 | "type": "event" 233 | }, 234 | { 235 | "anonymous": false, 236 | "inputs": [ 237 | { 238 | "indexed": true, 239 | "internalType": "address", 240 | "name": "fromPaymentAddress", 241 | "type": "address" 242 | }, 243 | { 244 | "indexed": true, 245 | "internalType": "address", 246 | "name": "toPaymentAddress", 247 | "type": "address" 248 | }, 249 | { 250 | "indexed": true, 251 | "internalType": "uint256", 252 | "name": "tokenId", 253 | "type": "uint256" 254 | } 255 | ], 256 | "name": "TokenCreatorPaymentAddressSet", 257 | "type": "event" 258 | }, 259 | { 260 | "anonymous": false, 261 | "inputs": [ 262 | { 263 | "indexed": true, 264 | "internalType": "address", 265 | "name": "fromCreator", 266 | "type": "address" 267 | }, 268 | { 269 | "indexed": true, 270 | "internalType": "address", 271 | "name": "toCreator", 272 | "type": "address" 273 | }, 274 | { 275 | "indexed": true, 276 | "internalType": "uint256", 277 | "name": "tokenId", 278 | "type": "uint256" 279 | } 280 | ], 281 | "name": "TokenCreatorUpdated", 282 | "type": "event" 283 | }, 284 | { 285 | "anonymous": false, 286 | "inputs": [ 287 | { 288 | "indexed": true, 289 | "internalType": "uint256", 290 | "name": "tokenId", 291 | "type": "uint256" 292 | }, 293 | { 294 | "indexed": true, 295 | "internalType": "string", 296 | "name": "indexedTokenIPFSPath", 297 | "type": "string" 298 | }, 299 | { 300 | "indexed": false, 301 | "internalType": "string", 302 | "name": "tokenIPFSPath", 303 | "type": "string" 304 | } 305 | ], 306 | "name": "TokenIPFSPathUpdated", 307 | "type": "event" 308 | }, 309 | { 310 | "anonymous": false, 311 | "inputs": [ 312 | { 313 | "indexed": true, 314 | "internalType": "address", 315 | "name": "from", 316 | "type": "address" 317 | }, 318 | { 319 | "indexed": true, 320 | "internalType": "address", 321 | "name": "to", 322 | "type": "address" 323 | }, 324 | { 325 | "indexed": true, 326 | "internalType": "uint256", 327 | "name": "tokenId", 328 | "type": "uint256" 329 | } 330 | ], 331 | "name": "Transfer", 332 | "type": "event" 333 | }, 334 | { 335 | "inputs": [ 336 | { 337 | "internalType": "uint256[]", 338 | "name": "createdTokenIds", 339 | "type": "uint256[]" 340 | }, 341 | { 342 | "internalType": "uint256[]", 343 | "name": "ownedTokenIds", 344 | "type": "uint256[]" 345 | }, 346 | { 347 | "internalType": "address", 348 | "name": "originalAddress", 349 | "type": "address" 350 | }, 351 | { 352 | "internalType": "address payable", 353 | "name": "newAddress", 354 | "type": "address" 355 | }, 356 | { "internalType": "bytes", "name": "signature", "type": "bytes" } 357 | ], 358 | "name": "adminAccountMigration", 359 | "outputs": [], 360 | "stateMutability": "nonpayable", 361 | "type": "function" 362 | }, 363 | { 364 | "inputs": [ 365 | { 366 | "internalType": "uint256[]", 367 | "name": "paymentAddressTokenIds", 368 | "type": "uint256[]" 369 | }, 370 | { 371 | "internalType": "address", 372 | "name": "paymentAddressFactory", 373 | "type": "address" 374 | }, 375 | { 376 | "internalType": "bytes", 377 | "name": "paymentAddressCallData", 378 | "type": "bytes" 379 | }, 380 | { 381 | "internalType": "uint256", 382 | "name": "addressLocationInCallData", 383 | "type": "uint256" 384 | }, 385 | { 386 | "internalType": "address", 387 | "name": "originalAddress", 388 | "type": "address" 389 | }, 390 | { 391 | "internalType": "address payable", 392 | "name": "newAddress", 393 | "type": "address" 394 | }, 395 | { "internalType": "bytes", "name": "signature", "type": "bytes" } 396 | ], 397 | "name": "adminAccountMigrationForPaymentAddresses", 398 | "outputs": [], 399 | "stateMutability": "nonpayable", 400 | "type": "function" 401 | }, 402 | { 403 | "inputs": [ 404 | { "internalType": "address", "name": "_nftMarket", "type": "address" }, 405 | { "internalType": "string", "name": "baseURI", "type": "string" }, 406 | { 407 | "internalType": "address", 408 | "name": "proxyCallContract", 409 | "type": "address" 410 | } 411 | ], 412 | "name": "adminUpdateConfig", 413 | "outputs": [], 414 | "stateMutability": "nonpayable", 415 | "type": "function" 416 | }, 417 | { 418 | "inputs": [ 419 | { "internalType": "address", "name": "to", "type": "address" }, 420 | { "internalType": "uint256", "name": "tokenId", "type": "uint256" } 421 | ], 422 | "name": "approve", 423 | "outputs": [], 424 | "stateMutability": "nonpayable", 425 | "type": "function" 426 | }, 427 | { 428 | "inputs": [ 429 | { "internalType": "address", "name": "owner", "type": "address" } 430 | ], 431 | "name": "balanceOf", 432 | "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], 433 | "stateMutability": "view", 434 | "type": "function" 435 | }, 436 | { 437 | "inputs": [], 438 | "name": "baseURI", 439 | "outputs": [{ "internalType": "string", "name": "", "type": "string" }], 440 | "stateMutability": "view", 441 | "type": "function" 442 | }, 443 | { 444 | "inputs": [ 445 | { "internalType": "uint256", "name": "tokenId", "type": "uint256" } 446 | ], 447 | "name": "burn", 448 | "outputs": [], 449 | "stateMutability": "nonpayable", 450 | "type": "function" 451 | }, 452 | { 453 | "inputs": [ 454 | { "internalType": "uint256", "name": "tokenId", "type": "uint256" } 455 | ], 456 | "name": "getApproved", 457 | "outputs": [{ "internalType": "address", "name": "", "type": "address" }], 458 | "stateMutability": "view", 459 | "type": "function" 460 | }, 461 | { 462 | "inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], 463 | "name": "getFeeBps", 464 | "outputs": [ 465 | { "internalType": "uint256[]", "name": "", "type": "uint256[]" } 466 | ], 467 | "stateMutability": "view", 468 | "type": "function" 469 | }, 470 | { 471 | "inputs": [{ "internalType": "uint256", "name": "id", "type": "uint256" }], 472 | "name": "getFeeRecipients", 473 | "outputs": [ 474 | { "internalType": "address payable[]", "name": "", "type": "address[]" } 475 | ], 476 | "stateMutability": "view", 477 | "type": "function" 478 | }, 479 | { 480 | "inputs": [], 481 | "name": "getFoundationTreasury", 482 | "outputs": [ 483 | { "internalType": "address payable", "name": "", "type": "address" } 484 | ], 485 | "stateMutability": "view", 486 | "type": "function" 487 | }, 488 | { 489 | "inputs": [ 490 | { "internalType": "address", "name": "creator", "type": "address" }, 491 | { "internalType": "string", "name": "tokenIPFSPath", "type": "string" } 492 | ], 493 | "name": "getHasCreatorMintedIPFSHash", 494 | "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], 495 | "stateMutability": "view", 496 | "type": "function" 497 | }, 498 | { 499 | "inputs": [], 500 | "name": "getNFTMarket", 501 | "outputs": [{ "internalType": "address", "name": "", "type": "address" }], 502 | "stateMutability": "view", 503 | "type": "function" 504 | }, 505 | { 506 | "inputs": [], 507 | "name": "getNextTokenId", 508 | "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], 509 | "stateMutability": "view", 510 | "type": "function" 511 | }, 512 | { 513 | "inputs": [ 514 | { "internalType": "uint256", "name": "tokenId", "type": "uint256" } 515 | ], 516 | "name": "getRoyalties", 517 | "outputs": [ 518 | { 519 | "internalType": "address payable[]", 520 | "name": "recipients", 521 | "type": "address[]" 522 | }, 523 | { 524 | "internalType": "uint256[]", 525 | "name": "feesInBasisPoints", 526 | "type": "uint256[]" 527 | } 528 | ], 529 | "stateMutability": "view", 530 | "type": "function" 531 | }, 532 | { 533 | "inputs": [ 534 | { "internalType": "uint256", "name": "tokenId", "type": "uint256" } 535 | ], 536 | "name": "getTokenCreatorPaymentAddress", 537 | "outputs": [ 538 | { 539 | "internalType": "address payable", 540 | "name": "tokenCreatorPaymentAddress", 541 | "type": "address" 542 | } 543 | ], 544 | "stateMutability": "view", 545 | "type": "function" 546 | }, 547 | { 548 | "inputs": [ 549 | { "internalType": "uint256", "name": "tokenId", "type": "uint256" } 550 | ], 551 | "name": "getTokenIPFSPath", 552 | "outputs": [{ "internalType": "string", "name": "", "type": "string" }], 553 | "stateMutability": "view", 554 | "type": "function" 555 | }, 556 | { 557 | "inputs": [ 558 | { 559 | "internalType": "address payable", 560 | "name": "treasury", 561 | "type": "address" 562 | } 563 | ], 564 | "name": "initialize", 565 | "outputs": [], 566 | "stateMutability": "nonpayable", 567 | "type": "function" 568 | }, 569 | { 570 | "inputs": [ 571 | { "internalType": "address", "name": "owner", "type": "address" }, 572 | { "internalType": "address", "name": "operator", "type": "address" } 573 | ], 574 | "name": "isApprovedForAll", 575 | "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], 576 | "stateMutability": "view", 577 | "type": "function" 578 | }, 579 | { 580 | "inputs": [ 581 | { "internalType": "string", "name": "tokenIPFSPath", "type": "string" } 582 | ], 583 | "name": "mint", 584 | "outputs": [ 585 | { "internalType": "uint256", "name": "tokenId", "type": "uint256" } 586 | ], 587 | "stateMutability": "nonpayable", 588 | "type": "function" 589 | }, 590 | { 591 | "inputs": [ 592 | { "internalType": "string", "name": "tokenIPFSPath", "type": "string" } 593 | ], 594 | "name": "mintAndApproveMarket", 595 | "outputs": [ 596 | { "internalType": "uint256", "name": "tokenId", "type": "uint256" } 597 | ], 598 | "stateMutability": "nonpayable", 599 | "type": "function" 600 | }, 601 | { 602 | "inputs": [ 603 | { "internalType": "string", "name": "tokenIPFSPath", "type": "string" }, 604 | { 605 | "internalType": "address payable", 606 | "name": "tokenCreatorPaymentAddress", 607 | "type": "address" 608 | } 609 | ], 610 | "name": "mintWithCreatorPaymentAddress", 611 | "outputs": [ 612 | { "internalType": "uint256", "name": "tokenId", "type": "uint256" } 613 | ], 614 | "stateMutability": "nonpayable", 615 | "type": "function" 616 | }, 617 | { 618 | "inputs": [ 619 | { "internalType": "string", "name": "tokenIPFSPath", "type": "string" }, 620 | { 621 | "internalType": "address payable", 622 | "name": "tokenCreatorPaymentAddress", 623 | "type": "address" 624 | } 625 | ], 626 | "name": "mintWithCreatorPaymentAddressAndApproveMarket", 627 | "outputs": [ 628 | { "internalType": "uint256", "name": "tokenId", "type": "uint256" } 629 | ], 630 | "stateMutability": "nonpayable", 631 | "type": "function" 632 | }, 633 | { 634 | "inputs": [ 635 | { "internalType": "string", "name": "tokenIPFSPath", "type": "string" }, 636 | { 637 | "internalType": "address", 638 | "name": "paymentAddressFactory", 639 | "type": "address" 640 | }, 641 | { 642 | "internalType": "bytes", 643 | "name": "paymentAddressCallData", 644 | "type": "bytes" 645 | } 646 | ], 647 | "name": "mintWithCreatorPaymentFactory", 648 | "outputs": [ 649 | { "internalType": "uint256", "name": "tokenId", "type": "uint256" } 650 | ], 651 | "stateMutability": "nonpayable", 652 | "type": "function" 653 | }, 654 | { 655 | "inputs": [ 656 | { "internalType": "string", "name": "tokenIPFSPath", "type": "string" }, 657 | { 658 | "internalType": "address", 659 | "name": "paymentAddressFactory", 660 | "type": "address" 661 | }, 662 | { 663 | "internalType": "bytes", 664 | "name": "paymentAddressCallData", 665 | "type": "bytes" 666 | } 667 | ], 668 | "name": "mintWithCreatorPaymentFactoryAndApproveMarket", 669 | "outputs": [ 670 | { "internalType": "uint256", "name": "tokenId", "type": "uint256" } 671 | ], 672 | "stateMutability": "nonpayable", 673 | "type": "function" 674 | }, 675 | { 676 | "inputs": [], 677 | "name": "name", 678 | "outputs": [{ "internalType": "string", "name": "", "type": "string" }], 679 | "stateMutability": "pure", 680 | "type": "function" 681 | }, 682 | { 683 | "inputs": [ 684 | { "internalType": "uint256", "name": "tokenId", "type": "uint256" } 685 | ], 686 | "name": "ownerOf", 687 | "outputs": [{ "internalType": "address", "name": "", "type": "address" }], 688 | "stateMutability": "view", 689 | "type": "function" 690 | }, 691 | { 692 | "inputs": [], 693 | "name": "proxyCallAddress", 694 | "outputs": [{ "internalType": "address", "name": "", "type": "address" }], 695 | "stateMutability": "view", 696 | "type": "function" 697 | }, 698 | { 699 | "inputs": [ 700 | { "internalType": "address", "name": "from", "type": "address" }, 701 | { "internalType": "address", "name": "to", "type": "address" }, 702 | { "internalType": "uint256", "name": "tokenId", "type": "uint256" } 703 | ], 704 | "name": "safeTransferFrom", 705 | "outputs": [], 706 | "stateMutability": "nonpayable", 707 | "type": "function" 708 | }, 709 | { 710 | "inputs": [ 711 | { "internalType": "address", "name": "from", "type": "address" }, 712 | { "internalType": "address", "name": "to", "type": "address" }, 713 | { "internalType": "uint256", "name": "tokenId", "type": "uint256" }, 714 | { "internalType": "bytes", "name": "_data", "type": "bytes" } 715 | ], 716 | "name": "safeTransferFrom", 717 | "outputs": [], 718 | "stateMutability": "nonpayable", 719 | "type": "function" 720 | }, 721 | { 722 | "inputs": [ 723 | { "internalType": "address", "name": "operator", "type": "address" }, 724 | { "internalType": "bool", "name": "approved", "type": "bool" } 725 | ], 726 | "name": "setApprovalForAll", 727 | "outputs": [], 728 | "stateMutability": "nonpayable", 729 | "type": "function" 730 | }, 731 | { 732 | "inputs": [ 733 | { "internalType": "bytes4", "name": "interfaceId", "type": "bytes4" } 734 | ], 735 | "name": "supportsInterface", 736 | "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], 737 | "stateMutability": "view", 738 | "type": "function" 739 | }, 740 | { 741 | "inputs": [], 742 | "name": "symbol", 743 | "outputs": [{ "internalType": "string", "name": "", "type": "string" }], 744 | "stateMutability": "pure", 745 | "type": "function" 746 | }, 747 | { 748 | "inputs": [ 749 | { "internalType": "uint256", "name": "index", "type": "uint256" } 750 | ], 751 | "name": "tokenByIndex", 752 | "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], 753 | "stateMutability": "view", 754 | "type": "function" 755 | }, 756 | { 757 | "inputs": [ 758 | { "internalType": "uint256", "name": "tokenId", "type": "uint256" } 759 | ], 760 | "name": "tokenCreator", 761 | "outputs": [ 762 | { "internalType": "address payable", "name": "", "type": "address" } 763 | ], 764 | "stateMutability": "view", 765 | "type": "function" 766 | }, 767 | { 768 | "inputs": [ 769 | { "internalType": "address", "name": "owner", "type": "address" }, 770 | { "internalType": "uint256", "name": "index", "type": "uint256" } 771 | ], 772 | "name": "tokenOfOwnerByIndex", 773 | "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], 774 | "stateMutability": "view", 775 | "type": "function" 776 | }, 777 | { 778 | "inputs": [ 779 | { "internalType": "uint256", "name": "tokenId", "type": "uint256" } 780 | ], 781 | "name": "tokenURI", 782 | "outputs": [{ "internalType": "string", "name": "", "type": "string" }], 783 | "stateMutability": "view", 784 | "type": "function" 785 | }, 786 | { 787 | "inputs": [], 788 | "name": "totalSupply", 789 | "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], 790 | "stateMutability": "view", 791 | "type": "function" 792 | }, 793 | { 794 | "inputs": [ 795 | { "internalType": "address", "name": "from", "type": "address" }, 796 | { "internalType": "address", "name": "to", "type": "address" }, 797 | { "internalType": "uint256", "name": "tokenId", "type": "uint256" } 798 | ], 799 | "name": "transferFrom", 800 | "outputs": [], 801 | "stateMutability": "nonpayable", 802 | "type": "function" 803 | } 804 | ] 805 | -------------------------------------------------------------------------------- /Foundationsubgraph/build/Token/abis/Token.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "indexed": true, 7 | "internalType": "address", 8 | "name": "owner", 9 | "type": "address" 10 | }, 11 | { 12 | "indexed": true, 13 | "internalType": "address", 14 | "name": "approved", 15 | "type": "address" 16 | }, 17 | { 18 | "indexed": true, 19 | "internalType": "uint256", 20 | "name": "tokenId", 21 | "type": "uint256" 22 | } 23 | ], 24 | "name": "Approval", 25 | "type": "event" 26 | }, 27 | { 28 | "anonymous": false, 29 | "inputs": [ 30 | { 31 | "indexed": true, 32 | "internalType": "address", 33 | "name": "owner", 34 | "type": "address" 35 | }, 36 | { 37 | "indexed": true, 38 | "internalType": "address", 39 | "name": "operator", 40 | "type": "address" 41 | }, 42 | { 43 | "indexed": false, 44 | "internalType": "bool", 45 | "name": "approved", 46 | "type": "bool" 47 | } 48 | ], 49 | "name": "ApprovalForAll", 50 | "type": "event" 51 | }, 52 | { 53 | "anonymous": false, 54 | "inputs": [ 55 | { 56 | "indexed": false, 57 | "internalType": "string", 58 | "name": "baseURI", 59 | "type": "string" 60 | } 61 | ], 62 | "name": "BaseURIUpdated", 63 | "type": "event" 64 | }, 65 | { 66 | "anonymous": false, 67 | "inputs": [ 68 | { 69 | "indexed": true, 70 | "internalType": "address", 71 | "name": "creator", 72 | "type": "address" 73 | }, 74 | { 75 | "indexed": true, 76 | "internalType": "uint256", 77 | "name": "tokenId", 78 | "type": "uint256" 79 | }, 80 | { 81 | "indexed": true, 82 | "internalType": "string", 83 | "name": "indexedTokenIPFSPath", 84 | "type": "string" 85 | }, 86 | { 87 | "indexed": false, 88 | "internalType": "string", 89 | "name": "tokenIPFSPath", 90 | "type": "string" 91 | } 92 | ], 93 | "name": "Minted", 94 | "type": "event" 95 | }, 96 | { 97 | "anonymous": false, 98 | "inputs": [ 99 | { 100 | "indexed": true, 101 | "internalType": "uint256", 102 | "name": "tokenId", 103 | "type": "uint256" 104 | }, 105 | { 106 | "indexed": true, 107 | "internalType": "address", 108 | "name": "originalAddress", 109 | "type": "address" 110 | }, 111 | { 112 | "indexed": true, 113 | "internalType": "address", 114 | "name": "newAddress", 115 | "type": "address" 116 | } 117 | ], 118 | "name": "NFTCreatorMigrated", 119 | "type": "event" 120 | }, 121 | { 122 | "anonymous": false, 123 | "inputs": [ 124 | { 125 | "indexed": true, 126 | "internalType": "address", 127 | "name": "nftMarket", 128 | "type": "address" 129 | } 130 | ], 131 | "name": "NFTMarketUpdated", 132 | "type": "event" 133 | }, 134 | { 135 | "anonymous": false, 136 | "inputs": [ 137 | { 138 | "indexed": false, 139 | "internalType": "string", 140 | "name": "name", 141 | "type": "string" 142 | }, 143 | { 144 | "indexed": false, 145 | "internalType": "string", 146 | "name": "symbol", 147 | "type": "string" 148 | }, 149 | { 150 | "indexed": false, 151 | "internalType": "string", 152 | "name": "baseURI", 153 | "type": "string" 154 | } 155 | ], 156 | "name": "NFTMetadataUpdated", 157 | "type": "event" 158 | }, 159 | { 160 | "anonymous": false, 161 | "inputs": [ 162 | { 163 | "indexed": true, 164 | "internalType": "uint256", 165 | "name": "tokenId", 166 | "type": "uint256" 167 | }, 168 | { 169 | "indexed": true, 170 | "internalType": "address", 171 | "name": "originalAddress", 172 | "type": "address" 173 | }, 174 | { 175 | "indexed": true, 176 | "internalType": "address", 177 | "name": "newAddress", 178 | "type": "address" 179 | } 180 | ], 181 | "name": "NFTOwnerMigrated", 182 | "type": "event" 183 | }, 184 | { 185 | "anonymous": false, 186 | "inputs": [ 187 | { 188 | "indexed": true, 189 | "internalType": "uint256", 190 | "name": "tokenId", 191 | "type": "uint256" 192 | }, 193 | { 194 | "indexed": true, 195 | "internalType": "address", 196 | "name": "originalAddress", 197 | "type": "address" 198 | }, 199 | { 200 | "indexed": true, 201 | "internalType": "address", 202 | "name": "newAddress", 203 | "type": "address" 204 | }, 205 | { 206 | "indexed": false, 207 | "internalType": "address", 208 | "name": "originalPaymentAddress", 209 | "type": "address" 210 | }, 211 | { 212 | "indexed": false, 213 | "internalType": "address", 214 | "name": "newPaymentAddress", 215 | "type": "address" 216 | } 217 | ], 218 | "name": "PaymentAddressMigrated", 219 | "type": "event" 220 | }, 221 | { 222 | "anonymous": false, 223 | "inputs": [ 224 | { 225 | "indexed": true, 226 | "internalType": "address", 227 | "name": "proxyCallContract", 228 | "type": "address" 229 | } 230 | ], 231 | "name": "ProxyCallContractUpdated", 232 | "type": "event" 233 | }, 234 | { 235 | "anonymous": false, 236 | "inputs": [ 237 | { 238 | "indexed": true, 239 | "internalType": "address", 240 | "name": "fromPaymentAddress", 241 | "type": "address" 242 | }, 243 | { 244 | "indexed": true, 245 | "internalType": "address", 246 | "name": "toPaymentAddress", 247 | "type": "address" 248 | }, 249 | { 250 | "indexed": true, 251 | "internalType": "uint256", 252 | "name": "tokenId", 253 | "type": "uint256" 254 | } 255 | ], 256 | "name": "TokenCreatorPaymentAddressSet", 257 | "type": "event" 258 | }, 259 | { 260 | "anonymous": false, 261 | "inputs": [ 262 | { 263 | "indexed": true, 264 | "internalType": "address", 265 | "name": "fromCreator", 266 | "type": "address" 267 | }, 268 | { 269 | "indexed": true, 270 | "internalType": "address", 271 | "name": "toCreator", 272 | "type": "address" 273 | }, 274 | { 275 | "indexed": true, 276 | "internalType": "uint256", 277 | "name": "tokenId", 278 | "type": "uint256" 279 | } 280 | ], 281 | "name": "TokenCreatorUpdated", 282 | "type": "event" 283 | }, 284 | { 285 | "anonymous": false, 286 | "inputs": [ 287 | { 288 | "indexed": true, 289 | "internalType": "uint256", 290 | "name": "tokenId", 291 | "type": "uint256" 292 | }, 293 | { 294 | "indexed": true, 295 | "internalType": "string", 296 | "name": "indexedTokenIPFSPath", 297 | "type": "string" 298 | }, 299 | { 300 | "indexed": false, 301 | "internalType": "string", 302 | "name": "tokenIPFSPath", 303 | "type": "string" 304 | } 305 | ], 306 | "name": "TokenIPFSPathUpdated", 307 | "type": "event" 308 | }, 309 | { 310 | "anonymous": false, 311 | "inputs": [ 312 | { 313 | "indexed": true, 314 | "internalType": "address", 315 | "name": "from", 316 | "type": "address" 317 | }, 318 | { 319 | "indexed": true, 320 | "internalType": "address", 321 | "name": "to", 322 | "type": "address" 323 | }, 324 | { 325 | "indexed": true, 326 | "internalType": "uint256", 327 | "name": "tokenId", 328 | "type": "uint256" 329 | } 330 | ], 331 | "name": "Transfer", 332 | "type": "event" 333 | }, 334 | { 335 | "inputs": [ 336 | { 337 | "internalType": "uint256[]", 338 | "name": "createdTokenIds", 339 | "type": "uint256[]" 340 | }, 341 | { 342 | "internalType": "uint256[]", 343 | "name": "ownedTokenIds", 344 | "type": "uint256[]" 345 | }, 346 | { 347 | "internalType": "address", 348 | "name": "originalAddress", 349 | "type": "address" 350 | }, 351 | { 352 | "internalType": "address payable", 353 | "name": "newAddress", 354 | "type": "address" 355 | }, 356 | { 357 | "internalType": "bytes", 358 | "name": "signature", 359 | "type": "bytes" 360 | } 361 | ], 362 | "name": "adminAccountMigration", 363 | "outputs": [], 364 | "stateMutability": "nonpayable", 365 | "type": "function" 366 | }, 367 | { 368 | "inputs": [ 369 | { 370 | "internalType": "uint256[]", 371 | "name": "paymentAddressTokenIds", 372 | "type": "uint256[]" 373 | }, 374 | { 375 | "internalType": "address", 376 | "name": "paymentAddressFactory", 377 | "type": "address" 378 | }, 379 | { 380 | "internalType": "bytes", 381 | "name": "paymentAddressCallData", 382 | "type": "bytes" 383 | }, 384 | { 385 | "internalType": "uint256", 386 | "name": "addressLocationInCallData", 387 | "type": "uint256" 388 | }, 389 | { 390 | "internalType": "address", 391 | "name": "originalAddress", 392 | "type": "address" 393 | }, 394 | { 395 | "internalType": "address payable", 396 | "name": "newAddress", 397 | "type": "address" 398 | }, 399 | { 400 | "internalType": "bytes", 401 | "name": "signature", 402 | "type": "bytes" 403 | } 404 | ], 405 | "name": "adminAccountMigrationForPaymentAddresses", 406 | "outputs": [], 407 | "stateMutability": "nonpayable", 408 | "type": "function" 409 | }, 410 | { 411 | "inputs": [ 412 | { 413 | "internalType": "address", 414 | "name": "_nftMarket", 415 | "type": "address" 416 | }, 417 | { 418 | "internalType": "string", 419 | "name": "baseURI", 420 | "type": "string" 421 | }, 422 | { 423 | "internalType": "address", 424 | "name": "proxyCallContract", 425 | "type": "address" 426 | } 427 | ], 428 | "name": "adminUpdateConfig", 429 | "outputs": [], 430 | "stateMutability": "nonpayable", 431 | "type": "function" 432 | }, 433 | { 434 | "inputs": [ 435 | { 436 | "internalType": "address", 437 | "name": "to", 438 | "type": "address" 439 | }, 440 | { 441 | "internalType": "uint256", 442 | "name": "tokenId", 443 | "type": "uint256" 444 | } 445 | ], 446 | "name": "approve", 447 | "outputs": [], 448 | "stateMutability": "nonpayable", 449 | "type": "function" 450 | }, 451 | { 452 | "inputs": [ 453 | { 454 | "internalType": "address", 455 | "name": "owner", 456 | "type": "address" 457 | } 458 | ], 459 | "name": "balanceOf", 460 | "outputs": [ 461 | { 462 | "internalType": "uint256", 463 | "name": "", 464 | "type": "uint256" 465 | } 466 | ], 467 | "stateMutability": "view", 468 | "type": "function" 469 | }, 470 | { 471 | "inputs": [], 472 | "name": "baseURI", 473 | "outputs": [ 474 | { 475 | "internalType": "string", 476 | "name": "", 477 | "type": "string" 478 | } 479 | ], 480 | "stateMutability": "view", 481 | "type": "function" 482 | }, 483 | { 484 | "inputs": [ 485 | { 486 | "internalType": "uint256", 487 | "name": "tokenId", 488 | "type": "uint256" 489 | } 490 | ], 491 | "name": "burn", 492 | "outputs": [], 493 | "stateMutability": "nonpayable", 494 | "type": "function" 495 | }, 496 | { 497 | "inputs": [ 498 | { 499 | "internalType": "uint256", 500 | "name": "tokenId", 501 | "type": "uint256" 502 | } 503 | ], 504 | "name": "getApproved", 505 | "outputs": [ 506 | { 507 | "internalType": "address", 508 | "name": "", 509 | "type": "address" 510 | } 511 | ], 512 | "stateMutability": "view", 513 | "type": "function" 514 | }, 515 | { 516 | "inputs": [ 517 | { 518 | "internalType": "uint256", 519 | "name": "", 520 | "type": "uint256" 521 | } 522 | ], 523 | "name": "getFeeBps", 524 | "outputs": [ 525 | { 526 | "internalType": "uint256[]", 527 | "name": "", 528 | "type": "uint256[]" 529 | } 530 | ], 531 | "stateMutability": "view", 532 | "type": "function" 533 | }, 534 | { 535 | "inputs": [ 536 | { 537 | "internalType": "uint256", 538 | "name": "id", 539 | "type": "uint256" 540 | } 541 | ], 542 | "name": "getFeeRecipients", 543 | "outputs": [ 544 | { 545 | "internalType": "address payable[]", 546 | "name": "", 547 | "type": "address[]" 548 | } 549 | ], 550 | "stateMutability": "view", 551 | "type": "function" 552 | }, 553 | { 554 | "inputs": [], 555 | "name": "getFoundationTreasury", 556 | "outputs": [ 557 | { 558 | "internalType": "address payable", 559 | "name": "", 560 | "type": "address" 561 | } 562 | ], 563 | "stateMutability": "view", 564 | "type": "function" 565 | }, 566 | { 567 | "inputs": [ 568 | { 569 | "internalType": "address", 570 | "name": "creator", 571 | "type": "address" 572 | }, 573 | { 574 | "internalType": "string", 575 | "name": "tokenIPFSPath", 576 | "type": "string" 577 | } 578 | ], 579 | "name": "getHasCreatorMintedIPFSHash", 580 | "outputs": [ 581 | { 582 | "internalType": "bool", 583 | "name": "", 584 | "type": "bool" 585 | } 586 | ], 587 | "stateMutability": "view", 588 | "type": "function" 589 | }, 590 | { 591 | "inputs": [], 592 | "name": "getNFTMarket", 593 | "outputs": [ 594 | { 595 | "internalType": "address", 596 | "name": "", 597 | "type": "address" 598 | } 599 | ], 600 | "stateMutability": "view", 601 | "type": "function" 602 | }, 603 | { 604 | "inputs": [], 605 | "name": "getNextTokenId", 606 | "outputs": [ 607 | { 608 | "internalType": "uint256", 609 | "name": "", 610 | "type": "uint256" 611 | } 612 | ], 613 | "stateMutability": "view", 614 | "type": "function" 615 | }, 616 | { 617 | "inputs": [ 618 | { 619 | "internalType": "uint256", 620 | "name": "tokenId", 621 | "type": "uint256" 622 | } 623 | ], 624 | "name": "getRoyalties", 625 | "outputs": [ 626 | { 627 | "internalType": "address payable[]", 628 | "name": "recipients", 629 | "type": "address[]" 630 | }, 631 | { 632 | "internalType": "uint256[]", 633 | "name": "feesInBasisPoints", 634 | "type": "uint256[]" 635 | } 636 | ], 637 | "stateMutability": "view", 638 | "type": "function" 639 | }, 640 | { 641 | "inputs": [ 642 | { 643 | "internalType": "uint256", 644 | "name": "tokenId", 645 | "type": "uint256" 646 | } 647 | ], 648 | "name": "getTokenCreatorPaymentAddress", 649 | "outputs": [ 650 | { 651 | "internalType": "address payable", 652 | "name": "tokenCreatorPaymentAddress", 653 | "type": "address" 654 | } 655 | ], 656 | "stateMutability": "view", 657 | "type": "function" 658 | }, 659 | { 660 | "inputs": [ 661 | { 662 | "internalType": "uint256", 663 | "name": "tokenId", 664 | "type": "uint256" 665 | } 666 | ], 667 | "name": "getTokenIPFSPath", 668 | "outputs": [ 669 | { 670 | "internalType": "string", 671 | "name": "", 672 | "type": "string" 673 | } 674 | ], 675 | "stateMutability": "view", 676 | "type": "function" 677 | }, 678 | { 679 | "inputs": [ 680 | { 681 | "internalType": "address payable", 682 | "name": "treasury", 683 | "type": "address" 684 | } 685 | ], 686 | "name": "initialize", 687 | "outputs": [], 688 | "stateMutability": "nonpayable", 689 | "type": "function" 690 | }, 691 | { 692 | "inputs": [ 693 | { 694 | "internalType": "address", 695 | "name": "owner", 696 | "type": "address" 697 | }, 698 | { 699 | "internalType": "address", 700 | "name": "operator", 701 | "type": "address" 702 | } 703 | ], 704 | "name": "isApprovedForAll", 705 | "outputs": [ 706 | { 707 | "internalType": "bool", 708 | "name": "", 709 | "type": "bool" 710 | } 711 | ], 712 | "stateMutability": "view", 713 | "type": "function" 714 | }, 715 | { 716 | "inputs": [ 717 | { 718 | "internalType": "string", 719 | "name": "tokenIPFSPath", 720 | "type": "string" 721 | } 722 | ], 723 | "name": "mint", 724 | "outputs": [ 725 | { 726 | "internalType": "uint256", 727 | "name": "tokenId", 728 | "type": "uint256" 729 | } 730 | ], 731 | "stateMutability": "nonpayable", 732 | "type": "function" 733 | }, 734 | { 735 | "inputs": [ 736 | { 737 | "internalType": "string", 738 | "name": "tokenIPFSPath", 739 | "type": "string" 740 | } 741 | ], 742 | "name": "mintAndApproveMarket", 743 | "outputs": [ 744 | { 745 | "internalType": "uint256", 746 | "name": "tokenId", 747 | "type": "uint256" 748 | } 749 | ], 750 | "stateMutability": "nonpayable", 751 | "type": "function" 752 | }, 753 | { 754 | "inputs": [ 755 | { 756 | "internalType": "string", 757 | "name": "tokenIPFSPath", 758 | "type": "string" 759 | }, 760 | { 761 | "internalType": "address payable", 762 | "name": "tokenCreatorPaymentAddress", 763 | "type": "address" 764 | } 765 | ], 766 | "name": "mintWithCreatorPaymentAddress", 767 | "outputs": [ 768 | { 769 | "internalType": "uint256", 770 | "name": "tokenId", 771 | "type": "uint256" 772 | } 773 | ], 774 | "stateMutability": "nonpayable", 775 | "type": "function" 776 | }, 777 | { 778 | "inputs": [ 779 | { 780 | "internalType": "string", 781 | "name": "tokenIPFSPath", 782 | "type": "string" 783 | }, 784 | { 785 | "internalType": "address payable", 786 | "name": "tokenCreatorPaymentAddress", 787 | "type": "address" 788 | } 789 | ], 790 | "name": "mintWithCreatorPaymentAddressAndApproveMarket", 791 | "outputs": [ 792 | { 793 | "internalType": "uint256", 794 | "name": "tokenId", 795 | "type": "uint256" 796 | } 797 | ], 798 | "stateMutability": "nonpayable", 799 | "type": "function" 800 | }, 801 | { 802 | "inputs": [ 803 | { 804 | "internalType": "string", 805 | "name": "tokenIPFSPath", 806 | "type": "string" 807 | }, 808 | { 809 | "internalType": "address", 810 | "name": "paymentAddressFactory", 811 | "type": "address" 812 | }, 813 | { 814 | "internalType": "bytes", 815 | "name": "paymentAddressCallData", 816 | "type": "bytes" 817 | } 818 | ], 819 | "name": "mintWithCreatorPaymentFactory", 820 | "outputs": [ 821 | { 822 | "internalType": "uint256", 823 | "name": "tokenId", 824 | "type": "uint256" 825 | } 826 | ], 827 | "stateMutability": "nonpayable", 828 | "type": "function" 829 | }, 830 | { 831 | "inputs": [ 832 | { 833 | "internalType": "string", 834 | "name": "tokenIPFSPath", 835 | "type": "string" 836 | }, 837 | { 838 | "internalType": "address", 839 | "name": "paymentAddressFactory", 840 | "type": "address" 841 | }, 842 | { 843 | "internalType": "bytes", 844 | "name": "paymentAddressCallData", 845 | "type": "bytes" 846 | } 847 | ], 848 | "name": "mintWithCreatorPaymentFactoryAndApproveMarket", 849 | "outputs": [ 850 | { 851 | "internalType": "uint256", 852 | "name": "tokenId", 853 | "type": "uint256" 854 | } 855 | ], 856 | "stateMutability": "nonpayable", 857 | "type": "function" 858 | }, 859 | { 860 | "inputs": [], 861 | "name": "name", 862 | "outputs": [ 863 | { 864 | "internalType": "string", 865 | "name": "", 866 | "type": "string" 867 | } 868 | ], 869 | "stateMutability": "pure", 870 | "type": "function" 871 | }, 872 | { 873 | "inputs": [ 874 | { 875 | "internalType": "uint256", 876 | "name": "tokenId", 877 | "type": "uint256" 878 | } 879 | ], 880 | "name": "ownerOf", 881 | "outputs": [ 882 | { 883 | "internalType": "address", 884 | "name": "", 885 | "type": "address" 886 | } 887 | ], 888 | "stateMutability": "view", 889 | "type": "function" 890 | }, 891 | { 892 | "inputs": [], 893 | "name": "proxyCallAddress", 894 | "outputs": [ 895 | { 896 | "internalType": "address", 897 | "name": "", 898 | "type": "address" 899 | } 900 | ], 901 | "stateMutability": "view", 902 | "type": "function" 903 | }, 904 | { 905 | "inputs": [ 906 | { 907 | "internalType": "address", 908 | "name": "from", 909 | "type": "address" 910 | }, 911 | { 912 | "internalType": "address", 913 | "name": "to", 914 | "type": "address" 915 | }, 916 | { 917 | "internalType": "uint256", 918 | "name": "tokenId", 919 | "type": "uint256" 920 | } 921 | ], 922 | "name": "safeTransferFrom", 923 | "outputs": [], 924 | "stateMutability": "nonpayable", 925 | "type": "function" 926 | }, 927 | { 928 | "inputs": [ 929 | { 930 | "internalType": "address", 931 | "name": "from", 932 | "type": "address" 933 | }, 934 | { 935 | "internalType": "address", 936 | "name": "to", 937 | "type": "address" 938 | }, 939 | { 940 | "internalType": "uint256", 941 | "name": "tokenId", 942 | "type": "uint256" 943 | }, 944 | { 945 | "internalType": "bytes", 946 | "name": "_data", 947 | "type": "bytes" 948 | } 949 | ], 950 | "name": "safeTransferFrom", 951 | "outputs": [], 952 | "stateMutability": "nonpayable", 953 | "type": "function" 954 | }, 955 | { 956 | "inputs": [ 957 | { 958 | "internalType": "address", 959 | "name": "operator", 960 | "type": "address" 961 | }, 962 | { 963 | "internalType": "bool", 964 | "name": "approved", 965 | "type": "bool" 966 | } 967 | ], 968 | "name": "setApprovalForAll", 969 | "outputs": [], 970 | "stateMutability": "nonpayable", 971 | "type": "function" 972 | }, 973 | { 974 | "inputs": [ 975 | { 976 | "internalType": "bytes4", 977 | "name": "interfaceId", 978 | "type": "bytes4" 979 | } 980 | ], 981 | "name": "supportsInterface", 982 | "outputs": [ 983 | { 984 | "internalType": "bool", 985 | "name": "", 986 | "type": "bool" 987 | } 988 | ], 989 | "stateMutability": "view", 990 | "type": "function" 991 | }, 992 | { 993 | "inputs": [], 994 | "name": "symbol", 995 | "outputs": [ 996 | { 997 | "internalType": "string", 998 | "name": "", 999 | "type": "string" 1000 | } 1001 | ], 1002 | "stateMutability": "pure", 1003 | "type": "function" 1004 | }, 1005 | { 1006 | "inputs": [ 1007 | { 1008 | "internalType": "uint256", 1009 | "name": "index", 1010 | "type": "uint256" 1011 | } 1012 | ], 1013 | "name": "tokenByIndex", 1014 | "outputs": [ 1015 | { 1016 | "internalType": "uint256", 1017 | "name": "", 1018 | "type": "uint256" 1019 | } 1020 | ], 1021 | "stateMutability": "view", 1022 | "type": "function" 1023 | }, 1024 | { 1025 | "inputs": [ 1026 | { 1027 | "internalType": "uint256", 1028 | "name": "tokenId", 1029 | "type": "uint256" 1030 | } 1031 | ], 1032 | "name": "tokenCreator", 1033 | "outputs": [ 1034 | { 1035 | "internalType": "address payable", 1036 | "name": "", 1037 | "type": "address" 1038 | } 1039 | ], 1040 | "stateMutability": "view", 1041 | "type": "function" 1042 | }, 1043 | { 1044 | "inputs": [ 1045 | { 1046 | "internalType": "address", 1047 | "name": "owner", 1048 | "type": "address" 1049 | }, 1050 | { 1051 | "internalType": "uint256", 1052 | "name": "index", 1053 | "type": "uint256" 1054 | } 1055 | ], 1056 | "name": "tokenOfOwnerByIndex", 1057 | "outputs": [ 1058 | { 1059 | "internalType": "uint256", 1060 | "name": "", 1061 | "type": "uint256" 1062 | } 1063 | ], 1064 | "stateMutability": "view", 1065 | "type": "function" 1066 | }, 1067 | { 1068 | "inputs": [ 1069 | { 1070 | "internalType": "uint256", 1071 | "name": "tokenId", 1072 | "type": "uint256" 1073 | } 1074 | ], 1075 | "name": "tokenURI", 1076 | "outputs": [ 1077 | { 1078 | "internalType": "string", 1079 | "name": "", 1080 | "type": "string" 1081 | } 1082 | ], 1083 | "stateMutability": "view", 1084 | "type": "function" 1085 | }, 1086 | { 1087 | "inputs": [], 1088 | "name": "totalSupply", 1089 | "outputs": [ 1090 | { 1091 | "internalType": "uint256", 1092 | "name": "", 1093 | "type": "uint256" 1094 | } 1095 | ], 1096 | "stateMutability": "view", 1097 | "type": "function" 1098 | }, 1099 | { 1100 | "inputs": [ 1101 | { 1102 | "internalType": "address", 1103 | "name": "from", 1104 | "type": "address" 1105 | }, 1106 | { 1107 | "internalType": "address", 1108 | "name": "to", 1109 | "type": "address" 1110 | }, 1111 | { 1112 | "internalType": "uint256", 1113 | "name": "tokenId", 1114 | "type": "uint256" 1115 | } 1116 | ], 1117 | "name": "transferFrom", 1118 | "outputs": [], 1119 | "stateMutability": "nonpayable", 1120 | "type": "function" 1121 | } 1122 | ] -------------------------------------------------------------------------------- /Foundationsubgraph/generated/Token/Token.ts: -------------------------------------------------------------------------------- 1 | // THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | 3 | import { 4 | ethereum, 5 | JSONValue, 6 | TypedMap, 7 | Entity, 8 | Bytes, 9 | Address, 10 | BigInt 11 | } from "@graphprotocol/graph-ts"; 12 | 13 | export class Approval extends ethereum.Event { 14 | get params(): Approval__Params { 15 | return new Approval__Params(this); 16 | } 17 | } 18 | 19 | export class Approval__Params { 20 | _event: Approval; 21 | 22 | constructor(event: Approval) { 23 | this._event = event; 24 | } 25 | 26 | get owner(): Address { 27 | return this._event.parameters[0].value.toAddress(); 28 | } 29 | 30 | get approved(): Address { 31 | return this._event.parameters[1].value.toAddress(); 32 | } 33 | 34 | get tokenId(): BigInt { 35 | return this._event.parameters[2].value.toBigInt(); 36 | } 37 | } 38 | 39 | export class ApprovalForAll extends ethereum.Event { 40 | get params(): ApprovalForAll__Params { 41 | return new ApprovalForAll__Params(this); 42 | } 43 | } 44 | 45 | export class ApprovalForAll__Params { 46 | _event: ApprovalForAll; 47 | 48 | constructor(event: ApprovalForAll) { 49 | this._event = event; 50 | } 51 | 52 | get owner(): Address { 53 | return this._event.parameters[0].value.toAddress(); 54 | } 55 | 56 | get operator(): Address { 57 | return this._event.parameters[1].value.toAddress(); 58 | } 59 | 60 | get approved(): boolean { 61 | return this._event.parameters[2].value.toBoolean(); 62 | } 63 | } 64 | 65 | export class BaseURIUpdated extends ethereum.Event { 66 | get params(): BaseURIUpdated__Params { 67 | return new BaseURIUpdated__Params(this); 68 | } 69 | } 70 | 71 | export class BaseURIUpdated__Params { 72 | _event: BaseURIUpdated; 73 | 74 | constructor(event: BaseURIUpdated) { 75 | this._event = event; 76 | } 77 | 78 | get baseURI(): string { 79 | return this._event.parameters[0].value.toString(); 80 | } 81 | } 82 | 83 | export class Minted extends ethereum.Event { 84 | get params(): Minted__Params { 85 | return new Minted__Params(this); 86 | } 87 | } 88 | 89 | export class Minted__Params { 90 | _event: Minted; 91 | 92 | constructor(event: Minted) { 93 | this._event = event; 94 | } 95 | 96 | get creator(): Address { 97 | return this._event.parameters[0].value.toAddress(); 98 | } 99 | 100 | get tokenId(): BigInt { 101 | return this._event.parameters[1].value.toBigInt(); 102 | } 103 | 104 | get indexedTokenIPFSPath(): Bytes { 105 | return this._event.parameters[2].value.toBytes(); 106 | } 107 | 108 | get tokenIPFSPath(): string { 109 | return this._event.parameters[3].value.toString(); 110 | } 111 | } 112 | 113 | export class NFTCreatorMigrated extends ethereum.Event { 114 | get params(): NFTCreatorMigrated__Params { 115 | return new NFTCreatorMigrated__Params(this); 116 | } 117 | } 118 | 119 | export class NFTCreatorMigrated__Params { 120 | _event: NFTCreatorMigrated; 121 | 122 | constructor(event: NFTCreatorMigrated) { 123 | this._event = event; 124 | } 125 | 126 | get tokenId(): BigInt { 127 | return this._event.parameters[0].value.toBigInt(); 128 | } 129 | 130 | get originalAddress(): Address { 131 | return this._event.parameters[1].value.toAddress(); 132 | } 133 | 134 | get newAddress(): Address { 135 | return this._event.parameters[2].value.toAddress(); 136 | } 137 | } 138 | 139 | export class NFTMarketUpdated extends ethereum.Event { 140 | get params(): NFTMarketUpdated__Params { 141 | return new NFTMarketUpdated__Params(this); 142 | } 143 | } 144 | 145 | export class NFTMarketUpdated__Params { 146 | _event: NFTMarketUpdated; 147 | 148 | constructor(event: NFTMarketUpdated) { 149 | this._event = event; 150 | } 151 | 152 | get nftMarket(): Address { 153 | return this._event.parameters[0].value.toAddress(); 154 | } 155 | } 156 | 157 | export class NFTMetadataUpdated extends ethereum.Event { 158 | get params(): NFTMetadataUpdated__Params { 159 | return new NFTMetadataUpdated__Params(this); 160 | } 161 | } 162 | 163 | export class NFTMetadataUpdated__Params { 164 | _event: NFTMetadataUpdated; 165 | 166 | constructor(event: NFTMetadataUpdated) { 167 | this._event = event; 168 | } 169 | 170 | get name(): string { 171 | return this._event.parameters[0].value.toString(); 172 | } 173 | 174 | get symbol(): string { 175 | return this._event.parameters[1].value.toString(); 176 | } 177 | 178 | get baseURI(): string { 179 | return this._event.parameters[2].value.toString(); 180 | } 181 | } 182 | 183 | export class NFTOwnerMigrated extends ethereum.Event { 184 | get params(): NFTOwnerMigrated__Params { 185 | return new NFTOwnerMigrated__Params(this); 186 | } 187 | } 188 | 189 | export class NFTOwnerMigrated__Params { 190 | _event: NFTOwnerMigrated; 191 | 192 | constructor(event: NFTOwnerMigrated) { 193 | this._event = event; 194 | } 195 | 196 | get tokenId(): BigInt { 197 | return this._event.parameters[0].value.toBigInt(); 198 | } 199 | 200 | get originalAddress(): Address { 201 | return this._event.parameters[1].value.toAddress(); 202 | } 203 | 204 | get newAddress(): Address { 205 | return this._event.parameters[2].value.toAddress(); 206 | } 207 | } 208 | 209 | export class PaymentAddressMigrated extends ethereum.Event { 210 | get params(): PaymentAddressMigrated__Params { 211 | return new PaymentAddressMigrated__Params(this); 212 | } 213 | } 214 | 215 | export class PaymentAddressMigrated__Params { 216 | _event: PaymentAddressMigrated; 217 | 218 | constructor(event: PaymentAddressMigrated) { 219 | this._event = event; 220 | } 221 | 222 | get tokenId(): BigInt { 223 | return this._event.parameters[0].value.toBigInt(); 224 | } 225 | 226 | get originalAddress(): Address { 227 | return this._event.parameters[1].value.toAddress(); 228 | } 229 | 230 | get newAddress(): Address { 231 | return this._event.parameters[2].value.toAddress(); 232 | } 233 | 234 | get originalPaymentAddress(): Address { 235 | return this._event.parameters[3].value.toAddress(); 236 | } 237 | 238 | get newPaymentAddress(): Address { 239 | return this._event.parameters[4].value.toAddress(); 240 | } 241 | } 242 | 243 | export class ProxyCallContractUpdated extends ethereum.Event { 244 | get params(): ProxyCallContractUpdated__Params { 245 | return new ProxyCallContractUpdated__Params(this); 246 | } 247 | } 248 | 249 | export class ProxyCallContractUpdated__Params { 250 | _event: ProxyCallContractUpdated; 251 | 252 | constructor(event: ProxyCallContractUpdated) { 253 | this._event = event; 254 | } 255 | 256 | get proxyCallContract(): Address { 257 | return this._event.parameters[0].value.toAddress(); 258 | } 259 | } 260 | 261 | export class TokenCreatorPaymentAddressSet extends ethereum.Event { 262 | get params(): TokenCreatorPaymentAddressSet__Params { 263 | return new TokenCreatorPaymentAddressSet__Params(this); 264 | } 265 | } 266 | 267 | export class TokenCreatorPaymentAddressSet__Params { 268 | _event: TokenCreatorPaymentAddressSet; 269 | 270 | constructor(event: TokenCreatorPaymentAddressSet) { 271 | this._event = event; 272 | } 273 | 274 | get fromPaymentAddress(): Address { 275 | return this._event.parameters[0].value.toAddress(); 276 | } 277 | 278 | get toPaymentAddress(): Address { 279 | return this._event.parameters[1].value.toAddress(); 280 | } 281 | 282 | get tokenId(): BigInt { 283 | return this._event.parameters[2].value.toBigInt(); 284 | } 285 | } 286 | 287 | export class TokenCreatorUpdated extends ethereum.Event { 288 | get params(): TokenCreatorUpdated__Params { 289 | return new TokenCreatorUpdated__Params(this); 290 | } 291 | } 292 | 293 | export class TokenCreatorUpdated__Params { 294 | _event: TokenCreatorUpdated; 295 | 296 | constructor(event: TokenCreatorUpdated) { 297 | this._event = event; 298 | } 299 | 300 | get fromCreator(): Address { 301 | return this._event.parameters[0].value.toAddress(); 302 | } 303 | 304 | get toCreator(): Address { 305 | return this._event.parameters[1].value.toAddress(); 306 | } 307 | 308 | get tokenId(): BigInt { 309 | return this._event.parameters[2].value.toBigInt(); 310 | } 311 | } 312 | 313 | export class TokenIPFSPathUpdated extends ethereum.Event { 314 | get params(): TokenIPFSPathUpdated__Params { 315 | return new TokenIPFSPathUpdated__Params(this); 316 | } 317 | } 318 | 319 | export class TokenIPFSPathUpdated__Params { 320 | _event: TokenIPFSPathUpdated; 321 | 322 | constructor(event: TokenIPFSPathUpdated) { 323 | this._event = event; 324 | } 325 | 326 | get tokenId(): BigInt { 327 | return this._event.parameters[0].value.toBigInt(); 328 | } 329 | 330 | get indexedTokenIPFSPath(): Bytes { 331 | return this._event.parameters[1].value.toBytes(); 332 | } 333 | 334 | get tokenIPFSPath(): string { 335 | return this._event.parameters[2].value.toString(); 336 | } 337 | } 338 | 339 | export class Transfer extends ethereum.Event { 340 | get params(): Transfer__Params { 341 | return new Transfer__Params(this); 342 | } 343 | } 344 | 345 | export class Transfer__Params { 346 | _event: Transfer; 347 | 348 | constructor(event: Transfer) { 349 | this._event = event; 350 | } 351 | 352 | get from(): Address { 353 | return this._event.parameters[0].value.toAddress(); 354 | } 355 | 356 | get to(): Address { 357 | return this._event.parameters[1].value.toAddress(); 358 | } 359 | 360 | get tokenId(): BigInt { 361 | return this._event.parameters[2].value.toBigInt(); 362 | } 363 | } 364 | 365 | export class Token__getRoyaltiesResult { 366 | value0: Array
; 367 | value1: Array; 368 | 369 | constructor(value0: Array
, value1: Array) { 370 | this.value0 = value0; 371 | this.value1 = value1; 372 | } 373 | 374 | toMap(): TypedMap { 375 | let map = new TypedMap(); 376 | map.set("value0", ethereum.Value.fromAddressArray(this.value0)); 377 | map.set("value1", ethereum.Value.fromUnsignedBigIntArray(this.value1)); 378 | return map; 379 | } 380 | } 381 | 382 | export class Token extends ethereum.SmartContract { 383 | static bind(address: Address): Token { 384 | return new Token("Token", address); 385 | } 386 | 387 | balanceOf(owner: Address): BigInt { 388 | let result = super.call("balanceOf", "balanceOf(address):(uint256)", [ 389 | ethereum.Value.fromAddress(owner) 390 | ]); 391 | 392 | return result[0].toBigInt(); 393 | } 394 | 395 | try_balanceOf(owner: Address): ethereum.CallResult { 396 | let result = super.tryCall("balanceOf", "balanceOf(address):(uint256)", [ 397 | ethereum.Value.fromAddress(owner) 398 | ]); 399 | if (result.reverted) { 400 | return new ethereum.CallResult(); 401 | } 402 | let value = result.value; 403 | return ethereum.CallResult.fromValue(value[0].toBigInt()); 404 | } 405 | 406 | baseURI(): string { 407 | let result = super.call("baseURI", "baseURI():(string)", []); 408 | 409 | return result[0].toString(); 410 | } 411 | 412 | try_baseURI(): ethereum.CallResult { 413 | let result = super.tryCall("baseURI", "baseURI():(string)", []); 414 | if (result.reverted) { 415 | return new ethereum.CallResult(); 416 | } 417 | let value = result.value; 418 | return ethereum.CallResult.fromValue(value[0].toString()); 419 | } 420 | 421 | getApproved(tokenId: BigInt): Address { 422 | let result = super.call("getApproved", "getApproved(uint256):(address)", [ 423 | ethereum.Value.fromUnsignedBigInt(tokenId) 424 | ]); 425 | 426 | return result[0].toAddress(); 427 | } 428 | 429 | try_getApproved(tokenId: BigInt): ethereum.CallResult
{ 430 | let result = super.tryCall( 431 | "getApproved", 432 | "getApproved(uint256):(address)", 433 | [ethereum.Value.fromUnsignedBigInt(tokenId)] 434 | ); 435 | if (result.reverted) { 436 | return new ethereum.CallResult(); 437 | } 438 | let value = result.value; 439 | return ethereum.CallResult.fromValue(value[0].toAddress()); 440 | } 441 | 442 | getFeeBps(param0: BigInt): Array { 443 | let result = super.call("getFeeBps", "getFeeBps(uint256):(uint256[])", [ 444 | ethereum.Value.fromUnsignedBigInt(param0) 445 | ]); 446 | 447 | return result[0].toBigIntArray(); 448 | } 449 | 450 | try_getFeeBps(param0: BigInt): ethereum.CallResult> { 451 | let result = super.tryCall("getFeeBps", "getFeeBps(uint256):(uint256[])", [ 452 | ethereum.Value.fromUnsignedBigInt(param0) 453 | ]); 454 | if (result.reverted) { 455 | return new ethereum.CallResult(); 456 | } 457 | let value = result.value; 458 | return ethereum.CallResult.fromValue(value[0].toBigIntArray()); 459 | } 460 | 461 | getFeeRecipients(id: BigInt): Array
{ 462 | let result = super.call( 463 | "getFeeRecipients", 464 | "getFeeRecipients(uint256):(address[])", 465 | [ethereum.Value.fromUnsignedBigInt(id)] 466 | ); 467 | 468 | return result[0].toAddressArray(); 469 | } 470 | 471 | try_getFeeRecipients(id: BigInt): ethereum.CallResult> { 472 | let result = super.tryCall( 473 | "getFeeRecipients", 474 | "getFeeRecipients(uint256):(address[])", 475 | [ethereum.Value.fromUnsignedBigInt(id)] 476 | ); 477 | if (result.reverted) { 478 | return new ethereum.CallResult(); 479 | } 480 | let value = result.value; 481 | return ethereum.CallResult.fromValue(value[0].toAddressArray()); 482 | } 483 | 484 | getFoundationTreasury(): Address { 485 | let result = super.call( 486 | "getFoundationTreasury", 487 | "getFoundationTreasury():(address)", 488 | [] 489 | ); 490 | 491 | return result[0].toAddress(); 492 | } 493 | 494 | try_getFoundationTreasury(): ethereum.CallResult
{ 495 | let result = super.tryCall( 496 | "getFoundationTreasury", 497 | "getFoundationTreasury():(address)", 498 | [] 499 | ); 500 | if (result.reverted) { 501 | return new ethereum.CallResult(); 502 | } 503 | let value = result.value; 504 | return ethereum.CallResult.fromValue(value[0].toAddress()); 505 | } 506 | 507 | getHasCreatorMintedIPFSHash( 508 | creator: Address, 509 | tokenIPFSPath: string 510 | ): boolean { 511 | let result = super.call( 512 | "getHasCreatorMintedIPFSHash", 513 | "getHasCreatorMintedIPFSHash(address,string):(bool)", 514 | [ 515 | ethereum.Value.fromAddress(creator), 516 | ethereum.Value.fromString(tokenIPFSPath) 517 | ] 518 | ); 519 | 520 | return result[0].toBoolean(); 521 | } 522 | 523 | try_getHasCreatorMintedIPFSHash( 524 | creator: Address, 525 | tokenIPFSPath: string 526 | ): ethereum.CallResult { 527 | let result = super.tryCall( 528 | "getHasCreatorMintedIPFSHash", 529 | "getHasCreatorMintedIPFSHash(address,string):(bool)", 530 | [ 531 | ethereum.Value.fromAddress(creator), 532 | ethereum.Value.fromString(tokenIPFSPath) 533 | ] 534 | ); 535 | if (result.reverted) { 536 | return new ethereum.CallResult(); 537 | } 538 | let value = result.value; 539 | return ethereum.CallResult.fromValue(value[0].toBoolean()); 540 | } 541 | 542 | getNFTMarket(): Address { 543 | let result = super.call("getNFTMarket", "getNFTMarket():(address)", []); 544 | 545 | return result[0].toAddress(); 546 | } 547 | 548 | try_getNFTMarket(): ethereum.CallResult
{ 549 | let result = super.tryCall("getNFTMarket", "getNFTMarket():(address)", []); 550 | if (result.reverted) { 551 | return new ethereum.CallResult(); 552 | } 553 | let value = result.value; 554 | return ethereum.CallResult.fromValue(value[0].toAddress()); 555 | } 556 | 557 | getNextTokenId(): BigInt { 558 | let result = super.call("getNextTokenId", "getNextTokenId():(uint256)", []); 559 | 560 | return result[0].toBigInt(); 561 | } 562 | 563 | try_getNextTokenId(): ethereum.CallResult { 564 | let result = super.tryCall( 565 | "getNextTokenId", 566 | "getNextTokenId():(uint256)", 567 | [] 568 | ); 569 | if (result.reverted) { 570 | return new ethereum.CallResult(); 571 | } 572 | let value = result.value; 573 | return ethereum.CallResult.fromValue(value[0].toBigInt()); 574 | } 575 | 576 | getRoyalties(tokenId: BigInt): Token__getRoyaltiesResult { 577 | let result = super.call( 578 | "getRoyalties", 579 | "getRoyalties(uint256):(address[],uint256[])", 580 | [ethereum.Value.fromUnsignedBigInt(tokenId)] 581 | ); 582 | 583 | return new Token__getRoyaltiesResult( 584 | result[0].toAddressArray(), 585 | result[1].toBigIntArray() 586 | ); 587 | } 588 | 589 | try_getRoyalties( 590 | tokenId: BigInt 591 | ): ethereum.CallResult { 592 | let result = super.tryCall( 593 | "getRoyalties", 594 | "getRoyalties(uint256):(address[],uint256[])", 595 | [ethereum.Value.fromUnsignedBigInt(tokenId)] 596 | ); 597 | if (result.reverted) { 598 | return new ethereum.CallResult(); 599 | } 600 | let value = result.value; 601 | return ethereum.CallResult.fromValue( 602 | new Token__getRoyaltiesResult( 603 | value[0].toAddressArray(), 604 | value[1].toBigIntArray() 605 | ) 606 | ); 607 | } 608 | 609 | getTokenCreatorPaymentAddress(tokenId: BigInt): Address { 610 | let result = super.call( 611 | "getTokenCreatorPaymentAddress", 612 | "getTokenCreatorPaymentAddress(uint256):(address)", 613 | [ethereum.Value.fromUnsignedBigInt(tokenId)] 614 | ); 615 | 616 | return result[0].toAddress(); 617 | } 618 | 619 | try_getTokenCreatorPaymentAddress( 620 | tokenId: BigInt 621 | ): ethereum.CallResult
{ 622 | let result = super.tryCall( 623 | "getTokenCreatorPaymentAddress", 624 | "getTokenCreatorPaymentAddress(uint256):(address)", 625 | [ethereum.Value.fromUnsignedBigInt(tokenId)] 626 | ); 627 | if (result.reverted) { 628 | return new ethereum.CallResult(); 629 | } 630 | let value = result.value; 631 | return ethereum.CallResult.fromValue(value[0].toAddress()); 632 | } 633 | 634 | getTokenIPFSPath(tokenId: BigInt): string { 635 | let result = super.call( 636 | "getTokenIPFSPath", 637 | "getTokenIPFSPath(uint256):(string)", 638 | [ethereum.Value.fromUnsignedBigInt(tokenId)] 639 | ); 640 | 641 | return result[0].toString(); 642 | } 643 | 644 | try_getTokenIPFSPath(tokenId: BigInt): ethereum.CallResult { 645 | let result = super.tryCall( 646 | "getTokenIPFSPath", 647 | "getTokenIPFSPath(uint256):(string)", 648 | [ethereum.Value.fromUnsignedBigInt(tokenId)] 649 | ); 650 | if (result.reverted) { 651 | return new ethereum.CallResult(); 652 | } 653 | let value = result.value; 654 | return ethereum.CallResult.fromValue(value[0].toString()); 655 | } 656 | 657 | isApprovedForAll(owner: Address, operator: Address): boolean { 658 | let result = super.call( 659 | "isApprovedForAll", 660 | "isApprovedForAll(address,address):(bool)", 661 | [ethereum.Value.fromAddress(owner), ethereum.Value.fromAddress(operator)] 662 | ); 663 | 664 | return result[0].toBoolean(); 665 | } 666 | 667 | try_isApprovedForAll( 668 | owner: Address, 669 | operator: Address 670 | ): ethereum.CallResult { 671 | let result = super.tryCall( 672 | "isApprovedForAll", 673 | "isApprovedForAll(address,address):(bool)", 674 | [ethereum.Value.fromAddress(owner), ethereum.Value.fromAddress(operator)] 675 | ); 676 | if (result.reverted) { 677 | return new ethereum.CallResult(); 678 | } 679 | let value = result.value; 680 | return ethereum.CallResult.fromValue(value[0].toBoolean()); 681 | } 682 | 683 | mint(tokenIPFSPath: string): BigInt { 684 | let result = super.call("mint", "mint(string):(uint256)", [ 685 | ethereum.Value.fromString(tokenIPFSPath) 686 | ]); 687 | 688 | return result[0].toBigInt(); 689 | } 690 | 691 | try_mint(tokenIPFSPath: string): ethereum.CallResult { 692 | let result = super.tryCall("mint", "mint(string):(uint256)", [ 693 | ethereum.Value.fromString(tokenIPFSPath) 694 | ]); 695 | if (result.reverted) { 696 | return new ethereum.CallResult(); 697 | } 698 | let value = result.value; 699 | return ethereum.CallResult.fromValue(value[0].toBigInt()); 700 | } 701 | 702 | mintAndApproveMarket(tokenIPFSPath: string): BigInt { 703 | let result = super.call( 704 | "mintAndApproveMarket", 705 | "mintAndApproveMarket(string):(uint256)", 706 | [ethereum.Value.fromString(tokenIPFSPath)] 707 | ); 708 | 709 | return result[0].toBigInt(); 710 | } 711 | 712 | try_mintAndApproveMarket(tokenIPFSPath: string): ethereum.CallResult { 713 | let result = super.tryCall( 714 | "mintAndApproveMarket", 715 | "mintAndApproveMarket(string):(uint256)", 716 | [ethereum.Value.fromString(tokenIPFSPath)] 717 | ); 718 | if (result.reverted) { 719 | return new ethereum.CallResult(); 720 | } 721 | let value = result.value; 722 | return ethereum.CallResult.fromValue(value[0].toBigInt()); 723 | } 724 | 725 | mintWithCreatorPaymentAddress( 726 | tokenIPFSPath: string, 727 | tokenCreatorPaymentAddress: Address 728 | ): BigInt { 729 | let result = super.call( 730 | "mintWithCreatorPaymentAddress", 731 | "mintWithCreatorPaymentAddress(string,address):(uint256)", 732 | [ 733 | ethereum.Value.fromString(tokenIPFSPath), 734 | ethereum.Value.fromAddress(tokenCreatorPaymentAddress) 735 | ] 736 | ); 737 | 738 | return result[0].toBigInt(); 739 | } 740 | 741 | try_mintWithCreatorPaymentAddress( 742 | tokenIPFSPath: string, 743 | tokenCreatorPaymentAddress: Address 744 | ): ethereum.CallResult { 745 | let result = super.tryCall( 746 | "mintWithCreatorPaymentAddress", 747 | "mintWithCreatorPaymentAddress(string,address):(uint256)", 748 | [ 749 | ethereum.Value.fromString(tokenIPFSPath), 750 | ethereum.Value.fromAddress(tokenCreatorPaymentAddress) 751 | ] 752 | ); 753 | if (result.reverted) { 754 | return new ethereum.CallResult(); 755 | } 756 | let value = result.value; 757 | return ethereum.CallResult.fromValue(value[0].toBigInt()); 758 | } 759 | 760 | mintWithCreatorPaymentAddressAndApproveMarket( 761 | tokenIPFSPath: string, 762 | tokenCreatorPaymentAddress: Address 763 | ): BigInt { 764 | let result = super.call( 765 | "mintWithCreatorPaymentAddressAndApproveMarket", 766 | "mintWithCreatorPaymentAddressAndApproveMarket(string,address):(uint256)", 767 | [ 768 | ethereum.Value.fromString(tokenIPFSPath), 769 | ethereum.Value.fromAddress(tokenCreatorPaymentAddress) 770 | ] 771 | ); 772 | 773 | return result[0].toBigInt(); 774 | } 775 | 776 | try_mintWithCreatorPaymentAddressAndApproveMarket( 777 | tokenIPFSPath: string, 778 | tokenCreatorPaymentAddress: Address 779 | ): ethereum.CallResult { 780 | let result = super.tryCall( 781 | "mintWithCreatorPaymentAddressAndApproveMarket", 782 | "mintWithCreatorPaymentAddressAndApproveMarket(string,address):(uint256)", 783 | [ 784 | ethereum.Value.fromString(tokenIPFSPath), 785 | ethereum.Value.fromAddress(tokenCreatorPaymentAddress) 786 | ] 787 | ); 788 | if (result.reverted) { 789 | return new ethereum.CallResult(); 790 | } 791 | let value = result.value; 792 | return ethereum.CallResult.fromValue(value[0].toBigInt()); 793 | } 794 | 795 | mintWithCreatorPaymentFactory( 796 | tokenIPFSPath: string, 797 | paymentAddressFactory: Address, 798 | paymentAddressCallData: Bytes 799 | ): BigInt { 800 | let result = super.call( 801 | "mintWithCreatorPaymentFactory", 802 | "mintWithCreatorPaymentFactory(string,address,bytes):(uint256)", 803 | [ 804 | ethereum.Value.fromString(tokenIPFSPath), 805 | ethereum.Value.fromAddress(paymentAddressFactory), 806 | ethereum.Value.fromBytes(paymentAddressCallData) 807 | ] 808 | ); 809 | 810 | return result[0].toBigInt(); 811 | } 812 | 813 | try_mintWithCreatorPaymentFactory( 814 | tokenIPFSPath: string, 815 | paymentAddressFactory: Address, 816 | paymentAddressCallData: Bytes 817 | ): ethereum.CallResult { 818 | let result = super.tryCall( 819 | "mintWithCreatorPaymentFactory", 820 | "mintWithCreatorPaymentFactory(string,address,bytes):(uint256)", 821 | [ 822 | ethereum.Value.fromString(tokenIPFSPath), 823 | ethereum.Value.fromAddress(paymentAddressFactory), 824 | ethereum.Value.fromBytes(paymentAddressCallData) 825 | ] 826 | ); 827 | if (result.reverted) { 828 | return new ethereum.CallResult(); 829 | } 830 | let value = result.value; 831 | return ethereum.CallResult.fromValue(value[0].toBigInt()); 832 | } 833 | 834 | mintWithCreatorPaymentFactoryAndApproveMarket( 835 | tokenIPFSPath: string, 836 | paymentAddressFactory: Address, 837 | paymentAddressCallData: Bytes 838 | ): BigInt { 839 | let result = super.call( 840 | "mintWithCreatorPaymentFactoryAndApproveMarket", 841 | "mintWithCreatorPaymentFactoryAndApproveMarket(string,address,bytes):(uint256)", 842 | [ 843 | ethereum.Value.fromString(tokenIPFSPath), 844 | ethereum.Value.fromAddress(paymentAddressFactory), 845 | ethereum.Value.fromBytes(paymentAddressCallData) 846 | ] 847 | ); 848 | 849 | return result[0].toBigInt(); 850 | } 851 | 852 | try_mintWithCreatorPaymentFactoryAndApproveMarket( 853 | tokenIPFSPath: string, 854 | paymentAddressFactory: Address, 855 | paymentAddressCallData: Bytes 856 | ): ethereum.CallResult { 857 | let result = super.tryCall( 858 | "mintWithCreatorPaymentFactoryAndApproveMarket", 859 | "mintWithCreatorPaymentFactoryAndApproveMarket(string,address,bytes):(uint256)", 860 | [ 861 | ethereum.Value.fromString(tokenIPFSPath), 862 | ethereum.Value.fromAddress(paymentAddressFactory), 863 | ethereum.Value.fromBytes(paymentAddressCallData) 864 | ] 865 | ); 866 | if (result.reverted) { 867 | return new ethereum.CallResult(); 868 | } 869 | let value = result.value; 870 | return ethereum.CallResult.fromValue(value[0].toBigInt()); 871 | } 872 | 873 | name(): string { 874 | let result = super.call("name", "name():(string)", []); 875 | 876 | return result[0].toString(); 877 | } 878 | 879 | try_name(): ethereum.CallResult { 880 | let result = super.tryCall("name", "name():(string)", []); 881 | if (result.reverted) { 882 | return new ethereum.CallResult(); 883 | } 884 | let value = result.value; 885 | return ethereum.CallResult.fromValue(value[0].toString()); 886 | } 887 | 888 | ownerOf(tokenId: BigInt): Address { 889 | let result = super.call("ownerOf", "ownerOf(uint256):(address)", [ 890 | ethereum.Value.fromUnsignedBigInt(tokenId) 891 | ]); 892 | 893 | return result[0].toAddress(); 894 | } 895 | 896 | try_ownerOf(tokenId: BigInt): ethereum.CallResult
{ 897 | let result = super.tryCall("ownerOf", "ownerOf(uint256):(address)", [ 898 | ethereum.Value.fromUnsignedBigInt(tokenId) 899 | ]); 900 | if (result.reverted) { 901 | return new ethereum.CallResult(); 902 | } 903 | let value = result.value; 904 | return ethereum.CallResult.fromValue(value[0].toAddress()); 905 | } 906 | 907 | proxyCallAddress(): Address { 908 | let result = super.call( 909 | "proxyCallAddress", 910 | "proxyCallAddress():(address)", 911 | [] 912 | ); 913 | 914 | return result[0].toAddress(); 915 | } 916 | 917 | try_proxyCallAddress(): ethereum.CallResult
{ 918 | let result = super.tryCall( 919 | "proxyCallAddress", 920 | "proxyCallAddress():(address)", 921 | [] 922 | ); 923 | if (result.reverted) { 924 | return new ethereum.CallResult(); 925 | } 926 | let value = result.value; 927 | return ethereum.CallResult.fromValue(value[0].toAddress()); 928 | } 929 | 930 | supportsInterface(interfaceId: Bytes): boolean { 931 | let result = super.call( 932 | "supportsInterface", 933 | "supportsInterface(bytes4):(bool)", 934 | [ethereum.Value.fromFixedBytes(interfaceId)] 935 | ); 936 | 937 | return result[0].toBoolean(); 938 | } 939 | 940 | try_supportsInterface(interfaceId: Bytes): ethereum.CallResult { 941 | let result = super.tryCall( 942 | "supportsInterface", 943 | "supportsInterface(bytes4):(bool)", 944 | [ethereum.Value.fromFixedBytes(interfaceId)] 945 | ); 946 | if (result.reverted) { 947 | return new ethereum.CallResult(); 948 | } 949 | let value = result.value; 950 | return ethereum.CallResult.fromValue(value[0].toBoolean()); 951 | } 952 | 953 | symbol(): string { 954 | let result = super.call("symbol", "symbol():(string)", []); 955 | 956 | return result[0].toString(); 957 | } 958 | 959 | try_symbol(): ethereum.CallResult { 960 | let result = super.tryCall("symbol", "symbol():(string)", []); 961 | if (result.reverted) { 962 | return new ethereum.CallResult(); 963 | } 964 | let value = result.value; 965 | return ethereum.CallResult.fromValue(value[0].toString()); 966 | } 967 | 968 | tokenByIndex(index: BigInt): BigInt { 969 | let result = super.call("tokenByIndex", "tokenByIndex(uint256):(uint256)", [ 970 | ethereum.Value.fromUnsignedBigInt(index) 971 | ]); 972 | 973 | return result[0].toBigInt(); 974 | } 975 | 976 | try_tokenByIndex(index: BigInt): ethereum.CallResult { 977 | let result = super.tryCall( 978 | "tokenByIndex", 979 | "tokenByIndex(uint256):(uint256)", 980 | [ethereum.Value.fromUnsignedBigInt(index)] 981 | ); 982 | if (result.reverted) { 983 | return new ethereum.CallResult(); 984 | } 985 | let value = result.value; 986 | return ethereum.CallResult.fromValue(value[0].toBigInt()); 987 | } 988 | 989 | tokenCreator(tokenId: BigInt): Address { 990 | let result = super.call("tokenCreator", "tokenCreator(uint256):(address)", [ 991 | ethereum.Value.fromUnsignedBigInt(tokenId) 992 | ]); 993 | 994 | return result[0].toAddress(); 995 | } 996 | 997 | try_tokenCreator(tokenId: BigInt): ethereum.CallResult
{ 998 | let result = super.tryCall( 999 | "tokenCreator", 1000 | "tokenCreator(uint256):(address)", 1001 | [ethereum.Value.fromUnsignedBigInt(tokenId)] 1002 | ); 1003 | if (result.reverted) { 1004 | return new ethereum.CallResult(); 1005 | } 1006 | let value = result.value; 1007 | return ethereum.CallResult.fromValue(value[0].toAddress()); 1008 | } 1009 | 1010 | tokenOfOwnerByIndex(owner: Address, index: BigInt): BigInt { 1011 | let result = super.call( 1012 | "tokenOfOwnerByIndex", 1013 | "tokenOfOwnerByIndex(address,uint256):(uint256)", 1014 | [ 1015 | ethereum.Value.fromAddress(owner), 1016 | ethereum.Value.fromUnsignedBigInt(index) 1017 | ] 1018 | ); 1019 | 1020 | return result[0].toBigInt(); 1021 | } 1022 | 1023 | try_tokenOfOwnerByIndex( 1024 | owner: Address, 1025 | index: BigInt 1026 | ): ethereum.CallResult { 1027 | let result = super.tryCall( 1028 | "tokenOfOwnerByIndex", 1029 | "tokenOfOwnerByIndex(address,uint256):(uint256)", 1030 | [ 1031 | ethereum.Value.fromAddress(owner), 1032 | ethereum.Value.fromUnsignedBigInt(index) 1033 | ] 1034 | ); 1035 | if (result.reverted) { 1036 | return new ethereum.CallResult(); 1037 | } 1038 | let value = result.value; 1039 | return ethereum.CallResult.fromValue(value[0].toBigInt()); 1040 | } 1041 | 1042 | tokenURI(tokenId: BigInt): string { 1043 | let result = super.call("tokenURI", "tokenURI(uint256):(string)", [ 1044 | ethereum.Value.fromUnsignedBigInt(tokenId) 1045 | ]); 1046 | 1047 | return result[0].toString(); 1048 | } 1049 | 1050 | try_tokenURI(tokenId: BigInt): ethereum.CallResult { 1051 | let result = super.tryCall("tokenURI", "tokenURI(uint256):(string)", [ 1052 | ethereum.Value.fromUnsignedBigInt(tokenId) 1053 | ]); 1054 | if (result.reverted) { 1055 | return new ethereum.CallResult(); 1056 | } 1057 | let value = result.value; 1058 | return ethereum.CallResult.fromValue(value[0].toString()); 1059 | } 1060 | 1061 | totalSupply(): BigInt { 1062 | let result = super.call("totalSupply", "totalSupply():(uint256)", []); 1063 | 1064 | return result[0].toBigInt(); 1065 | } 1066 | 1067 | try_totalSupply(): ethereum.CallResult { 1068 | let result = super.tryCall("totalSupply", "totalSupply():(uint256)", []); 1069 | if (result.reverted) { 1070 | return new ethereum.CallResult(); 1071 | } 1072 | let value = result.value; 1073 | return ethereum.CallResult.fromValue(value[0].toBigInt()); 1074 | } 1075 | } 1076 | 1077 | export class AdminAccountMigrationCall extends ethereum.Call { 1078 | get inputs(): AdminAccountMigrationCall__Inputs { 1079 | return new AdminAccountMigrationCall__Inputs(this); 1080 | } 1081 | 1082 | get outputs(): AdminAccountMigrationCall__Outputs { 1083 | return new AdminAccountMigrationCall__Outputs(this); 1084 | } 1085 | } 1086 | 1087 | export class AdminAccountMigrationCall__Inputs { 1088 | _call: AdminAccountMigrationCall; 1089 | 1090 | constructor(call: AdminAccountMigrationCall) { 1091 | this._call = call; 1092 | } 1093 | 1094 | get createdTokenIds(): Array { 1095 | return this._call.inputValues[0].value.toBigIntArray(); 1096 | } 1097 | 1098 | get ownedTokenIds(): Array { 1099 | return this._call.inputValues[1].value.toBigIntArray(); 1100 | } 1101 | 1102 | get originalAddress(): Address { 1103 | return this._call.inputValues[2].value.toAddress(); 1104 | } 1105 | 1106 | get newAddress(): Address { 1107 | return this._call.inputValues[3].value.toAddress(); 1108 | } 1109 | 1110 | get signature(): Bytes { 1111 | return this._call.inputValues[4].value.toBytes(); 1112 | } 1113 | } 1114 | 1115 | export class AdminAccountMigrationCall__Outputs { 1116 | _call: AdminAccountMigrationCall; 1117 | 1118 | constructor(call: AdminAccountMigrationCall) { 1119 | this._call = call; 1120 | } 1121 | } 1122 | 1123 | export class AdminAccountMigrationForPaymentAddressesCall extends ethereum.Call { 1124 | get inputs(): AdminAccountMigrationForPaymentAddressesCall__Inputs { 1125 | return new AdminAccountMigrationForPaymentAddressesCall__Inputs(this); 1126 | } 1127 | 1128 | get outputs(): AdminAccountMigrationForPaymentAddressesCall__Outputs { 1129 | return new AdminAccountMigrationForPaymentAddressesCall__Outputs(this); 1130 | } 1131 | } 1132 | 1133 | export class AdminAccountMigrationForPaymentAddressesCall__Inputs { 1134 | _call: AdminAccountMigrationForPaymentAddressesCall; 1135 | 1136 | constructor(call: AdminAccountMigrationForPaymentAddressesCall) { 1137 | this._call = call; 1138 | } 1139 | 1140 | get paymentAddressTokenIds(): Array { 1141 | return this._call.inputValues[0].value.toBigIntArray(); 1142 | } 1143 | 1144 | get paymentAddressFactory(): Address { 1145 | return this._call.inputValues[1].value.toAddress(); 1146 | } 1147 | 1148 | get paymentAddressCallData(): Bytes { 1149 | return this._call.inputValues[2].value.toBytes(); 1150 | } 1151 | 1152 | get addressLocationInCallData(): BigInt { 1153 | return this._call.inputValues[3].value.toBigInt(); 1154 | } 1155 | 1156 | get originalAddress(): Address { 1157 | return this._call.inputValues[4].value.toAddress(); 1158 | } 1159 | 1160 | get newAddress(): Address { 1161 | return this._call.inputValues[5].value.toAddress(); 1162 | } 1163 | 1164 | get signature(): Bytes { 1165 | return this._call.inputValues[6].value.toBytes(); 1166 | } 1167 | } 1168 | 1169 | export class AdminAccountMigrationForPaymentAddressesCall__Outputs { 1170 | _call: AdminAccountMigrationForPaymentAddressesCall; 1171 | 1172 | constructor(call: AdminAccountMigrationForPaymentAddressesCall) { 1173 | this._call = call; 1174 | } 1175 | } 1176 | 1177 | export class AdminUpdateConfigCall extends ethereum.Call { 1178 | get inputs(): AdminUpdateConfigCall__Inputs { 1179 | return new AdminUpdateConfigCall__Inputs(this); 1180 | } 1181 | 1182 | get outputs(): AdminUpdateConfigCall__Outputs { 1183 | return new AdminUpdateConfigCall__Outputs(this); 1184 | } 1185 | } 1186 | 1187 | export class AdminUpdateConfigCall__Inputs { 1188 | _call: AdminUpdateConfigCall; 1189 | 1190 | constructor(call: AdminUpdateConfigCall) { 1191 | this._call = call; 1192 | } 1193 | 1194 | get _nftMarket(): Address { 1195 | return this._call.inputValues[0].value.toAddress(); 1196 | } 1197 | 1198 | get baseURI(): string { 1199 | return this._call.inputValues[1].value.toString(); 1200 | } 1201 | 1202 | get proxyCallContract(): Address { 1203 | return this._call.inputValues[2].value.toAddress(); 1204 | } 1205 | } 1206 | 1207 | export class AdminUpdateConfigCall__Outputs { 1208 | _call: AdminUpdateConfigCall; 1209 | 1210 | constructor(call: AdminUpdateConfigCall) { 1211 | this._call = call; 1212 | } 1213 | } 1214 | 1215 | export class ApproveCall extends ethereum.Call { 1216 | get inputs(): ApproveCall__Inputs { 1217 | return new ApproveCall__Inputs(this); 1218 | } 1219 | 1220 | get outputs(): ApproveCall__Outputs { 1221 | return new ApproveCall__Outputs(this); 1222 | } 1223 | } 1224 | 1225 | export class ApproveCall__Inputs { 1226 | _call: ApproveCall; 1227 | 1228 | constructor(call: ApproveCall) { 1229 | this._call = call; 1230 | } 1231 | 1232 | get to(): Address { 1233 | return this._call.inputValues[0].value.toAddress(); 1234 | } 1235 | 1236 | get tokenId(): BigInt { 1237 | return this._call.inputValues[1].value.toBigInt(); 1238 | } 1239 | } 1240 | 1241 | export class ApproveCall__Outputs { 1242 | _call: ApproveCall; 1243 | 1244 | constructor(call: ApproveCall) { 1245 | this._call = call; 1246 | } 1247 | } 1248 | 1249 | export class BurnCall extends ethereum.Call { 1250 | get inputs(): BurnCall__Inputs { 1251 | return new BurnCall__Inputs(this); 1252 | } 1253 | 1254 | get outputs(): BurnCall__Outputs { 1255 | return new BurnCall__Outputs(this); 1256 | } 1257 | } 1258 | 1259 | export class BurnCall__Inputs { 1260 | _call: BurnCall; 1261 | 1262 | constructor(call: BurnCall) { 1263 | this._call = call; 1264 | } 1265 | 1266 | get tokenId(): BigInt { 1267 | return this._call.inputValues[0].value.toBigInt(); 1268 | } 1269 | } 1270 | 1271 | export class BurnCall__Outputs { 1272 | _call: BurnCall; 1273 | 1274 | constructor(call: BurnCall) { 1275 | this._call = call; 1276 | } 1277 | } 1278 | 1279 | export class InitializeCall extends ethereum.Call { 1280 | get inputs(): InitializeCall__Inputs { 1281 | return new InitializeCall__Inputs(this); 1282 | } 1283 | 1284 | get outputs(): InitializeCall__Outputs { 1285 | return new InitializeCall__Outputs(this); 1286 | } 1287 | } 1288 | 1289 | export class InitializeCall__Inputs { 1290 | _call: InitializeCall; 1291 | 1292 | constructor(call: InitializeCall) { 1293 | this._call = call; 1294 | } 1295 | 1296 | get treasury(): Address { 1297 | return this._call.inputValues[0].value.toAddress(); 1298 | } 1299 | } 1300 | 1301 | export class InitializeCall__Outputs { 1302 | _call: InitializeCall; 1303 | 1304 | constructor(call: InitializeCall) { 1305 | this._call = call; 1306 | } 1307 | } 1308 | 1309 | export class MintCall extends ethereum.Call { 1310 | get inputs(): MintCall__Inputs { 1311 | return new MintCall__Inputs(this); 1312 | } 1313 | 1314 | get outputs(): MintCall__Outputs { 1315 | return new MintCall__Outputs(this); 1316 | } 1317 | } 1318 | 1319 | export class MintCall__Inputs { 1320 | _call: MintCall; 1321 | 1322 | constructor(call: MintCall) { 1323 | this._call = call; 1324 | } 1325 | 1326 | get tokenIPFSPath(): string { 1327 | return this._call.inputValues[0].value.toString(); 1328 | } 1329 | } 1330 | 1331 | export class MintCall__Outputs { 1332 | _call: MintCall; 1333 | 1334 | constructor(call: MintCall) { 1335 | this._call = call; 1336 | } 1337 | 1338 | get tokenId(): BigInt { 1339 | return this._call.outputValues[0].value.toBigInt(); 1340 | } 1341 | } 1342 | 1343 | export class MintAndApproveMarketCall extends ethereum.Call { 1344 | get inputs(): MintAndApproveMarketCall__Inputs { 1345 | return new MintAndApproveMarketCall__Inputs(this); 1346 | } 1347 | 1348 | get outputs(): MintAndApproveMarketCall__Outputs { 1349 | return new MintAndApproveMarketCall__Outputs(this); 1350 | } 1351 | } 1352 | 1353 | export class MintAndApproveMarketCall__Inputs { 1354 | _call: MintAndApproveMarketCall; 1355 | 1356 | constructor(call: MintAndApproveMarketCall) { 1357 | this._call = call; 1358 | } 1359 | 1360 | get tokenIPFSPath(): string { 1361 | return this._call.inputValues[0].value.toString(); 1362 | } 1363 | } 1364 | 1365 | export class MintAndApproveMarketCall__Outputs { 1366 | _call: MintAndApproveMarketCall; 1367 | 1368 | constructor(call: MintAndApproveMarketCall) { 1369 | this._call = call; 1370 | } 1371 | 1372 | get tokenId(): BigInt { 1373 | return this._call.outputValues[0].value.toBigInt(); 1374 | } 1375 | } 1376 | 1377 | export class MintWithCreatorPaymentAddressCall extends ethereum.Call { 1378 | get inputs(): MintWithCreatorPaymentAddressCall__Inputs { 1379 | return new MintWithCreatorPaymentAddressCall__Inputs(this); 1380 | } 1381 | 1382 | get outputs(): MintWithCreatorPaymentAddressCall__Outputs { 1383 | return new MintWithCreatorPaymentAddressCall__Outputs(this); 1384 | } 1385 | } 1386 | 1387 | export class MintWithCreatorPaymentAddressCall__Inputs { 1388 | _call: MintWithCreatorPaymentAddressCall; 1389 | 1390 | constructor(call: MintWithCreatorPaymentAddressCall) { 1391 | this._call = call; 1392 | } 1393 | 1394 | get tokenIPFSPath(): string { 1395 | return this._call.inputValues[0].value.toString(); 1396 | } 1397 | 1398 | get tokenCreatorPaymentAddress(): Address { 1399 | return this._call.inputValues[1].value.toAddress(); 1400 | } 1401 | } 1402 | 1403 | export class MintWithCreatorPaymentAddressCall__Outputs { 1404 | _call: MintWithCreatorPaymentAddressCall; 1405 | 1406 | constructor(call: MintWithCreatorPaymentAddressCall) { 1407 | this._call = call; 1408 | } 1409 | 1410 | get tokenId(): BigInt { 1411 | return this._call.outputValues[0].value.toBigInt(); 1412 | } 1413 | } 1414 | 1415 | export class MintWithCreatorPaymentAddressAndApproveMarketCall extends ethereum.Call { 1416 | get inputs(): MintWithCreatorPaymentAddressAndApproveMarketCall__Inputs { 1417 | return new MintWithCreatorPaymentAddressAndApproveMarketCall__Inputs(this); 1418 | } 1419 | 1420 | get outputs(): MintWithCreatorPaymentAddressAndApproveMarketCall__Outputs { 1421 | return new MintWithCreatorPaymentAddressAndApproveMarketCall__Outputs(this); 1422 | } 1423 | } 1424 | 1425 | export class MintWithCreatorPaymentAddressAndApproveMarketCall__Inputs { 1426 | _call: MintWithCreatorPaymentAddressAndApproveMarketCall; 1427 | 1428 | constructor(call: MintWithCreatorPaymentAddressAndApproveMarketCall) { 1429 | this._call = call; 1430 | } 1431 | 1432 | get tokenIPFSPath(): string { 1433 | return this._call.inputValues[0].value.toString(); 1434 | } 1435 | 1436 | get tokenCreatorPaymentAddress(): Address { 1437 | return this._call.inputValues[1].value.toAddress(); 1438 | } 1439 | } 1440 | 1441 | export class MintWithCreatorPaymentAddressAndApproveMarketCall__Outputs { 1442 | _call: MintWithCreatorPaymentAddressAndApproveMarketCall; 1443 | 1444 | constructor(call: MintWithCreatorPaymentAddressAndApproveMarketCall) { 1445 | this._call = call; 1446 | } 1447 | 1448 | get tokenId(): BigInt { 1449 | return this._call.outputValues[0].value.toBigInt(); 1450 | } 1451 | } 1452 | 1453 | export class MintWithCreatorPaymentFactoryCall extends ethereum.Call { 1454 | get inputs(): MintWithCreatorPaymentFactoryCall__Inputs { 1455 | return new MintWithCreatorPaymentFactoryCall__Inputs(this); 1456 | } 1457 | 1458 | get outputs(): MintWithCreatorPaymentFactoryCall__Outputs { 1459 | return new MintWithCreatorPaymentFactoryCall__Outputs(this); 1460 | } 1461 | } 1462 | 1463 | export class MintWithCreatorPaymentFactoryCall__Inputs { 1464 | _call: MintWithCreatorPaymentFactoryCall; 1465 | 1466 | constructor(call: MintWithCreatorPaymentFactoryCall) { 1467 | this._call = call; 1468 | } 1469 | 1470 | get tokenIPFSPath(): string { 1471 | return this._call.inputValues[0].value.toString(); 1472 | } 1473 | 1474 | get paymentAddressFactory(): Address { 1475 | return this._call.inputValues[1].value.toAddress(); 1476 | } 1477 | 1478 | get paymentAddressCallData(): Bytes { 1479 | return this._call.inputValues[2].value.toBytes(); 1480 | } 1481 | } 1482 | 1483 | export class MintWithCreatorPaymentFactoryCall__Outputs { 1484 | _call: MintWithCreatorPaymentFactoryCall; 1485 | 1486 | constructor(call: MintWithCreatorPaymentFactoryCall) { 1487 | this._call = call; 1488 | } 1489 | 1490 | get tokenId(): BigInt { 1491 | return this._call.outputValues[0].value.toBigInt(); 1492 | } 1493 | } 1494 | 1495 | export class MintWithCreatorPaymentFactoryAndApproveMarketCall extends ethereum.Call { 1496 | get inputs(): MintWithCreatorPaymentFactoryAndApproveMarketCall__Inputs { 1497 | return new MintWithCreatorPaymentFactoryAndApproveMarketCall__Inputs(this); 1498 | } 1499 | 1500 | get outputs(): MintWithCreatorPaymentFactoryAndApproveMarketCall__Outputs { 1501 | return new MintWithCreatorPaymentFactoryAndApproveMarketCall__Outputs(this); 1502 | } 1503 | } 1504 | 1505 | export class MintWithCreatorPaymentFactoryAndApproveMarketCall__Inputs { 1506 | _call: MintWithCreatorPaymentFactoryAndApproveMarketCall; 1507 | 1508 | constructor(call: MintWithCreatorPaymentFactoryAndApproveMarketCall) { 1509 | this._call = call; 1510 | } 1511 | 1512 | get tokenIPFSPath(): string { 1513 | return this._call.inputValues[0].value.toString(); 1514 | } 1515 | 1516 | get paymentAddressFactory(): Address { 1517 | return this._call.inputValues[1].value.toAddress(); 1518 | } 1519 | 1520 | get paymentAddressCallData(): Bytes { 1521 | return this._call.inputValues[2].value.toBytes(); 1522 | } 1523 | } 1524 | 1525 | export class MintWithCreatorPaymentFactoryAndApproveMarketCall__Outputs { 1526 | _call: MintWithCreatorPaymentFactoryAndApproveMarketCall; 1527 | 1528 | constructor(call: MintWithCreatorPaymentFactoryAndApproveMarketCall) { 1529 | this._call = call; 1530 | } 1531 | 1532 | get tokenId(): BigInt { 1533 | return this._call.outputValues[0].value.toBigInt(); 1534 | } 1535 | } 1536 | 1537 | export class SafeTransferFromCall extends ethereum.Call { 1538 | get inputs(): SafeTransferFromCall__Inputs { 1539 | return new SafeTransferFromCall__Inputs(this); 1540 | } 1541 | 1542 | get outputs(): SafeTransferFromCall__Outputs { 1543 | return new SafeTransferFromCall__Outputs(this); 1544 | } 1545 | } 1546 | 1547 | export class SafeTransferFromCall__Inputs { 1548 | _call: SafeTransferFromCall; 1549 | 1550 | constructor(call: SafeTransferFromCall) { 1551 | this._call = call; 1552 | } 1553 | 1554 | get from(): Address { 1555 | return this._call.inputValues[0].value.toAddress(); 1556 | } 1557 | 1558 | get to(): Address { 1559 | return this._call.inputValues[1].value.toAddress(); 1560 | } 1561 | 1562 | get tokenId(): BigInt { 1563 | return this._call.inputValues[2].value.toBigInt(); 1564 | } 1565 | } 1566 | 1567 | export class SafeTransferFromCall__Outputs { 1568 | _call: SafeTransferFromCall; 1569 | 1570 | constructor(call: SafeTransferFromCall) { 1571 | this._call = call; 1572 | } 1573 | } 1574 | 1575 | export class SafeTransferFrom1Call extends ethereum.Call { 1576 | get inputs(): SafeTransferFrom1Call__Inputs { 1577 | return new SafeTransferFrom1Call__Inputs(this); 1578 | } 1579 | 1580 | get outputs(): SafeTransferFrom1Call__Outputs { 1581 | return new SafeTransferFrom1Call__Outputs(this); 1582 | } 1583 | } 1584 | 1585 | export class SafeTransferFrom1Call__Inputs { 1586 | _call: SafeTransferFrom1Call; 1587 | 1588 | constructor(call: SafeTransferFrom1Call) { 1589 | this._call = call; 1590 | } 1591 | 1592 | get from(): Address { 1593 | return this._call.inputValues[0].value.toAddress(); 1594 | } 1595 | 1596 | get to(): Address { 1597 | return this._call.inputValues[1].value.toAddress(); 1598 | } 1599 | 1600 | get tokenId(): BigInt { 1601 | return this._call.inputValues[2].value.toBigInt(); 1602 | } 1603 | 1604 | get _data(): Bytes { 1605 | return this._call.inputValues[3].value.toBytes(); 1606 | } 1607 | } 1608 | 1609 | export class SafeTransferFrom1Call__Outputs { 1610 | _call: SafeTransferFrom1Call; 1611 | 1612 | constructor(call: SafeTransferFrom1Call) { 1613 | this._call = call; 1614 | } 1615 | } 1616 | 1617 | export class SetApprovalForAllCall extends ethereum.Call { 1618 | get inputs(): SetApprovalForAllCall__Inputs { 1619 | return new SetApprovalForAllCall__Inputs(this); 1620 | } 1621 | 1622 | get outputs(): SetApprovalForAllCall__Outputs { 1623 | return new SetApprovalForAllCall__Outputs(this); 1624 | } 1625 | } 1626 | 1627 | export class SetApprovalForAllCall__Inputs { 1628 | _call: SetApprovalForAllCall; 1629 | 1630 | constructor(call: SetApprovalForAllCall) { 1631 | this._call = call; 1632 | } 1633 | 1634 | get operator(): Address { 1635 | return this._call.inputValues[0].value.toAddress(); 1636 | } 1637 | 1638 | get approved(): boolean { 1639 | return this._call.inputValues[1].value.toBoolean(); 1640 | } 1641 | } 1642 | 1643 | export class SetApprovalForAllCall__Outputs { 1644 | _call: SetApprovalForAllCall; 1645 | 1646 | constructor(call: SetApprovalForAllCall) { 1647 | this._call = call; 1648 | } 1649 | } 1650 | 1651 | export class TransferFromCall extends ethereum.Call { 1652 | get inputs(): TransferFromCall__Inputs { 1653 | return new TransferFromCall__Inputs(this); 1654 | } 1655 | 1656 | get outputs(): TransferFromCall__Outputs { 1657 | return new TransferFromCall__Outputs(this); 1658 | } 1659 | } 1660 | 1661 | export class TransferFromCall__Inputs { 1662 | _call: TransferFromCall; 1663 | 1664 | constructor(call: TransferFromCall) { 1665 | this._call = call; 1666 | } 1667 | 1668 | get from(): Address { 1669 | return this._call.inputValues[0].value.toAddress(); 1670 | } 1671 | 1672 | get to(): Address { 1673 | return this._call.inputValues[1].value.toAddress(); 1674 | } 1675 | 1676 | get tokenId(): BigInt { 1677 | return this._call.inputValues[2].value.toBigInt(); 1678 | } 1679 | } 1680 | 1681 | export class TransferFromCall__Outputs { 1682 | _call: TransferFromCall; 1683 | 1684 | constructor(call: TransferFromCall) { 1685 | this._call = call; 1686 | } 1687 | } 1688 | --------------------------------------------------------------------------------