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

feat(gnoclient): add MultiCall #1565

Merged
merged 45 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from 43 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
bf6a79f
wip save
leohhhn Jan 20, 2024
738f70c
add msgcall wrapper & add batchcall func
leohhhn Jan 21, 2024
2de3712
remove comment
leohhhn Jan 21, 2024
de83a5b
add comment
leohhhn Jan 21, 2024
05aedff
fix lint
leohhhn Jan 21, 2024
ebaf516
remove multicall func, update struct, remove aliasing
leohhhn Jan 22, 2024
9a5fd71
extract errors to pkg level
leohhhn Jan 22, 2024
bdb9f60
remove aliasing
leohhhn Jan 22, 2024
fb2416d
add preliminary tests, remove some error wrapping
leohhhn Jan 22, 2024
948dc9f
Merge branch 'master' into feat/gnoclient-batchcall
leohhhn Jan 23, 2024
79cbe36
Merge branch 'master' into feat/gnoclient-batchcall
leohhhn Jan 24, 2024
ced737b
inline caller
leohhhn Jan 25, 2024
9c91240
add baseTxCfg, modify Call flow
leohhhn Jan 25, 2024
c9e85ea
add basecfg validation, comments, errors
leohhhn Jan 25, 2024
bb828df
add more unit tests, comments
leohhhn Jan 25, 2024
175bd5e
made unit tests better
leohhhn Jan 25, 2024
f0958d8
add testcase
leohhhn Jan 25, 2024
3ad650e
Merge branch 'master' into feat/gnoclient-batchcall
leohhhn Jan 26, 2024
a6fb52d
make errors public
leohhhn Jan 29, 2024
8be378e
remove fmt.errorf
leohhhn Jan 29, 2024
def2e0b
make error names clearer
leohhhn Jan 29, 2024
4f9febf
mocking wip
leohhhn Jan 29, 2024
cb7496f
add rpcclient mock, wip tests
leohhhn Jan 31, 2024
2cd4af3
expand txbroadcast res
leohhhn Jan 31, 2024
9f6cd76
wip more tests
leohhhn Jan 31, 2024
23fb5b4
add full rpcclient mock infra
leohhhn Jan 31, 2024
3ecf8f0
simplify tests
leohhhn Jan 31, 2024
a190219
typo fix
leohhhn Jan 31, 2024
7caf692
remove comment
leohhhn Jan 31, 2024
085ce3f
fix lint
leohhhn Jan 31, 2024
849ede2
fix test err
leohhhn Jan 31, 2024
788ccb9
Merge branch 'master' into feat/gnoclient-batchcall
leohhhn Jan 31, 2024
800d188
parallel test
leohhhn Feb 1, 2024
9e8c7e2
replace assert with require
leohhhn Feb 1, 2024
a4bf5cb
add errors.Is
leohhhn Feb 1, 2024
44a0657
remove panics
leohhhn Feb 1, 2024
1bad3de
add pointer receivers
leohhhn Feb 1, 2024
a663e8e
make fmt
leohhhn Feb 1, 2024
cd707ad
Merge branch 'master' into feat/gnoclient-batchcall
leohhhn Feb 1, 2024
f6e78d2
update imports, fix assert.ErrorIs
leohhhn Feb 1, 2024
c7481f0
Merge branch 'master' into feat/gnoclient-batchcall
leohhhn Feb 1, 2024
bd9ac4b
make fmt
leohhhn Feb 1, 2024
0e6300e
remove double assert
leohhhn Feb 1, 2024
60b5963
rename mock to mock_test
leohhhn Feb 1, 2024
7354457
Merge branch 'master' into feat/gnoclient-batchcall
leohhhn Feb 1, 2024
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
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 @@

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 @@
// validateSigner checks that the signer is correctly configured.
func (c Client) validateSigner() error {
if c.Signer == nil {
return errors.New("missing Signer")
return ErrMissingSigner

Check warning on line 16 in gno.land/pkg/gnoclient/client.go

View check run for this annotation

Codecov / codecov/patch

gno.land/pkg/gnoclient/client.go#L16

Added line #L16 was not covered by tests
}
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

Check warning on line 24 in gno.land/pkg/gnoclient/client.go

View check run for this annotation

Codecov / codecov/patch

gno.land/pkg/gnoclient/client.go#L24

Added line #L24 was not covered by tests
}
return nil
}
Loading
Loading