NetworkConfig returns a custom network config with a short governance voting period to enable contract deployment tests to complete in a reasonable time.
()
| 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. |
| 54 | func 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 |
no test coverage detected