-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #839 from comdex-official/bindings-price
added wasm bindings to fetch price per asset
- Loading branch information
Showing
9 changed files
with
299 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package v12_1 | ||
|
||
const ( | ||
UpgradeName = "v12.1.0" | ||
UpgradeHeight = "" | ||
UpgradeInfo = `'{ | ||
"binaries": { | ||
"darwin/arm64":"", | ||
"darwin/x86_64":"", | ||
"linux/arm64":"", | ||
"linux/x86_64":"", | ||
"windows/x86_64":"" | ||
} | ||
}'` | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package v12_1 | ||
|
||
import ( | ||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
"github.com/cosmos/cosmos-sdk/types/module" | ||
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" | ||
wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" | ||
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" | ||
) | ||
|
||
// An error occurred during the creation of the CMST/STJUNO pair, as it was mistakenly created in the Harbor app (ID-2) instead of the cSwap app (ID-1). | ||
// As a result, the transaction fee was charged to the creator of the pair, who is entitled to a refund. | ||
// The provided code is designed to initiate the refund process. | ||
// The transaction hash for the pair creation is EF408AD53B8BB0469C2A593E4792CB45552BD6495753CC2C810A1E4D82F3982F. | ||
// MintScan - https://www.mintscan.io/comdex/txs/EF408AD53B8BB0469C2A593E4792CB45552BD6495753CC2C810A1E4D82F3982F | ||
|
||
func CreateUpgradeHandlerV121( | ||
mm *module.Manager, | ||
configurator module.Configurator, | ||
wasmKeeper wasmkeeper.Keeper, | ||
) upgradetypes.UpgradeHandler { | ||
return func(ctx sdk.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { | ||
ctx.Logger().Info("Applying test net upgrade - v.12.1.0") | ||
|
||
vm, err := mm.RunMigrations(ctx, configurator, fromVM) | ||
if err != nil { | ||
return nil, err | ||
} | ||
|
||
// update wasm to permissionless | ||
wasmParams := wasmKeeper.GetParams(ctx) | ||
wasmParams.CodeUploadAccess = wasmtypes.AllowEverybody | ||
wasmKeeper.SetParams(ctx, wasmParams) | ||
return vm, err | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.