// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. import { ethereum, JSONValue, TypedMap, Entity, Bytes, Address, BigInt } from "@graphprotocol/graph-ts"; export class Approval extends ethereum.Event { get params(): Approval__Params { return new Approval__Params(this); } } export class Approval__Params { _event: Approval; constructor(event: Approval) { this._event = event; } get owner(): Address { return this._event.parameters[0].value.toAddress(); } get approved(): Address { return this._event.parameters[1].value.toAddress(); } get tokenId(): BigInt { return this._event.parameters[2].value.toBigInt(); } } export class ApprovalForAll extends ethereum.Event { get params(): ApprovalForAll__Params { return new ApprovalForAll__Params(this); } } export class ApprovalForAll__Params { _event: ApprovalForAll; constructor(event: ApprovalForAll) { this._event = event; } get owner(): Address { return this._event.parameters[0].value.toAddress(); } get operator(): Address { return this._event.parameters[1].value.toAddress(); } get approved(): boolean { return this._event.parameters[2].value.toBoolean(); } } export class Transfer extends ethereum.Event { get params(): Transfer__Params { return new Transfer__Params(this); } } export class Transfer__Params { _event: Transfer; constructor(event: Transfer) { this._event = event; } get from(): Address { return this._event.parameters[0].value.toAddress(); } get to(): Address { return this._event.parameters[1].value.toAddress(); } get tokenId(): BigInt { return this._event.parameters[2].value.toBigInt(); } } export class TransferBatch extends ethereum.Event { get params(): TransferBatch__Params { return new TransferBatch__Params(this); } } export class TransferBatch__Params { _event: TransferBatch; constructor(event: TransferBatch) { this._event = event; } get from(): Address { return this._event.parameters[0].value.toAddress(); } get to(): Address { return this._event.parameters[1].value.toAddress(); } get startTokenId(): BigInt { return this._event.parameters[2].value.toBigInt(); } get count(): BigInt { return this._event.parameters[3].value.toBigInt(); } } export class ERC721 extends ethereum.SmartContract { static bind(address: Address): ERC721 { return new ERC721("ERC721", address); } balanceOf(owner: Address): BigInt { let result = super.call("balanceOf", "balanceOf(address):(uint256)", [ ethereum.Value.fromAddress(owner) ]); return result[0].toBigInt(); } try_balanceOf(owner: Address): ethereum.CallResult { let result = super.tryCall("balanceOf", "balanceOf(address):(uint256)", [ ethereum.Value.fromAddress(owner) ]); if (result.reverted) { return new ethereum.CallResult(); } let value = result.value; return ethereum.CallResult.fromValue(value[0].toBigInt()); } getApproved(tokenId: BigInt): Address { let result = super.call("getApproved", "getApproved(uint256):(address)", [ ethereum.Value.fromUnsignedBigInt(tokenId) ]); return result[0].toAddress(); } try_getApproved(tokenId: BigInt): ethereum.CallResult
{ let result = super.tryCall( "getApproved", "getApproved(uint256):(address)", [ethereum.Value.fromUnsignedBigInt(tokenId)] ); if (result.reverted) { return new ethereum.CallResult(); } let value = result.value; return ethereum.CallResult.fromValue(value[0].toAddress()); } isApprovedForAll(owner: Address, operator: Address): boolean { let result = super.call( "isApprovedForAll", "isApprovedForAll(address,address):(bool)", [ethereum.Value.fromAddress(owner), ethereum.Value.fromAddress(operator)] ); return result[0].toBoolean(); } try_isApprovedForAll( owner: Address, operator: Address ): ethereum.CallResult { let result = super.tryCall( "isApprovedForAll", "isApprovedForAll(address,address):(bool)", [ethereum.Value.fromAddress(owner), ethereum.Value.fromAddress(operator)] ); if (result.reverted) { return new ethereum.CallResult(); } let value = result.value; return ethereum.CallResult.fromValue(value[0].toBoolean()); } name(): string { let result = super.call("name", "name():(string)", []); return result[0].toString(); } try_name(): ethereum.CallResult { let result = super.tryCall("name", "name():(string)", []); if (result.reverted) { return new ethereum.CallResult(); } let value = result.value; return ethereum.CallResult.fromValue(value[0].toString()); } ownerOf(tokenId: BigInt): Address { let result = super.call("ownerOf", "ownerOf(uint256):(address)", [ ethereum.Value.fromUnsignedBigInt(tokenId) ]); return result[0].toAddress(); } try_ownerOf(tokenId: BigInt): ethereum.CallResult
{ let result = super.tryCall("ownerOf", "ownerOf(uint256):(address)", [ ethereum.Value.fromUnsignedBigInt(tokenId) ]); if (result.reverted) { return new ethereum.CallResult(); } let value = result.value; return ethereum.CallResult.fromValue(value[0].toAddress()); } supportsInterface(interfaceId: Bytes): boolean { let result = super.call( "supportsInterface", "supportsInterface(bytes4):(bool)", [ethereum.Value.fromFixedBytes(interfaceId)] ); return result[0].toBoolean(); } try_supportsInterface(interfaceId: Bytes): ethereum.CallResult { let result = super.tryCall( "supportsInterface", "supportsInterface(bytes4):(bool)", [ethereum.Value.fromFixedBytes(interfaceId)] ); if (result.reverted) { return new ethereum.CallResult(); } let value = result.value; return ethereum.CallResult.fromValue(value[0].toBoolean()); } symbol(): string { let result = super.call("symbol", "symbol():(string)", []); return result[0].toString(); } try_symbol(): ethereum.CallResult { let result = super.tryCall("symbol", "symbol():(string)", []); if (result.reverted) { return new ethereum.CallResult(); } let value = result.value; return ethereum.CallResult.fromValue(value[0].toString()); } tokenByIndex(index: BigInt): BigInt { let result = super.call("tokenByIndex", "tokenByIndex(uint256):(uint256)", [ ethereum.Value.fromUnsignedBigInt(index) ]); return result[0].toBigInt(); } try_tokenByIndex(index: BigInt): ethereum.CallResult { let result = super.tryCall( "tokenByIndex", "tokenByIndex(uint256):(uint256)", [ethereum.Value.fromUnsignedBigInt(index)] ); if (result.reverted) { return new ethereum.CallResult(); } let value = result.value; return ethereum.CallResult.fromValue(value[0].toBigInt()); } tokenOfOwnerByIndex(owner: Address, index: BigInt): BigInt { let result = super.call( "tokenOfOwnerByIndex", "tokenOfOwnerByIndex(address,uint256):(uint256)", [ ethereum.Value.fromAddress(owner), ethereum.Value.fromUnsignedBigInt(index) ] ); return result[0].toBigInt(); } try_tokenOfOwnerByIndex( owner: Address, index: BigInt ): ethereum.CallResult { let result = super.tryCall( "tokenOfOwnerByIndex", "tokenOfOwnerByIndex(address,uint256):(uint256)", [ ethereum.Value.fromAddress(owner), ethereum.Value.fromUnsignedBigInt(index) ] ); if (result.reverted) { return new ethereum.CallResult(); } let value = result.value; return ethereum.CallResult.fromValue(value[0].toBigInt()); } tokenURI(tokenId: BigInt): string { let result = super.call("tokenURI", "tokenURI(uint256):(string)", [ ethereum.Value.fromUnsignedBigInt(tokenId) ]); return result[0].toString(); } try_tokenURI(tokenId: BigInt): ethereum.CallResult { let result = super.tryCall("tokenURI", "tokenURI(uint256):(string)", [ ethereum.Value.fromUnsignedBigInt(tokenId) ]); if (result.reverted) { return new ethereum.CallResult(); } let value = result.value; return ethereum.CallResult.fromValue(value[0].toString()); } totalSupply(): BigInt { let result = super.call("totalSupply", "totalSupply():(uint256)", []); return result[0].toBigInt(); } try_totalSupply(): ethereum.CallResult { let result = super.tryCall("totalSupply", "totalSupply():(uint256)", []); if (result.reverted) { return new ethereum.CallResult(); } let value = result.value; return ethereum.CallResult.fromValue(value[0].toBigInt()); } } export class ConstructorCall extends ethereum.Call { get inputs(): ConstructorCall__Inputs { return new ConstructorCall__Inputs(this); } get outputs(): ConstructorCall__Outputs { return new ConstructorCall__Outputs(this); } } export class ConstructorCall__Inputs { _call: ConstructorCall; constructor(call: ConstructorCall) { this._call = call; } get name(): string { return this._call.inputValues[0].value.toString(); } get symbol(): string { return this._call.inputValues[1].value.toString(); } } export class ConstructorCall__Outputs { _call: ConstructorCall; constructor(call: ConstructorCall) { this._call = call; } } export class ApproveCall extends ethereum.Call { get inputs(): ApproveCall__Inputs { return new ApproveCall__Inputs(this); } get outputs(): ApproveCall__Outputs { return new ApproveCall__Outputs(this); } } export class ApproveCall__Inputs { _call: ApproveCall; constructor(call: ApproveCall) { this._call = call; } get to(): Address { return this._call.inputValues[0].value.toAddress(); } get tokenId(): BigInt { return this._call.inputValues[1].value.toBigInt(); } } export class ApproveCall__Outputs { _call: ApproveCall; constructor(call: ApproveCall) { this._call = call; } } export class SafeTransferFromCall extends ethereum.Call { get inputs(): SafeTransferFromCall__Inputs { return new SafeTransferFromCall__Inputs(this); } get outputs(): SafeTransferFromCall__Outputs { return new SafeTransferFromCall__Outputs(this); } } export class SafeTransferFromCall__Inputs { _call: SafeTransferFromCall; constructor(call: SafeTransferFromCall) { this._call = call; } get from(): Address { return this._call.inputValues[0].value.toAddress(); } get to(): Address { return this._call.inputValues[1].value.toAddress(); } get tokenId(): BigInt { return this._call.inputValues[2].value.toBigInt(); } } export class SafeTransferFromCall__Outputs { _call: SafeTransferFromCall; constructor(call: SafeTransferFromCall) { this._call = call; } } export class SafeTransferFrom1Call extends ethereum.Call { get inputs(): SafeTransferFrom1Call__Inputs { return new SafeTransferFrom1Call__Inputs(this); } get outputs(): SafeTransferFrom1Call__Outputs { return new SafeTransferFrom1Call__Outputs(this); } } export class SafeTransferFrom1Call__Inputs { _call: SafeTransferFrom1Call; constructor(call: SafeTransferFrom1Call) { this._call = call; } get from(): Address { return this._call.inputValues[0].value.toAddress(); } get to(): Address { return this._call.inputValues[1].value.toAddress(); } get tokenId(): BigInt { return this._call.inputValues[2].value.toBigInt(); } get _data(): Bytes { return this._call.inputValues[3].value.toBytes(); } } export class SafeTransferFrom1Call__Outputs { _call: SafeTransferFrom1Call; constructor(call: SafeTransferFrom1Call) { this._call = call; } } export class SetApprovalForAllCall extends ethereum.Call { get inputs(): SetApprovalForAllCall__Inputs { return new SetApprovalForAllCall__Inputs(this); } get outputs(): SetApprovalForAllCall__Outputs { return new SetApprovalForAllCall__Outputs(this); } } export class SetApprovalForAllCall__Inputs { _call: SetApprovalForAllCall; constructor(call: SetApprovalForAllCall) { this._call = call; } get operator(): Address { return this._call.inputValues[0].value.toAddress(); } get approved(): boolean { return this._call.inputValues[1].value.toBoolean(); } } export class SetApprovalForAllCall__Outputs { _call: SetApprovalForAllCall; constructor(call: SetApprovalForAllCall) { this._call = call; } } export class TransferFromCall extends ethereum.Call { get inputs(): TransferFromCall__Inputs { return new TransferFromCall__Inputs(this); } get outputs(): TransferFromCall__Outputs { return new TransferFromCall__Outputs(this); } } export class TransferFromCall__Inputs { _call: TransferFromCall; constructor(call: TransferFromCall) { this._call = call; } get from(): Address { return this._call.inputValues[0].value.toAddress(); } get to(): Address { return this._call.inputValues[1].value.toAddress(); } get tokenId(): BigInt { return this._call.inputValues[2].value.toBigInt(); } } export class TransferFromCall__Outputs { _call: TransferFromCall; constructor(call: TransferFromCall) { this._call = call; } }