Skip to content

Commit 3e43cb9

Browse files
committed
Add readme, get code working
1 parent 492cd0e commit 3e43cb9

File tree

4 files changed

+20
-4
lines changed

4 files changed

+20
-4
lines changed

README.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
After cloning initialise the contracts needed for testing and installing dependancies run:
2+
3+
```bash
4+
git submodule update --init --recursive
5+
yarn && cd async-contracts && yarn && cd ..
6+
```
7+
8+
### Local development and testing
9+
10+
Run:
11+
12+
```bash
13+
make graph-test
14+
```

src/mapping.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { BigInt } from "@graphprotocol/graph-ts";
1+
import { BigInt, log } from "@graphprotocol/graph-ts";
22
import {
33
Contract,
44
Approval,
@@ -57,6 +57,8 @@ export function handleBuyPriceSet(event: BuyPriceSet): void {}
5757
export function handleControlLeverUpdated(event: ControlLeverUpdated): void {}
5858

5959
export function handleCreatorWhitelisted(event: CreatorWhitelisted): void {
60+
log.warning("Whitelist", []);
61+
6062
let txTimestamp = event.block.timestamp;
6163
let blockNumber = event.block.number;
6264
let user = new ExampleEntity(txTimestamp.toString());

subgraph.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ dataSources:
66
name: Contract
77
network: ganache
88
source:
9-
address: "0x5Db1Dd1980E17050B38413B0561d95CF781CB8C5"
9+
address: "0x13759fA52EBf752aF1bbe4b6Fd6A09B6839d737c"
1010
abi: Contract
1111
startBlock: 0
1212
mapping:

yarn.lock

+2-2
Original file line numberDiff line numberDiff line change
@@ -228,9 +228,9 @@ asn1@~0.2.3:
228228
dependencies:
229229
safer-buffer "~2.1.0"
230230

231-
"assemblyscript@git+https://github.com/AssemblyScript/assemblyscript.git#36040d5b5312f19a025782b5e36663823494c2f3":
231+
"assemblyscript@https://github.com/AssemblyScript/assemblyscript#36040d5b5312f19a025782b5e36663823494c2f3":
232232
version "0.6.0"
233-
resolved "git+https://github.com/AssemblyScript/assemblyscript.git#36040d5b5312f19a025782b5e36663823494c2f3"
233+
resolved "https://github.com/AssemblyScript/assemblyscript#36040d5b5312f19a025782b5e36663823494c2f3"
234234
dependencies:
235235
"@protobufjs/utf8" "^1.1.0"
236236
binaryen "77.0.0-nightly.20190407"

0 commit comments

Comments
 (0)