https://github.com/graphprotocol/juno-ts
https://github.com/graphprotocol/juno-ts
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/graphprotocol/juno-ts
- Owner: graphprotocol
- Created: 2022-09-12T17:46:55.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-05T03:09:24.000Z (almost 3 years ago)
- Last Synced: 2024-12-25T16:09:40.138Z (about 1 year ago)
- Language: TypeScript
- Size: 153 KB
- Stars: 0
- Watchers: 11
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# juno-ts
TypeScript/AssemblyScript library for decoding Juno messages.
## Usage
```typescript
import { cosmwasm, google } from "@graphprotocol/juno-ts";
function logSender(any: google.protobuf.Any) {
if (any.typeUrl == '/cosmwasm.wasm.v1.MsgExecuteContract') {
const message = cosmwasm.wasm.v1.decodeMsgExecuteContract(any.value);
console.log(message.sender);
}
}
```
## Development
Install [Protocol Buffer Compiler](https://github.com/protocolbuffers/protobuf/releases) (`protoc`) and [Lerna](https://lerna.js.org/).
### Fetch dependencies
```bash
git submodule update --init --force
```
### Build and test
```bash
yarn install
yarn build
yarn test
```
## Update dependencies
In order to update a dependency, change the value of the `branch` option in the corresponding section of the `.gitmodules` file.
> **Note**
> A submodule should always point to a tag.
```bash
git -C checkout
yarn build
yarn test
git commit -m
```