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

Anchor the ts-proto plugin version to v1.181.2 #97

Merged
merged 2 commits into from
Sep 20, 2024
Merged
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
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Collection of packages which allow you to build SEDA Data Requests:

# Quick getting started

The easiest way to get started it by using our [starter kit](https://github.com/sedaprotocol/seda-sdk-starter-template) this has all the tools installed that you need:
The easiest way to get started it by using our [starter kit](https://github.com/sedaprotocol/seda-request-starter-kit) this has all the tools installed that you need:

- AssemblyScript
- JSON-AS
Expand All @@ -47,7 +47,7 @@ For API documentation check [the TypeDocs](https://sedaprotocol.github.io/seda-s
Below is an example of an Oracle Program that retrieves the name of a planet in the SWAPI database.

```ts
import { Process, httpFetch, OracleProgram, Bytes, JSON } from '@seda-protocol/as-sdk/assembly';
import { Process, httpFetch, OracleProgram, Bytes, JSON } from "@seda-protocol/as-sdk/assembly";

// The JSON schema of the response we're expecting, since in AssemblyScript we need to deserialize JSON into structured objects
@json
Expand All @@ -69,7 +69,7 @@ class PlanetProgram extends OracleProgram {
// Exits the program (with an exit code of 0) and sets the Data Request result to the planet name
Process.success(Bytes.fromUtf8String(planet.name));
} else {
Process.error(Bytes.fromUtf8String('Error while fetching'));
Process.error(Bytes.fromUtf8String("Error while fetching"));
}
}
}
Expand All @@ -82,25 +82,25 @@ new PlanetProgram().run();
In order to test this we can use a JS testing suite (we use Bun:test in this repository and the starter kits, but any runner should work). We use the `@seda-protocol/dev-tools` package for this, which runs the Oracle Program in a similar environment as it would on the SEDA network:

```ts
import { executeDrWasm } from '@seda-protocol/dev-tools';
import { readFile } from 'node:fs/promises';
import { executeDrWasm } from "@seda-protocol/dev-tools";
import { readFile } from "node:fs/promises";

const WASM_PATH = 'build/debug.wasm';
const WASM_PATH = "build/debug.wasm";

describe('Oracle Program: execution', () => {
it('should be able to run', async () => {
describe("Oracle Program: execution", () => {
it("should be able to run", async () => {
const wasmBinary = await readFile(WASM_PATH);

// Calls our SEDA VM
const vmResult = await executeDrWasm(
// The wasm file
wasmBinary,
// Inputs for the Oracle Program
Buffer.from('1'),
Buffer.from("1")
);

expect(vmResult.exitCode).toBe(0);
expect(vmResult.resultAsString).toBe('Tatooine');
expect(vmResult.resultAsString).toBe("Tatooine");
});
});
```
Binary file modified bun.lockb
Binary file not shown.
2 changes: 1 addition & 1 deletion libs/dev-tools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The SEDA dev tools includes a CLI to interact with the SEDA chain as well as a c

Command Line Interface (CLI) for the SEDA SDK. Allows you to upload list and show information about Data Request binaries.

This guide assumes you have already a package.json in place and a wasm binary. If not you can use our [starter template](https://github.com/sedaprotocol/seda-sdk-starter-template), which already has all dependencies you need.
This guide assumes you have already a package.json in place and a wasm binary. If not you can use our [starter template](https://github.com/sedaprotocol/seda-request-starter-kit), which already has all dependencies you need.

First add the SEDA SDK dev tools to your `devDependencies`:

Expand Down
10 changes: 5 additions & 5 deletions libs/dev-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
},
"main": "build/index.js",
"dependencies": {
"@cosmjs/cosmwasm-stargate": "^0.32.3",
"@cosmjs/crypto": "^0.32.3",
"@cosmjs/proto-signing": "^0.32.3",
"@cosmjs/stargate": "^0.32.3",
"@cosmjs/tendermint-rpc": "^0.32.3",
"@cosmjs/cosmwasm-stargate": "^0.32.4",
"@cosmjs/crypto": "^0.32.4",
"@cosmjs/proto-signing": "^0.32.4",
"@cosmjs/stargate": "^0.32.4",
"@cosmjs/tendermint-rpc": "^0.32.4",
"@seda-protocol/proto-messages": "0.3.0-dev.0-1",
"@seda-protocol/vm": "^0.0.4",
"big.js": "^6.2.1",
Expand Down
2 changes: 1 addition & 1 deletion libs/proto-messages/gen/amino/amino.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v1.178.0
// protoc-gen-ts_proto v1.181.2
// protoc unknown
// source: amino/amino.proto

Expand Down
2 changes: 1 addition & 1 deletion libs/proto-messages/gen/cosmos/auth/v1beta1/auth.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v1.178.0
// protoc-gen-ts_proto v1.181.2
// protoc unknown
// source: cosmos/auth/v1beta1/auth.proto

Expand Down
2 changes: 1 addition & 1 deletion libs/proto-messages/gen/cosmos/base/v1beta1/coin.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v1.178.0
// protoc-gen-ts_proto v1.181.2
// protoc unknown
// source: cosmos/base/v1beta1/coin.proto

Expand Down
2 changes: 1 addition & 1 deletion libs/proto-messages/gen/cosmos/msg/v1/msg.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v1.178.0
// protoc-gen-ts_proto v1.181.2
// protoc unknown
// source: cosmos/msg/v1/msg.proto

Expand Down
2 changes: 1 addition & 1 deletion libs/proto-messages/gen/cosmos/staking/v1beta1/staking.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v1.178.0
// protoc-gen-ts_proto v1.181.2
// protoc unknown
// source: cosmos/staking/v1beta1/staking.proto

Expand Down
2 changes: 1 addition & 1 deletion libs/proto-messages/gen/cosmos/vesting/v1beta1/vesting.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v1.178.0
// protoc-gen-ts_proto v1.181.2
// protoc unknown
// source: cosmos/vesting/v1beta1/vesting.proto

Expand Down
2 changes: 1 addition & 1 deletion libs/proto-messages/gen/cosmos_proto/cosmos.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v1.178.0
// protoc-gen-ts_proto v1.181.2
// protoc unknown
// source: cosmos_proto/cosmos.proto

Expand Down
2 changes: 1 addition & 1 deletion libs/proto-messages/gen/gogoproto/gogo.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v1.178.0
// protoc-gen-ts_proto v1.181.2
// protoc unknown
// source: gogoproto/gogo.proto

Expand Down
2 changes: 1 addition & 1 deletion libs/proto-messages/gen/google/api/annotations.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v1.178.0
// protoc-gen-ts_proto v1.181.2
// protoc unknown
// source: google/api/annotations.proto

Expand Down
2 changes: 1 addition & 1 deletion libs/proto-messages/gen/google/api/http.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v1.178.0
// protoc-gen-ts_proto v1.181.2
// protoc unknown
// source: google/api/http.proto

Expand Down
11 changes: 5 additions & 6 deletions libs/proto-messages/gen/google/protobuf/any.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v1.178.0
// protoc-gen-ts_proto v1.181.2
// protoc unknown
// source: google/protobuf/any.proto

Expand Down Expand Up @@ -37,7 +37,7 @@ import _m0 from "protobufjs/minimal";
* foo = any.unpack(Foo.getDefaultInstance());
* }
*
* Example 3: Pack and unpack a message in Python.
* Example 3: Pack and unpack a message in Python.
*
* foo = Foo(...)
* any = Any()
Expand All @@ -47,7 +47,7 @@ import _m0 from "protobufjs/minimal";
* any.Unpack(foo)
* ...
*
* Example 4: Pack and unpack a message in Go
* Example 4: Pack and unpack a message in Go
*
* foo := &pb.Foo{...}
* any, err := anypb.New(foo)
Expand All @@ -67,7 +67,7 @@ import _m0 from "protobufjs/minimal";
* name "y.z".
*
* JSON
* ====
*
* The JSON representation of an `Any` value uses the regular
* representation of the deserialized, embedded message, with an
* additional field `@type` which contains the type URL. Example:
Expand Down Expand Up @@ -119,8 +119,7 @@ export interface Any {
*
* Note: this functionality is not currently available in the official
* protobuf release, and it is not used for type URLs beginning with
* type.googleapis.com. As of May 2023, there are no widely used type server
* implementations and no plans to implement one.
* type.googleapis.com.
*
* Schemes other than `http`, `https` (or the empty scheme) might be
* used with implementation specific semantics.
Expand Down
Loading
Loading