From b4e5bb9f3aaed0cc6dea949e17d31e2153cd3194 Mon Sep 17 00:00:00 2001 From: KENT Date: Tue, 17 May 2022 15:25:57 +0200 Subject: [PATCH] added helpers for tests --- Dockerfile | 18 + generated/ERC721/ERC721.ts | 700 +++++++++++++++++++++++++++ generated/schema.ts | 289 +++++++++++ generated/templates.ts | 17 + generated/templates/Erc721/ERC721.ts | 700 +++++++++++++++++++++++++++ package.json | 3 +- tests/erc721.test.ts | 20 + tests/helper.ts | 33 ++ yarn.lock | 56 ++- 9 files changed, 1833 insertions(+), 3 deletions(-) create mode 100644 Dockerfile create mode 100644 generated/ERC721/ERC721.ts create mode 100644 generated/schema.ts create mode 100644 generated/templates.ts create mode 100644 generated/templates/Erc721/ERC721.ts create mode 100644 tests/erc721.test.ts create mode 100644 tests/helper.ts diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..97de64f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM --platform=linux/x86_64 ubuntu:20.04 + +ARG DEBIAN_FRONTEND=noninteractive + +ENV ARGS="" + +RUN apt update \ + && apt install -y sudo curl postgresql \ + && curl -fsSL https://deb.nodesource.com/setup_16.x | sudo bash - \ + && sudo apt install -y nodejs + +RUN curl -OL https://github.com/LimeChain/matchstick/releases/download/0.5.0-rc5/binary-linux-20 \ + && chmod a+x binary-linux-20 + +RUN mkdir matchstick +WORKDIR /matchstick + +CMD ../binary-linux-20 ${ARGS} \ No newline at end of file diff --git a/generated/ERC721/ERC721.ts b/generated/ERC721/ERC721.ts new file mode 100644 index 0000000..d79299e --- /dev/null +++ b/generated/ERC721/ERC721.ts @@ -0,0 +1,700 @@ +// 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 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 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 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()); + } + + baseURI(): string { + let result = super.call("baseURI", "baseURI():(string)", []); + + return result[0].toString(); + } + + try_baseURI(): ethereum.CallResult { + let result = super.tryCall("baseURI", "baseURI():(string)", []); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toString()); + } + + 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()); + } + + mintItem(to: Address, tokenURI: string): BigInt { + let result = super.call("mintItem", "mintItem(address,string):(uint256)", [ + ethereum.Value.fromAddress(to), + ethereum.Value.fromString(tokenURI) + ]); + + return result[0].toBigInt(); + } + + try_mintItem(to: Address, tokenURI: string): ethereum.CallResult { + let result = super.tryCall( + "mintItem", + "mintItem(address,string):(uint256)", + [ethereum.Value.fromAddress(to), ethereum.Value.fromString(tokenURI)] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toBigInt()); + } + + 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()); + } + + owner(): Address { + let result = super.call("owner", "owner():(address)", []); + + return result[0].toAddress(); + } + + try_owner(): ethereum.CallResult
{ + let result = super.tryCall("owner", "owner():(address)", []); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toAddress()); + } + + 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; + } +} + +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 MintItemCall extends ethereum.Call { + get inputs(): MintItemCall__Inputs { + return new MintItemCall__Inputs(this); + } + + get outputs(): MintItemCall__Outputs { + return new MintItemCall__Outputs(this); + } +} + +export class MintItemCall__Inputs { + _call: MintItemCall; + + constructor(call: MintItemCall) { + this._call = call; + } + + get to(): Address { + return this._call.inputValues[0].value.toAddress(); + } + + get tokenURI(): string { + return this._call.inputValues[1].value.toString(); + } +} + +export class MintItemCall__Outputs { + _call: MintItemCall; + + constructor(call: MintItemCall) { + this._call = call; + } + + get value0(): BigInt { + return this._call.outputValues[0].value.toBigInt(); + } +} + +export class RenounceOwnershipCall extends ethereum.Call { + get inputs(): RenounceOwnershipCall__Inputs { + return new RenounceOwnershipCall__Inputs(this); + } + + get outputs(): RenounceOwnershipCall__Outputs { + return new RenounceOwnershipCall__Outputs(this); + } +} + +export class RenounceOwnershipCall__Inputs { + _call: RenounceOwnershipCall; + + constructor(call: RenounceOwnershipCall) { + this._call = call; + } +} + +export class RenounceOwnershipCall__Outputs { + _call: RenounceOwnershipCall; + + constructor(call: RenounceOwnershipCall) { + 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; + } +} + +export class TransferOwnershipCall extends ethereum.Call { + get inputs(): TransferOwnershipCall__Inputs { + return new TransferOwnershipCall__Inputs(this); + } + + get outputs(): TransferOwnershipCall__Outputs { + return new TransferOwnershipCall__Outputs(this); + } +} + +export class TransferOwnershipCall__Inputs { + _call: TransferOwnershipCall; + + constructor(call: TransferOwnershipCall) { + this._call = call; + } + + get newOwner(): Address { + return this._call.inputValues[0].value.toAddress(); + } +} + +export class TransferOwnershipCall__Outputs { + _call: TransferOwnershipCall; + + constructor(call: TransferOwnershipCall) { + this._call = call; + } +} diff --git a/generated/schema.ts b/generated/schema.ts new file mode 100644 index 0000000..cd6edc5 --- /dev/null +++ b/generated/schema.ts @@ -0,0 +1,289 @@ +// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. + +import { + TypedMap, + Entity, + Value, + ValueKind, + store, + Bytes, + BigInt, + BigDecimal +} from "@graphprotocol/graph-ts"; + +export class Account extends Entity { + constructor(id: string) { + super(); + this.set("id", Value.fromString(id)); + + this.set("address", Value.fromBytes(Bytes.empty())); + } + + save(): void { + let id = this.get("id"); + assert(id != null, "Cannot save Account entity without an ID"); + if (id) { + assert( + id.kind == ValueKind.STRING, + "Cannot save Account entity with non-string ID. " + + 'Considering using .toHex() to convert the "id" to a string.' + ); + store.set("Account", id.toString(), this); + } + } + + static load(id: string): Account | null { + return changetype(store.get("Account", id)); + } + + get id(): string { + let value = this.get("id"); + return value!.toString(); + } + + set id(value: string) { + this.set("id", Value.fromString(value)); + } + + get address(): Bytes { + let value = this.get("address"); + return value!.toBytes(); + } + + set address(value: Bytes) { + this.set("address", Value.fromBytes(value)); + } +} + +export class Collectible extends Entity { + constructor(id: string) { + super(); + this.set("id", Value.fromString(id)); + + this.set("collection", Value.fromString("")); + this.set("owner", Value.fromString("")); + this.set("creator", Value.fromString("")); + this.set("tokenId", Value.fromBigInt(BigInt.zero())); + this.set("descriptorURI", Value.fromString("")); + } + + save(): void { + let id = this.get("id"); + assert(id != null, "Cannot save Collectible entity without an ID"); + if (id) { + assert( + id.kind == ValueKind.STRING, + "Cannot save Collectible entity with non-string ID. " + + 'Considering using .toHex() to convert the "id" to a string.' + ); + store.set("Collectible", id.toString(), this); + } + } + + static load(id: string): Collectible | null { + return changetype(store.get("Collectible", id)); + } + + get id(): string { + let value = this.get("id"); + return value!.toString(); + } + + set id(value: string) { + this.set("id", Value.fromString(value)); + } + + get collection(): string { + let value = this.get("collection"); + return value!.toString(); + } + + set collection(value: string) { + this.set("collection", Value.fromString(value)); + } + + get owner(): string { + let value = this.get("owner"); + return value!.toString(); + } + + set owner(value: string) { + this.set("owner", Value.fromString(value)); + } + + get creator(): string { + let value = this.get("creator"); + return value!.toString(); + } + + set creator(value: string) { + this.set("creator", Value.fromString(value)); + } + + get tokenId(): BigInt { + let value = this.get("tokenId"); + return value!.toBigInt(); + } + + set tokenId(value: BigInt) { + this.set("tokenId", Value.fromBigInt(value)); + } + + get descriptorURI(): string { + let value = this.get("descriptorURI"); + return value!.toString(); + } + + set descriptorURI(value: string) { + this.set("descriptorURI", Value.fromString(value)); + } + + get modified(): BigInt | null { + let value = this.get("modified"); + if (!value || value.kind == ValueKind.NULL) { + return null; + } else { + return value.toBigInt(); + } + } + + set modified(value: BigInt | null) { + if (!value) { + this.unset("modified"); + } else { + this.set("modified", Value.fromBigInt(value)); + } + } + + get created(): BigInt | null { + let value = this.get("created"); + if (!value || value.kind == ValueKind.NULL) { + return null; + } else { + return value.toBigInt(); + } + } + + set created(value: BigInt | null) { + if (!value) { + this.unset("created"); + } else { + this.set("created", Value.fromBigInt(value)); + } + } + + get removed(): BigInt | null { + let value = this.get("removed"); + if (!value || value.kind == ValueKind.NULL) { + return null; + } else { + return value.toBigInt(); + } + } + + set removed(value: BigInt | null) { + if (!value) { + this.unset("removed"); + } else { + this.set("removed", Value.fromBigInt(value)); + } + } + + get name(): string | null { + let value = this.get("name"); + if (!value || value.kind == ValueKind.NULL) { + return null; + } else { + return value.toString(); + } + } + + set name(value: string | null) { + if (!value) { + this.unset("name"); + } else { + this.set("name", Value.fromString(value)); + } + } + + get description(): string | null { + let value = this.get("description"); + if (!value || value.kind == ValueKind.NULL) { + return null; + } else { + return value.toString(); + } + } + + set description(value: string | null) { + if (!value) { + this.unset("description"); + } else { + this.set("description", Value.fromString(value)); + } + } +} + +export class Collection extends Entity { + constructor(id: string) { + super(); + this.set("id", Value.fromString(id)); + + this.set("collectionName", Value.fromString("")); + this.set("collectionSymbol", Value.fromString("")); + this.set("collectionAddress", Value.fromBytes(Bytes.empty())); + } + + save(): void { + let id = this.get("id"); + assert(id != null, "Cannot save Collection entity without an ID"); + if (id) { + assert( + id.kind == ValueKind.STRING, + "Cannot save Collection entity with non-string ID. " + + 'Considering using .toHex() to convert the "id" to a string.' + ); + store.set("Collection", id.toString(), this); + } + } + + static load(id: string): Collection | null { + return changetype(store.get("Collection", id)); + } + + get id(): string { + let value = this.get("id"); + return value!.toString(); + } + + set id(value: string) { + this.set("id", Value.fromString(value)); + } + + get collectionName(): string { + let value = this.get("collectionName"); + return value!.toString(); + } + + set collectionName(value: string) { + this.set("collectionName", Value.fromString(value)); + } + + get collectionSymbol(): string { + let value = this.get("collectionSymbol"); + return value!.toString(); + } + + set collectionSymbol(value: string) { + this.set("collectionSymbol", Value.fromString(value)); + } + + get collectionAddress(): Bytes { + let value = this.get("collectionAddress"); + return value!.toBytes(); + } + + set collectionAddress(value: Bytes) { + this.set("collectionAddress", Value.fromBytes(value)); + } +} diff --git a/generated/templates.ts b/generated/templates.ts new file mode 100644 index 0000000..12bef44 --- /dev/null +++ b/generated/templates.ts @@ -0,0 +1,17 @@ +// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. + +import { + Address, + DataSourceTemplate, + DataSourceContext +} from "@graphprotocol/graph-ts"; + +export class Erc721 extends DataSourceTemplate { + static create(address: Address): void { + DataSourceTemplate.create("Erc721", [address.toHex()]); + } + + static createWithContext(address: Address, context: DataSourceContext): void { + DataSourceTemplate.createWithContext("Erc721", [address.toHex()], context); + } +} diff --git a/generated/templates/Erc721/ERC721.ts b/generated/templates/Erc721/ERC721.ts new file mode 100644 index 0000000..d79299e --- /dev/null +++ b/generated/templates/Erc721/ERC721.ts @@ -0,0 +1,700 @@ +// 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 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 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 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()); + } + + baseURI(): string { + let result = super.call("baseURI", "baseURI():(string)", []); + + return result[0].toString(); + } + + try_baseURI(): ethereum.CallResult { + let result = super.tryCall("baseURI", "baseURI():(string)", []); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toString()); + } + + 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()); + } + + mintItem(to: Address, tokenURI: string): BigInt { + let result = super.call("mintItem", "mintItem(address,string):(uint256)", [ + ethereum.Value.fromAddress(to), + ethereum.Value.fromString(tokenURI) + ]); + + return result[0].toBigInt(); + } + + try_mintItem(to: Address, tokenURI: string): ethereum.CallResult { + let result = super.tryCall( + "mintItem", + "mintItem(address,string):(uint256)", + [ethereum.Value.fromAddress(to), ethereum.Value.fromString(tokenURI)] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toBigInt()); + } + + 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()); + } + + owner(): Address { + let result = super.call("owner", "owner():(address)", []); + + return result[0].toAddress(); + } + + try_owner(): ethereum.CallResult
{ + let result = super.tryCall("owner", "owner():(address)", []); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toAddress()); + } + + 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; + } +} + +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 MintItemCall extends ethereum.Call { + get inputs(): MintItemCall__Inputs { + return new MintItemCall__Inputs(this); + } + + get outputs(): MintItemCall__Outputs { + return new MintItemCall__Outputs(this); + } +} + +export class MintItemCall__Inputs { + _call: MintItemCall; + + constructor(call: MintItemCall) { + this._call = call; + } + + get to(): Address { + return this._call.inputValues[0].value.toAddress(); + } + + get tokenURI(): string { + return this._call.inputValues[1].value.toString(); + } +} + +export class MintItemCall__Outputs { + _call: MintItemCall; + + constructor(call: MintItemCall) { + this._call = call; + } + + get value0(): BigInt { + return this._call.outputValues[0].value.toBigInt(); + } +} + +export class RenounceOwnershipCall extends ethereum.Call { + get inputs(): RenounceOwnershipCall__Inputs { + return new RenounceOwnershipCall__Inputs(this); + } + + get outputs(): RenounceOwnershipCall__Outputs { + return new RenounceOwnershipCall__Outputs(this); + } +} + +export class RenounceOwnershipCall__Inputs { + _call: RenounceOwnershipCall; + + constructor(call: RenounceOwnershipCall) { + this._call = call; + } +} + +export class RenounceOwnershipCall__Outputs { + _call: RenounceOwnershipCall; + + constructor(call: RenounceOwnershipCall) { + 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; + } +} + +export class TransferOwnershipCall extends ethereum.Call { + get inputs(): TransferOwnershipCall__Inputs { + return new TransferOwnershipCall__Inputs(this); + } + + get outputs(): TransferOwnershipCall__Outputs { + return new TransferOwnershipCall__Outputs(this); + } +} + +export class TransferOwnershipCall__Inputs { + _call: TransferOwnershipCall; + + constructor(call: TransferOwnershipCall) { + this._call = call; + } + + get newOwner(): Address { + return this._call.inputValues[0].value.toAddress(); + } +} + +export class TransferOwnershipCall__Outputs { + _call: TransferOwnershipCall; + + constructor(call: TransferOwnershipCall) { + this._call = call; + } +} diff --git a/package.json b/package.json index d5e151a..ce215b8 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ }, "dependencies": { "@graphprotocol/graph-cli": "0.27.0", - "@graphprotocol/graph-ts": "0.24.1" + "@graphprotocol/graph-ts": "0.24.1", + "matchstick-as": "https://github.com/LimeChain/matchstick-as#tests_ux_improvements" } } diff --git a/tests/erc721.test.ts b/tests/erc721.test.ts new file mode 100644 index 0000000..084bce9 --- /dev/null +++ b/tests/erc721.test.ts @@ -0,0 +1,20 @@ +import { Address, ethereum, BigInt } from "@graphprotocol/graph-ts"; +import { clearStore, test, assert, describe, beforeEach, newMockEvent } from "matchstick-as/assembly/index"; +import { Collection } from "../generated/schema"; +import { createCollection, createNewMockTransferEvent } from "./helper"; +import { + Transfer + } from "../generated/ERC721/ERC721" + +describe("ERC721 Tests", () => { + beforeEach(() => { + createCollection(); + }) + test("Transfer - Mint", () => { + let from = Address.fromString("0x28c6c06298d514db089934071355e5743bf21d60"); + let to = Address.fromString("0x0dda28d190b17ba5a8774064de4386347b33220e"); + let tokenId = BigInt.fromString("1"); + let mockTransferEvent = createNewMockTransferEvent(from, to, tokenId); + }) +}) + diff --git a/tests/helper.ts b/tests/helper.ts new file mode 100644 index 0000000..c51f8db --- /dev/null +++ b/tests/helper.ts @@ -0,0 +1,33 @@ +import { Address, ethereum, BigInt } from "@graphprotocol/graph-ts"; +import { newMockEvent } from "matchstick-as"; +import { Transfer } from "../generated/ERC721/ERC721"; +import { Collection } from "../generated/schema"; + + +const colllectionAddress1 = Address.fromString("0xba5bde662c17e2adff1075610382b9b691296350"); + +export function createCollection() { + let collection = new Collection(colllectionAddress1.toHex()) + collection.collectionAddress = colllectionAddress1; + collection.collectionName = "SUPER"; + collection.collectionSymbol = "SPR"; + collection.save(); +} + +export function createNewMockTransferEvent(from: Address, to: Address, tokenId: BigInt) { + let mockEvent = newMockEvent(); + let fromParam = new ethereum.EventParam("from", ethereum.Value.fromAddress(from)); + let toParam = new ethereum.EventParam("to", ethereum.Value.fromAddress(to)); + let tokenIdParam = new ethereum.EventParam("tokenId", ethereum.Value.fromSignedBigInt(tokenId)); + + let mockTransferEvent = new Transfer( + mockEvent.address, + mockEvent.logIndex, + mockEvent.transactionLogIndex, + mockEvent.logType, + mockEvent.block, + mockEvent.transaction, + [fromParam, toParam, tokenIdParam] + ); + return mockTransferEvent; +} diff --git a/yarn.lock b/yarn.lock index 8efbaf4..6aa55f6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -244,6 +244,13 @@ dependencies: assemblyscript "0.19.10" +"@graphprotocol/graph-ts@^0.26.0": + version "0.26.0" + resolved "https://registry.yarnpkg.com/@graphprotocol/graph-ts/-/graph-ts-0.26.0.tgz#576f995531eebaca4374901aeaff499219e382e8" + integrity sha512-GW/emOJl+35MXgmIxTnUK7dJtPCaB9u5aAwoLVqJ8swogC794O92UrXMVrAJsherUriu+yI9bLMGmNPOIi60jw== + dependencies: + assemblyscript "0.19.10" + "@types/bn.js@^5.1.0": version "5.1.0" resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.0.tgz#32c5d271503a12653c62cf4d2b45e6eab8cebc68" @@ -460,6 +467,15 @@ assemblyscript@0.19.10: binaryen "101.0.0-nightly.20210723" long "^4.0.0" +assemblyscript@^0.19.20: + version "0.19.23" + resolved "https://registry.yarnpkg.com/assemblyscript/-/assemblyscript-0.19.23.tgz#16ece69f7f302161e2e736a0f6a474e6db72134c" + integrity sha512-fwOQNZVTMga5KRsfY80g7cpOl4PsFQczMwHzdtgoqLXaYhkhavufKb0sB0l3T1DUxpAufA0KNhlbpuuhZUwxMA== + dependencies: + binaryen "102.0.0-nightly.20211028" + long "^5.2.0" + source-map-support "^0.5.20" + assert-plus@1.0.0, assert-plus@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" @@ -547,6 +563,11 @@ binaryen@101.0.0-nightly.20210723: resolved "https://registry.yarnpkg.com/binaryen/-/binaryen-101.0.0-nightly.20210723.tgz#b6bb7f3501341727681a03866c0856500eec3740" integrity sha512-eioJNqhHlkguVSbblHOtLqlhtC882SOEPKmNFZaDuz1hzQjolxZ+eu3/kaS10n3sGPONsIZsO7R9fR00UyhEUA== +binaryen@102.0.0-nightly.20211028: + version "102.0.0-nightly.20211028" + resolved "https://registry.yarnpkg.com/binaryen/-/binaryen-102.0.0-nightly.20211028.tgz#8f1efb0920afd34509e342e37f84313ec936afb2" + integrity sha512-GCJBVB5exbxzzvyt8MGDv/MeUjs6gkXDvf4xOIItRBptYl0Tz5sm1o/uG95YK0L0VeG5ajDu3hRtkBP2kzqC5w== + bindings@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" @@ -1390,9 +1411,9 @@ glob@^7.1.3: once "^1.3.0" path-is-absolute "^1.0.0" -"gluegun@git+https://github.com/edgeandnode/gluegun.git#v4.3.1-pin-colors-dep": +"gluegun@https://github.com/edgeandnode/gluegun#v4.3.1-pin-colors-dep": version "4.3.1" - resolved "git+https://github.com/edgeandnode/gluegun.git#b34b9003d7bf556836da41b57ef36eb21570620a" + resolved "https://github.com/edgeandnode/gluegun#b34b9003d7bf556836da41b57ef36eb21570620a" dependencies: apisauce "^1.0.1" app-module-path "^2.2.0" @@ -2108,6 +2129,11 @@ long@^4.0.0: resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28" integrity sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA== +long@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/long/-/long-5.2.0.tgz#2696dadf4b4da2ce3f6f6b89186085d94d52fd61" + integrity sha512-9RTUNjK60eJbx3uz+TEGF7fUr29ZDxR5QzXcyDpeSfeH28S9ycINflOgOlppit5U+4kNTe83KQnMEerw7GmE8w== + looper@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/looper/-/looper-3.0.0.tgz#2efa54c3b1cbaba9b94aee2e5914b0be57fbb749" @@ -2141,6 +2167,14 @@ mafmt@^7.0.0: dependencies: multiaddr "^7.3.0" +"matchstick-as@https://github.com/LimeChain/matchstick-as#tests_ux_improvements": + version "0.5.0" + resolved "https://github.com/LimeChain/matchstick-as#491b9822196a2b9f42e2bf45fccce6c7a43472cf" + dependencies: + "@graphprotocol/graph-ts" "^0.26.0" + assemblyscript "^0.19.20" + wabt "1.0.24" + md5.js@^1.3.4: version "1.3.5" resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" @@ -2955,6 +2989,19 @@ signed-varint@^2.0.1: dependencies: varint "~5.0.0" +source-map-support@^0.5.20: + version "0.5.21" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" + integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map@^0.6.0: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + split-ca@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/split-ca/-/split-ca-1.0.1.tgz#6c83aff3692fa61256e0cd197e05e9de157691a6" @@ -3279,6 +3326,11 @@ verror@1.10.0: core-util-is "1.0.2" extsprintf "^1.2.0" +wabt@1.0.24: + version "1.0.24" + resolved "https://registry.yarnpkg.com/wabt/-/wabt-1.0.24.tgz#c02e0b5b4503b94feaf4a30a426ef01c1bea7c6c" + integrity sha512-8l7sIOd3i5GWfTWciPL0+ff/FK/deVK2Q6FN+MPz4vfUcD78i2M/49XJTwF6aml91uIiuXJEsLKWMB2cw/mtKg== + wcwidth@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8"