-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Dan Kanefsky <[email protected]>
- Loading branch information
Showing
17 changed files
with
484 additions
and
49 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 @@ | ||
- Update module path for v5 release line. ([#271](https://github.com/noble-assets/noble/pull/271)) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -11,10 +11,10 @@ concurrency: | |
cancel-in-progress: true | ||
|
||
jobs: | ||
build-docker: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Build Docker image | ||
- name: Build Docker Image | ||
uses: strangelove-ventures/[email protected] | ||
with: | ||
registry: "" # empty registry, image only shared for e2e testing | ||
|
@@ -36,45 +36,45 @@ jobs: | |
name: noble-docker-image | ||
path: ${{ env.TAR_PATH }} | ||
|
||
prepare-e2e-tests: | ||
prepare: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
matrix: ${{ steps.set-matrix.outputs.matrix }} | ||
steps: | ||
- name: Checkout code | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Go 1.21 | ||
- name: Install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: '>=1.21' | ||
go-version: '1.21' | ||
|
||
- name: Generate matrix | ||
- name: Generate Matrix | ||
id: set-matrix | ||
run: | | ||
# Run the command and convert its output to a JSON array | ||
TESTS=$(cd interchaintest && go test -list . | grep -v "^ok " | jq -R -s -c 'split("\n")[:-1]') | ||
echo "matrix=${TESTS}" >> $GITHUB_OUTPUT | ||
e2e-tests: | ||
test: | ||
needs: | ||
- build-docker | ||
- prepare-e2e-tests | ||
- build | ||
- prepare | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
# names of `make` commands to run tests | ||
test: ${{fromJson(needs.prepare-e2e-tests.outputs.matrix)}} | ||
test: ${{fromJson(needs.prepare.outputs.matrix)}} | ||
fail-fast: false | ||
|
||
steps: | ||
- name: Set up Go 1.21 | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: '>=1.21' | ||
|
||
- name: checkout chain | ||
uses: actions/checkout@v4 | ||
go-version: '1.21' | ||
|
||
- name: Download Tarball Artifact | ||
uses: actions/download-artifact@v4 | ||
|
@@ -84,5 +84,5 @@ jobs: | |
- name: Load Docker Image | ||
run: docker image load -i ${{ env.TAR_PATH }} | ||
|
||
- name: run test | ||
- name: Run Tests | ||
run: cd interchaintest && go test -race -v -timeout 30m -run ^${{ matrix.test }}$ . |
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,10 @@ | ||
package krypton | ||
|
||
// UpgradeName is the name of this specific software upgrade used on-chain. | ||
const UpgradeName = "krypton" | ||
|
||
// MainnetChainID is the Chain ID of the Noble mainnet. | ||
const MainnetChainID = "noble-1" | ||
|
||
// TestnetChainID is the Chain ID of the Noble testnet. | ||
const TestnetChainID = "grand-1" |
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,16 @@ | ||
package krypton | ||
|
||
import ( | ||
"github.com/cosmos/cosmos-sdk/baseapp" | ||
storetypes "github.com/cosmos/cosmos-sdk/store/types" | ||
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" | ||
auratypes "github.com/noble-assets/aura/x/aura/types" | ||
) | ||
|
||
func CreateStoreLoader(upgradeHeight int64) baseapp.StoreLoader { | ||
storeUpgrades := storetypes.StoreUpgrades{ | ||
Added: []string{auratypes.ModuleName}, | ||
} | ||
|
||
return upgradetypes.UpgradeStoreLoader(upgradeHeight, &storeUpgrades) | ||
} |
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,58 @@ | ||
package krypton | ||
|
||
import ( | ||
"fmt" | ||
|
||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
"github.com/cosmos/cosmos-sdk/types/module" | ||
bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" | ||
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" | ||
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" | ||
aurakeeper "github.com/noble-assets/aura/x/aura/keeper" | ||
) | ||
|
||
func CreateUpgradeHandler( | ||
mm *module.Manager, | ||
cfg module.Configurator, | ||
auraKeeper *aurakeeper.Keeper, | ||
bankKeeper bankkeeper.Keeper, | ||
) upgradetypes.UpgradeHandler { | ||
return func(ctx sdk.Context, _ upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) { | ||
vm, err := mm.RunMigrations(ctx, cfg, vm) | ||
if err != nil { | ||
return vm, err | ||
} | ||
|
||
switch ctx.ChainID() { | ||
case TestnetChainID: | ||
auraKeeper.SetOwner(ctx, "noble1mxe0zwwdvjvn8dg2hnep55q4fc7sqmpud9qsqn") | ||
auraKeeper.SetBlocklistOwner(ctx, "noble1mxe0zwwdvjvn8dg2hnep55q4fc7sqmpud9qsqn") | ||
case MainnetChainID: | ||
auraKeeper.SetOwner(ctx, "") // TODO | ||
auraKeeper.SetBlocklistOwner(ctx, "") // TODO | ||
default: | ||
return vm, fmt.Errorf("%s upgrade not allowed to execute on %s chain", UpgradeName, ctx.ChainID()) | ||
} | ||
|
||
bankKeeper.SetDenomMetaData(ctx, banktypes.Metadata{ | ||
Description: "Ondo US Dollar Yield", | ||
DenomUnits: []*banktypes.DenomUnit{ | ||
{ | ||
Denom: "ausdy", | ||
Exponent: 0, | ||
Aliases: []string{"attousdy"}, | ||
}, | ||
{ | ||
Denom: "usdy", | ||
Exponent: 18, | ||
}, | ||
}, | ||
Base: "ausdy", | ||
Display: "usdy", | ||
Name: "Ondo US Dollar Yield", | ||
Symbol: "USDY", | ||
}) | ||
|
||
return vm, nil | ||
} | ||
} |
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.