Skip to content

Commit

Permalink
chore: Add MakeCallTx, etc., SignTx and BroadcastTxCommit. In go.mod …
Browse files Browse the repository at this point in the history
…use temporary replace for gno PR 2641 (#161)

PR gnolang/gno#2641 updates the `gnoclient` API
to add `MakeCallTx`, etc. and `SignTx` and `BroadcastTxCommit`. We want
to support these in the gnonative API.
* In go.mod, add a replace for github.com/gnolang/gno to the branch of
PR gnolang/gno#2641
* In gnonativetypes.go, add field `CallerAddress` to `CallRequest`,
`SendRequest` and `RunRequest`. Add `MakeTxResponse` and
request/response for `SignTx` and `BroadcastTxCommitResponse`.
* In rpc.proto, add `MakeCallTx`, etc., `SignTx` and
`BroadcastTxCommit`.
* Run `make regenerate` .
* In api.go, split out helper function `convertCallRequest` from `Call`.
Do the same for `convertSendRequest` and `convertRunRequest`. Add
`MakeCallTx` which also uses `convertCallRequest`. Do the same for
`MakeSendTx` and `MakeRunTx`. Add `SignTx` and `BroadcastTxCommit`.
* Note that `MakeCallTx` converts the tx structure to JSON using
`amino.MarshalJSON(tx)` . This is the same thing as done by the
command-line `gnokey maketx call` .

Signed-off-by: Jeff Thompson <[email protected]>
  • Loading branch information
jefft0 authored Aug 2, 2024
1 parent ae68a32 commit a1d6b19
Show file tree
Hide file tree
Showing 19 changed files with 4,297 additions and 1,974 deletions.
1,559 changes: 1,388 additions & 171 deletions api/gen/csharp/Gnonativetypes.cs

Large diffs are not rendered by default.

41 changes: 26 additions & 15 deletions api/gen/csharp/Rpc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ static RpcReflection() {
"ARIZChRFcnJUb29NYW55U2lnbmF0dXJlcxDWARIUCg9FcnJOb1NpZ25hdHVy",
"ZXMQ1wESEwoORXJyR2FzT3ZlcmZsb3cQ2AESFgoRRXJySW52YWxpZFBrZ1Bh",
"dGgQ2QESEwoORXJySW52YWxpZFN0bXQQ2gESEwoORXJySW52YWxpZEV4cHIQ",
"2wEyixgKEEdub05hdGl2ZVNlcnZpY2USXgoJU2V0UmVtb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bmF0aXZlLnYxLkFk",
"ZHJlc3NUb0JlY2gzMlJlcXVlc3QaLi5sYW5kLmduby5nbm9uYXRpdmUudjEu",
"QWRkcmVzc1RvQmVjaDMyUmVzcG9uc2USdgoRQWRkcmVzc0Zyb21CZWNoMzIS",
"Ly5sYW5kLmduby5nbm9uYXRpdmUudjEuQWRkcmVzc0Zyb21CZWNoMzJSZXF1",
"ZXN0GjAubGFuZC5nbm8uZ25vbmF0aXZlLnYxLkFkZHJlc3NGcm9tQmVjaDMy",
"UmVzcG9uc2USfAoTQWRkcmVzc0Zyb21NbmVtb25pYxIxLmxhbmQuZ25vLmdu",
"b25hdGl2ZS52MS5BZGRyZXNzRnJvbU1uZW1vbmljUmVxdWVzdBoyLmxhbmQu",
"Z25vLmdub25hdGl2ZS52MS5BZGRyZXNzRnJvbU1uZW1vbmljUmVzcG9uc2US",
"UgoFSGVsbG8SIy5sYW5kLmduby5nbm9uYXRpdmUudjEuSGVsbG9SZXF1ZXN0",
"GiQubGFuZC5nbm8uZ25vbmF0aXZlLnYxLkhlbGxvUmVzcG9uc2USZgoLSGVs",
"bG9TdHJlYW0SKS5sYW5kLmduby5nbm9uYXRpdmUudjEuSGVsbG9TdHJlYW1S",
"ZXF1ZXN0GioubGFuZC5nbm8uZ25vbmF0aXZlLnYxLkhlbGxvU3RyZWFtUmVz",
"cG9uc2UwAUIvWidnaXRodWIuY29tL2dub2xhbmcvZ25vbmF0aXZlL2FwaS9n",
"ZW4vZ2+iAgNSVEdiBnByb3RvMw=="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global::Land.Gno.Gnonative.V1.GnonativetypesReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Land.Gno.Gnonative.V1.ErrCode), }, null, new pbr::GeneratedClrTypeInfo[] {
Expand Down
347 changes: 347 additions & 0 deletions api/gen/csharp/RpcGrpc.cs

Large diffs are not rendered by default.

Loading

0 comments on commit a1d6b19

Please sign in to comment.