-
Notifications
You must be signed in to change notification settings - Fork 1
Add CosmWasm liquidity example #26
base: main
Are you sure you want to change the base?
Conversation
| "@graphprotocol/graph-cli": "https://github.com/figment-networks/graph-cli.git#cosmos-v1.1", | ||
| "@graphprotocol/graph-ts": "https://github.com/figment-networks/graph-ts.git#cosmos-v1.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use the official packages here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
messageHandlers is merged upstream ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If not, we should do that before releasing this example.
| function validateBigInt(str: string): boolean | ||
| { | ||
| for(let i = 0; i < str.length; i++) { | ||
| const num = parseInt(str[i]) | ||
| if (num == NaN) { | ||
| return false; | ||
| } | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could use the built-in API for that? https://thegraph.com/docs/en/developer/assemblyscript-api/#big-int=
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The BigInt.fromString constructor fail if the string is not all digit. I've seen occurence where the string is "Nan"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, let's keep your version then.
| }, | ||
| "dependencies": { | ||
| "@graphprotocol/juno-ts": "https://github.com/figment-networks/graph-juno-ts.git", | ||
| "assemblyscript-json": "^1.1.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can remove that now.
| @@ -0,0 +1,3 @@ | |||
| # CosmWasm Liquidity Example | |||
|
|
|||
| This example subgraph stores `Contract` objects that represent CosmWasm contract. In order to do that, the handler function decode all `MsgExecuteContract` messages. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the handler function decode all
MsgExecuteContractmessages.
decode => decodes
|
so? |
No description provided.