diff --git a/README.md b/README.md index b94bdbedd..83acc62d6 100644 --- a/README.md +++ b/README.md @@ -16,9 +16,9 @@ Install Go. Use the 19.x series version. ```bash $ wget https://go.dev/dl/go1.19.2.linux-amd64.tar.gz -$ rm -rf /usr/local/go && tar -C /usr/local -xzf go1.19.2.linux-amd64.tar.gz +$ sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.19.2.linux-amd64.tar.gz $ vim ~/.bashrc -export PATH=$PATH:/usr/local/go/bin +export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin $ source ~/.bashrc $ go version go version go1.19.2 linux/amd64 diff --git a/app/app.go b/app/app.go index 196347395..79902b39b 100644 --- a/app/app.go +++ b/app/app.go @@ -1479,4 +1479,5 @@ func (app *App) setupAppkeeper() { app.AppKeepers.ConsensusParamsKeeper = &app.ConsensusParamsKeeper app.AppKeepers.ParamsKeeper = &app.ParamsKeeper app.AppKeepers.WasmKeeper = &app.WasmKeeper + app.AppKeepers.YieldaggregatorKeeper = &app.YieldaggregatorKeeper } diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index 5447c864c..b89b99f10 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -12,6 +12,8 @@ import ( paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper" + + yieldaggregatorKeeper "github.com/UnUniFi/chain/x/yieldaggregator/keeper" ) type AppKeepers struct { @@ -38,4 +40,7 @@ type AppKeepers struct { DistrKeeper *distrkeeper.Keeper WasmKeeper *wasmkeeper.Keeper + + // ununifi original keepers + YieldaggregatorKeeper *yieldaggregatorKeeper.Keeper } diff --git a/app/upgrades/v3/upgrades.go b/app/upgrades/v3/upgrades.go index e0c2218af..a101b4f14 100644 --- a/app/upgrades/v3/upgrades.go +++ b/app/upgrades/v3/upgrades.go @@ -18,6 +18,12 @@ func CreateUpgradeHandler(mm *module.Manager, return func(ctx sdk.Context, plan upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) { ctx.Logger().Info(fmt.Sprintf("update start:%s", UpgradeName)) + iyaParam := keepers.YieldaggregatorKeeper.GetParams(ctx) + iyaParam.CommissionRate = sdk.NewDecWithPrec(1, 3) + iyaParam.VaultCreationFee = sdk.NewCoin("uguu", sdk.NewInt(10000000)) + iyaParam.VaultCreationDeposit = sdk.NewCoin("uguu", sdk.NewInt(1000000)) + + keepers.YieldaggregatorKeeper.SetParams(ctx, iyaParam) return mm.RunMigrations(ctx, configurator, vm) } } diff --git a/docs/README.md b/docs/README.md index 8e4ccde56..114042b4f 100644 --- a/docs/README.md +++ b/docs/README.md @@ -6,7 +6,7 @@ This is an example for Ubuntu. ```shell apt update -apt install build-essential +apt install build-essential unzip cd ~ wget https://dl.google.com/go/go1.14.linux-amd64.tar.gz tar -C /usr/local -xzf go1.14.linux-amd64.tar.gz