Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: transak buyer #110

Merged
merged 2 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading