From 3f795224b6029e4613ac360af6018d95f71571a0 Mon Sep 17 00:00:00 2001 From: Michael Pretorius Date: Tue, 14 Mar 2023 17:48:48 +0200 Subject: [PATCH] fix: update defaults and fix entity proposal handler for gracefull fail --- scripts/constants.sh | 2 +- x/claims/types/params.go | 2 +- x/entity/proposal_handler.go | 4 +++- x/entity/types/entity.go | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/constants.sh b/scripts/constants.sh index 8f267ecd..a501a8a1 100644 --- a/scripts/constants.sh +++ b/scripts/constants.sh @@ -2,7 +2,7 @@ PASSWORD="12345678" GAS_PRICES="0.025uixo" -CHAIN_ID="pandora-4" +CHAIN_ID="pandora-8" NODE="https://devnet.ixo.earth:443/rpc/" USERS=(alice bob charlie miguel francesco shaun fee fee2 fee3 fee4 fee5 reserveOut) diff --git a/x/claims/types/params.go b/x/claims/types/params.go index 30363ba0..33f1445f 100644 --- a/x/claims/types/params.go +++ b/x/claims/types/params.go @@ -34,7 +34,7 @@ func NewParams(collectionSequence uint64, ixoAccount string, // DefaultParams returns a default set of parameters func DefaultParams() Params { - defaultIxoAccount := "ixo1y0d7w5xfj9a0p7ygpx0uwvyrnmmqj3fd4sva7t" + defaultIxoAccount := "ixo1kqmtxkggcqa9u34lnr6shy0euvclgatw4f9zz5" tenPercentFee := sdk.NewDec(10) return NewParams(1, defaultIxoAccount, tenPercentFee, tenPercentFee) diff --git a/x/entity/proposal_handler.go b/x/entity/proposal_handler.go index 22affb72..6c671860 100644 --- a/x/entity/proposal_handler.go +++ b/x/entity/proposal_handler.go @@ -51,7 +51,9 @@ func handleTokenParameterChangeProposal(ctx sdk.Context, k keeper.Keeper, p *typ contractAddr, _, err := k.WasmKeeper.Instantiate(ctx, p.NftContractCodeId, senderAddr, adminAddr, encodedInitiateNftContractMsg, "initiate_entity_nft_contract", sdk.NewCoins(sdk.NewCoin("uixo", sdk.ZeroInt()))) if err != nil { - return err + // return nil as still want proposal to pass even though contractCode doest'n exist yet (for entity module bootstrap purposes) + // if error it means proposal is just like empty proposal, look into returning error in future + return nil } xx.NftContractAddress = contractAddr.String() diff --git a/x/entity/types/entity.go b/x/entity/types/entity.go index 5627b54c..726dc321 100644 --- a/x/entity/types/entity.go +++ b/x/entity/types/entity.go @@ -83,7 +83,7 @@ func NewParams(nftContractAddress string, nftContractMinter string, createSequen func DefaultParams() Params { return Params{ NftContractAddress: "ixo14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9sqa3vn7", - NftContractMinter: "ixo14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9sqa3vn7", + NftContractMinter: "ixo1g7xtrvc8ejkenee8a3gryvx6d4n9uu6gpsx63z", CreateSequence: 0, } }