Commit 91386f8b authored by vicotor's avatar vicotor

update

parent 20089216
#!/bin/bash #!/bin/bash
graph create klk-mint-bsc --node http://127.0.0.1:30020 graph create klk-mint-bsc --node http://127.0.0.1:20020
graph deploy klk-mint-bsc --node http://127.0.0.1:20020 --ipfs http://127.0.0.1:25001
version: '3' version: '3'
services: services:
graph-node: graph-node:
#image: graphprotocol/graph-node image: graphprotocol/graph-node
image: graph-node:latest #image: graph-node:latest
ports: ports:
- '20000:8000' - '20000:8000'
- '20001:8001' - '20001:8001'
......
...@@ -9,6 +9,7 @@ import { ...@@ -9,6 +9,7 @@ import {
Bytes, Bytes,
BigInt, BigInt,
BigDecimal, BigDecimal,
log,
} from "@graphprotocol/graph-ts"; } from "@graphprotocol/graph-ts";
export class Transfer extends Entity { export class Transfer extends Entity {
...@@ -21,6 +22,7 @@ export class Transfer extends Entity { ...@@ -21,6 +22,7 @@ export class Transfer extends Entity {
let id = this.get("id"); let id = this.get("id");
assert(id != null, "Cannot save Transfer entity without an ID"); assert(id != null, "Cannot save Transfer entity without an ID");
if (id) { if (id) {
log.info("Save Transfer id: {}", [id.toBytes().toHexString()])
assert( assert(
id.kind == ValueKind.BYTES, id.kind == ValueKind.BYTES,
`Entities of type Transfer must have an ID of type Bytes but the id '${id.displayData()}' is of type ${id.displayKind()}`, `Entities of type Transfer must have an ID of type Bytes but the id '${id.displayData()}' is of type ${id.displayKind()}`,
...@@ -384,6 +386,7 @@ export class Minted extends Entity { ...@@ -384,6 +386,7 @@ export class Minted extends Entity {
let id = this.get("id"); let id = this.get("id");
assert(id != null, "Cannot save Minted entity without an ID"); assert(id != null, "Cannot save Minted entity without an ID");
if (id) { if (id) {
log.info("Save Minted id: {}", [id.toBytes().toHexString()])
assert( assert(
id.kind == ValueKind.BYTES, id.kind == ValueKind.BYTES,
`Entities of type Minted must have an ID of type Bytes but the id '${id.displayData()}' is of type ${id.displayKind()}`, `Entities of type Minted must have an ID of type Bytes but the id '${id.displayData()}' is of type ${id.displayKind()}`,
......
#!/bin/bash
graph deploy klk-mint-bsc --node http://172.17.0.1:30020 --ipfs http://172.17.0.1:35001
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment