// 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 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 account(): 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 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 operator(): Address { return this._event.parameters[0].value.toAddress(); } get from(): Address { return this._event.parameters[1].value.toAddress(); } get to(): Address { return this._event.parameters[2].value.toAddress(); } get ids(): Array { return this._event.parameters[3].value.toBigIntArray(); } get values(): Array { return this._event.parameters[4].value.toBigIntArray(); } } export class TransferSingle extends ethereum.Event { get params(): TransferSingle__Params { return new TransferSingle__Params(this); } } export class TransferSingle__Params { _event: TransferSingle; constructor(event: TransferSingle) { this._event = event; } get operator(): Address { return this._event.parameters[0].value.toAddress(); } get from(): Address { return this._event.parameters[1].value.toAddress(); } get to(): Address { return this._event.parameters[2].value.toAddress(); } get id(): BigInt { return this._event.parameters[3].value.toBigInt(); } get value(): BigInt { return this._event.parameters[4].value.toBigInt(); } } export class URI extends ethereum.Event { get params(): URI__Params { return new URI__Params(this); } } export class URI__Params { _event: URI; constructor(event: URI) { this._event = event; } get value(): string { return this._event.parameters[0].value.toString(); } get id(): BigInt { return this._event.parameters[1].value.toBigInt(); } } export class ERC1155 extends ethereum.SmartContract { static bind(address: Address): ERC1155 { return new ERC1155("ERC1155", address); } balanceOf(account: Address, id: BigInt): BigInt { let result = super.call( "balanceOf", "balanceOf(address,uint256):(uint256)", [ ethereum.Value.fromAddress(account), ethereum.Value.fromUnsignedBigInt(id) ] ); return result[0].toBigInt(); } try_balanceOf(account: Address, id: BigInt): ethereum.CallResult { let result = super.tryCall( "balanceOf", "balanceOf(address,uint256):(uint256)", [ ethereum.Value.fromAddress(account), ethereum.Value.fromUnsignedBigInt(id) ] ); if (result.reverted) { return new ethereum.CallResult(); } let value = result.value; return ethereum.CallResult.fromValue(value[0].toBigInt()); } balanceOfBatch(accounts: Array
, ids: Array): Array { let result = super.call( "balanceOfBatch", "balanceOfBatch(address[],uint256[]):(uint256[])", [ ethereum.Value.fromAddressArray(accounts), ethereum.Value.fromUnsignedBigIntArray(ids) ] ); return result[0].toBigIntArray(); } try_balanceOfBatch( accounts: Array
, ids: Array ): ethereum.CallResult> { let result = super.tryCall( "balanceOfBatch", "balanceOfBatch(address[],uint256[]):(uint256[])", [ ethereum.Value.fromAddressArray(accounts), ethereum.Value.fromUnsignedBigIntArray(ids) ] ); if (result.reverted) { return new ethereum.CallResult(); } let value = result.value; return ethereum.CallResult.fromValue(value[0].toBigIntArray()); } isApprovedForAll(account: Address, operator: Address): boolean { let result = super.call( "isApprovedForAll", "isApprovedForAll(address,address):(bool)", [ ethereum.Value.fromAddress(account), ethereum.Value.fromAddress(operator) ] ); return result[0].toBoolean(); } try_isApprovedForAll( account: Address, operator: Address ): ethereum.CallResult { let result = super.tryCall( "isApprovedForAll", "isApprovedForAll(address,address):(bool)", [ ethereum.Value.fromAddress(account), ethereum.Value.fromAddress(operator) ] ); if (result.reverted) { return new ethereum.CallResult(); } let value = result.value; return ethereum.CallResult.fromValue(value[0].toBoolean()); } 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()); } uri(param0: BigInt): string { let result = super.call("uri", "uri(uint256):(string)", [ ethereum.Value.fromUnsignedBigInt(param0) ]); return result[0].toString(); } try_uri(param0: BigInt): ethereum.CallResult { let result = super.tryCall("uri", "uri(uint256):(string)", [ ethereum.Value.fromUnsignedBigInt(param0) ]); if (result.reverted) { return new ethereum.CallResult(); } let value = result.value; return ethereum.CallResult.fromValue(value[0].toString()); } } 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 uri(): string { return this._call.inputValues[0].value.toString(); } } export class ConstructorCall__Outputs { _call: ConstructorCall; constructor(call: ConstructorCall) { this._call = call; } } export class SafeBatchTransferFromCall extends ethereum.Call { get inputs(): SafeBatchTransferFromCall__Inputs { return new SafeBatchTransferFromCall__Inputs(this); } get outputs(): SafeBatchTransferFromCall__Outputs { return new SafeBatchTransferFromCall__Outputs(this); } } export class SafeBatchTransferFromCall__Inputs { _call: SafeBatchTransferFromCall; constructor(call: SafeBatchTransferFromCall) { this._call = call; } get from(): Address { return this._call.inputValues[0].value.toAddress(); } get to(): Address { return this._call.inputValues[1].value.toAddress(); } get ids(): Array { return this._call.inputValues[2].value.toBigIntArray(); } get amounts(): Array { return this._call.inputValues[3].value.toBigIntArray(); } get data(): Bytes { return this._call.inputValues[4].value.toBytes(); } } export class SafeBatchTransferFromCall__Outputs { _call: SafeBatchTransferFromCall; constructor(call: SafeBatchTransferFromCall) { 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 id(): BigInt { return this._call.inputValues[2].value.toBigInt(); } get amount(): BigInt { return this._call.inputValues[3].value.toBigInt(); } get data(): Bytes { return this._call.inputValues[4].value.toBytes(); } } export class SafeTransferFromCall__Outputs { _call: SafeTransferFromCall; constructor(call: SafeTransferFromCall) { 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; } }