diff --git a/tests/e2e/main_test.go b/tests/e2e/main_test.go index e91f148..26e6031 100644 --- a/tests/e2e/main_test.go +++ b/tests/e2e/main_test.go @@ -93,16 +93,25 @@ func (s *BabylonSDKTestSuite) Test1ContractDeployment() { s.NoError(err) s.Equal(adminResp["admin"], s.ConsumerCli.GetSender().String()) + // get Babylon contract address + babylonContractAddress := s.ConsumerContract.Babylon.String() + btcStakingContractAddress := s.ConsumerContract.BTCStaking.String() + // update the contract address in parameters msgUpdateParams := &bbntypes.MsgUpdateParams{ Authority: s.ConsumerApp.BabylonKeeper.GetAuthority(), Params: bbntypes.Params{ MaxGasBeginBlocker: 500_000, - BabylonContractAddress: s.ConsumerContract.Babylon.String(), - BtcStakingContractAddress: s.ConsumerContract.BTCStaking.String(), + BabylonContractAddress: babylonContractAddress, + BtcStakingContractAddress: btcStakingContractAddress, }, } s.ConsumerCli.MustExecGovProposal(msgUpdateParams) + + // assert the contract addresses are updated + params := s.ConsumerApp.BabylonKeeper.GetParams(s.ConsumerChain.GetContext()) + s.Equal(babylonContractAddress, params.BabylonContractAddress) + s.Equal(btcStakingContractAddress, params.BtcStakingContractAddress) } // TestExample is an example test case