Skip to content

Commit

Permalink
chore: rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
cazala committed Sep 18, 2024
1 parent 3b6e0b2 commit 32dc4ba
Show file tree
Hide file tree
Showing 5 changed files with 1,230 additions and 0 deletions.
246 changes: 246 additions & 0 deletions src/entities/ERC721Bid/ERC721.ts
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());
}
}
Loading

0 comments on commit 32dc4ba

Please sign in to comment.