MCPcopy Create free account
hub / github.com/Sifchain/sifnode / newClientContext

Function newClientContext

scripts/cli_tests/client.go:34–56  ·  view source on GitHub ↗
(uri string, client *rpchttp.HTTP, args Args, config params.EncodingConfig)

Source from the content-addressed store, hash-verified

32}
33
34func newClientContext(uri string, client *rpchttp.HTTP, args Args, config params.EncodingConfig) (tx.Factory, sdkclient.Context) {
35 txf := tx.Factory{}.
36 WithChainID(args.ChainID).
37 WithFees(args.Fees).
38 WithKeybase(args.Keybase).
39 WithAccountRetriever(authtypes.AccountRetriever{}).
40 WithTxConfig(config.TxConfig).
41 WithGas(100000000)
42
43 clientCtx := sdkclient.Context{}.
44 WithNodeURI(uri).
45 WithClient(client).
46 WithFrom(args.Sender.String()).
47 WithFromAddress(args.Sender).
48 WithTxConfig(config.TxConfig).
49 WithInterfaceRegistry(config.InterfaceRegistry).
50 WithSkipConfirmation(true).
51 WithFromName(args.SenderName).
52 WithBroadcastMode("block").
53 WithOutputFormat("json")
54
55 return txf, clientCtx
56}
57
58func newClient(uri string) (*rpchttp.HTTP, error) {
59 rpcClient, err := rpchttp.New(uri, "/websocket")

Callers 1

getClientAndFactoryFunction · 0.85

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected