Skip to content

Commit

Permalink
feat(gnoclient): add MultiCall (#1565)
Browse files Browse the repository at this point in the history
## Description

This PR introduces a the MultiCall feature to the Gnoclient. It allows
for packing multiple vm.MsgCall messages into a single transaction, then
signing & publishing it.

The PR utilizes the same API, just allows for multiple MsgCall messages
in the CallCfg struct, and parses accordingly.

cc @zivkovicmilos @moul @jefft0

<details><summary>Contributors' checklist...</summary>

- [ ] Added new tests, or not needed, or not feasible
- [ ] Provided an example (e.g. screenshot) to aid review or the PR is
self-explanatory
- [ ] Updated the official documentation or not needed
- [ ] No breaking changes were made, or a `BREAKING CHANGE: xxx` message
was included in the description
- [ ] Added references to related issues and PRs
- [ ] Provided any useful hints for running manual tests
- [ ] Added new benchmarks to [generated
graphs](https://gnoland.github.io/benchmarks), if any. More info
[here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md).
</details>
  • Loading branch information
leohhhn committed Feb 1, 2024
1 parent 50d426a commit d8a6dec
Show file tree
Hide file tree
Showing 5 changed files with 700 additions and 121 deletions.
5 changes: 2 additions & 3 deletions gno.land/pkg/gnoclient/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package gnoclient

import (
rpcclient "github.com/gnolang/gno/tm2/pkg/bft/rpc/client"
"github.com/gnolang/gno/tm2/pkg/errors"
)

// Client provides an interface for interacting with the blockchain.
Expand All @@ -14,15 +13,15 @@ type Client struct {
// validateSigner checks that the signer is correctly configured.
func (c Client) validateSigner() error {
if c.Signer == nil {
return errors.New("missing Signer")
return ErrMissingSigner
}
return nil
}

// validateRPCClient checks that the RPCClient is correctly configured.
func (c Client) validateRPCClient() error {
if c.RPCClient == nil {
return errors.New("missing RPCClient")
return ErrMissingRPCClient
}
return nil
}
Loading

0 comments on commit d8a6dec

Please sign in to comment.