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

fixed subgraph mapping #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion graph/build/SmartReader/abis/SmartReader.json
Original file line number Diff line number Diff line change
Expand Up @@ -137,4 +137,4 @@
"stateMutability": "view",
"type": "function"
}
]
]
2 changes: 1 addition & 1 deletion graph/build/subgraph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ dataSources:
name: SmartReader
network: goerli
source:
address: '0xdFFfB2E3CCeB7D25B4be73Ce5e03a78Fb22342A2'
address: "0xdFFfB2E3CCeB7D25B4be73Ce5e03a78Fb22342A2"
abi: SmartReader
startBlock: 8598408
mapping:
Expand Down
18 changes: 9 additions & 9 deletions graph/generated/SmartReader/SmartReader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import {
Entity,
Bytes,
Address,
BigInt,
} from '@graphprotocol/graph-ts';
BigInt
} from "@graphprotocol/graph-ts";

export class AnnotationAdded extends ethereum.Event {
get params(): AnnotationAdded__Params {
Expand Down Expand Up @@ -64,13 +64,13 @@ export class ContractAdded__Params {

export class SmartReader extends ethereum.SmartContract {
static bind(address: Address): SmartReader {
return new SmartReader('SmartReader', address);
return new SmartReader("SmartReader", address);
}

contractStorage(param0: Address, param1: string): string {
let result = super.call(
'contractStorage',
'contractStorage(address,string):(string)',
"contractStorage",
"contractStorage(address,string):(string)",
[ethereum.Value.fromAddress(param0), ethereum.Value.fromString(param1)]
);

Expand All @@ -82,8 +82,8 @@ export class SmartReader extends ethereum.SmartContract {
param1: string
): ethereum.CallResult<string> {
let result = super.tryCall(
'contractStorage',
'contractStorage(address,string):(string)',
"contractStorage",
"contractStorage(address,string):(string)",
[ethereum.Value.fromAddress(param0), ethereum.Value.fromString(param1)]
);
if (result.reverted) {
Expand All @@ -94,13 +94,13 @@ export class SmartReader extends ethereum.SmartContract {
}

owner(): Address {
let result = super.call('owner', 'owner():(address)', []);
let result = super.call("owner", "owner():(address)", []);

return result[0].toAddress();
}

try_owner(): ethereum.CallResult<Address> {
let result = super.tryCall('owner', 'owner():(address)', []);
let result = super.tryCall("owner", "owner():(address)", []);
if (result.reverted) {
return new ethereum.CallResult();
}
Expand Down
Loading