MCPcopy Create free account
hub / github.com/akash-network/node / NetworkConfig

Function NetworkConfig

tests/e2e/pyth_contract_test.go:54–75  ·  view source on GitHub ↗

NetworkConfig returns a custom network config with a short governance voting period to enable contract deployment tests to complete in a reasonable time.

()

Source from the content-addressed store, hash-verified

52// NetworkConfig returns a custom network config with a short governance voting period
53// to enable contract deployment tests to complete in a reasonable time.
54func NetworkConfig() *network.Config {
55 cfg := network.DefaultConfig(testutil.NewTestNetworkFixture,
56 network.WithInterceptState(func(cdc codec.Codec, moduleName string, state json.RawMessage) json.RawMessage {
57 if moduleName == govtypes.ModuleName {
58 var govGenState govv1.GenesisState
59 cdc.MustUnmarshalJSON(state, &govGenState)
60
61 // Short voting period for tests (10 seconds)
62 votingPeriod := 10 * time.Second
63 govGenState.Params.VotingPeriod = &votingPeriod
64
65 // Also reduce min deposit
66 govGenState.Params.MinDeposit = sdk.NewCoins(sdk.NewInt64Coin("uakt", 10000000))
67
68 return cdc.MustMarshalJSON(&govGenState)
69 }
70 return nil
71 }),
72 )
73 cfg.NumValidators = 1
74 return &cfg
75}
76
77// =====================
78// Wormhole Contract Types

Callers 1

TestIntegrationGRPCFunction · 0.85

Calls 2

DefaultConfigFunction · 0.92
WithInterceptStateFunction · 0.92

Tested by

no test coverage detected