-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
1,230 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,246 @@ | ||
// 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 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(); | ||
} | ||
|
||
get operator(): Address { | ||
return this._event.parameters[3].value.toAddress(); | ||
} | ||
|
||
get userData(): Bytes { | ||
return this._event.parameters[4].value.toBytes(); | ||
} | ||
|
||
get operatorData(): Bytes { | ||
return this._event.parameters[5].value.toBytes(); | ||
} | ||
} | ||
|
||
export class Transfer1 extends ethereum.Event { | ||
get params(): Transfer1__Params { | ||
return new Transfer1__Params(this); | ||
} | ||
} | ||
|
||
export class Transfer1__Params { | ||
_event: Transfer1; | ||
|
||
constructor(event: Transfer1) { | ||
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(); | ||
} | ||
|
||
get operator(): Address { | ||
return this._event.parameters[3].value.toAddress(); | ||
} | ||
|
||
get userData(): Bytes { | ||
return this._event.parameters[4].value.toBytes(); | ||
} | ||
} | ||
|
||
export class Transfer2 extends ethereum.Event { | ||
get params(): Transfer2__Params { | ||
return new Transfer2__Params(this); | ||
} | ||
} | ||
|
||
export class Transfer2__Params { | ||
_event: Transfer2; | ||
|
||
constructor(event: Transfer2) { | ||
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 Transfer3 extends ethereum.Event { | ||
get params(): Transfer3__Params { | ||
return new Transfer3__Params(this); | ||
} | ||
} | ||
|
||
export class Transfer3__Params { | ||
_event: Transfer3; | ||
|
||
constructor(event: Transfer3) { | ||
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 OwnershipTransferred extends ethereum.Event { | ||
get params(): OwnershipTransferred__Params { | ||
return new OwnershipTransferred__Params(this); | ||
} | ||
} | ||
|
||
export class OwnershipTransferred__Params { | ||
_event: OwnershipTransferred; | ||
|
||
constructor(event: OwnershipTransferred) { | ||
this._event = event; | ||
} | ||
|
||
get previousOwner(): Address { | ||
return this._event.parameters[0].value.toAddress(); | ||
} | ||
|
||
get newOwner(): Address { | ||
return this._event.parameters[1].value.toAddress(); | ||
} | ||
} | ||
|
||
export class AddWearable extends ethereum.Event { | ||
get params(): AddWearable__Params { | ||
return new AddWearable__Params(this); | ||
} | ||
} | ||
|
||
export class AddWearable__Params { | ||
_event: AddWearable; | ||
|
||
constructor(event: AddWearable) { | ||
this._event = event; | ||
} | ||
|
||
get _wearableIdKey(): Bytes { | ||
return this._event.parameters[0].value.toBytes(); | ||
} | ||
|
||
get _wearableId(): string { | ||
return this._event.parameters[1].value.toString(); | ||
} | ||
|
||
get _maxIssuance(): BigInt { | ||
return this._event.parameters[2].value.toBigInt(); | ||
} | ||
} | ||
|
||
export class ERC721 extends ethereum.SmartContract { | ||
static bind(address: Address): ERC721 { | ||
return new ERC721("ERC721", address); | ||
} | ||
|
||
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<Address> { | ||
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()); | ||
} | ||
|
||
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<string> { | ||
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()); | ||
} | ||
|
||
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<BigInt> { | ||
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()); | ||
} | ||
} |
Oops, something went wrong.