From 7d194c499ff849b4fca30bd2d43901b64342c296 Mon Sep 17 00:00:00 2001 From: MengXiangJian <805442788@qq.com> Date: Mon, 14 Sep 2020 08:25:46 +0800 Subject: [PATCH] Merge PR: change okchain to okexchain (#328) * change okchaincli to okexchaincli & okchaind to okexchaind * update .circleci * update Makefile * change address prefix * fix address checksum failed * change okchain package to okexchain package * update go.mod * change okchain to okexchain * fix-operator-address * bump to: github.com/okex/cosmos-sdk v0.37.9-okchain11 github.com/okex/tendermint v0.32.10-okchain2 * update tags to okexchain Co-authored-by: meng Co-authored-by: Zhong Qiu <36867992+zhongqiuwood@users.noreply.github.com> Co-authored-by: zhongqiuwood --- .circleci/config.yml | 6 +- .github/ISSUE_TEMPLATE/bug-report.md | 2 +- .github/ISSUE_TEMPLATE/feature-request.md | 2 +- .github/PULL_REQUEST_TEMPLATE.md | 2 +- .gitignore | 13 ++-- CONTRIBUTING.md | 12 ++-- Dockerfile | 6 +- Makefile | 34 +++++------ README.md | 4 +- app/abci.go | 18 +++--- app/alias.go | 6 +- app/app.go | 30 ++++----- app/app_test.go | 22 +++---- app/export.go | 10 +-- app/genesis/genesis.json | 32 +++++----- app/protocol/engine.go | 4 +- app/protocol/engine_test.go | 6 +- app/protocol/mock_protocol.go | 10 +-- app/protocol/protocol_v0.go | 64 ++++++++++---------- app/protocol/protocol_v0_test.go | 10 +-- app/protocol/store_keys.go | 24 ++++---- app/protocol/types.go | 12 ++-- cmd/{okchaincli => okexchaincli}/main.go | 14 ++--- cmd/{okchaind => okexchaind}/main.go | 18 +++--- cmd/{okchaind => okexchaind}/replay.go | 2 +- cmd/{okchaind => okexchaind}/rest.go | 20 +++--- cmd/{okchaind => okexchaind}/testnet.go | 20 +++--- docker-compose.yml | 40 ++++++------ go.mod | 8 +-- go.sum | 14 ++--- networks/local/node/wrapper.sh | 8 +-- x/ammswap/alias.go | 4 +- x/ammswap/client/cli/query.go | 35 ++++++++++- x/ammswap/client/cli/tx.go | 2 +- x/ammswap/client/rest/tx.go | 4 +- x/ammswap/genesis.go | 2 +- x/ammswap/genesis_test.go | 2 +- x/ammswap/handler.go | 6 +- x/ammswap/handler_test.go | 4 +- x/ammswap/keeper/common_test.go | 6 +- x/ammswap/keeper/keeper.go | 4 +- x/ammswap/keeper/keeper_test.go | 6 +- x/ammswap/keeper/querier.go | 11 +++- x/ammswap/keeper/querier_test.go | 4 +- x/ammswap/keeper/swap.go | 2 +- x/ammswap/keeper/swap_test.go | 4 +- x/ammswap/mock_test.go | 6 +- x/ammswap/module.go | 4 +- x/ammswap/module_test.go | 2 +- x/ammswap/types/codec.go | 8 +-- x/ammswap/types/expected_keepers.go | 2 +- x/ammswap/types/keys.go | 2 + x/ammswap/types/msgs.go | 2 +- x/ammswap/types/swap.go | 2 +- x/ammswap/types/test_common.go | 2 +- x/backend/README.md | 2 +- x/backend/abci.go | 4 +- x/backend/alias.go | 8 +-- x/backend/cache/cache.go | 2 +- x/backend/cache/cache_test.go | 4 +- x/backend/cases/utils.go | 4 +- x/backend/cases/utils_test.go | 2 +- x/backend/client/cli/query.go | 2 +- x/backend/client/rest/rest.go | 6 +- x/backend/client/rest/rest_v2.go | 4 +- x/backend/config/config.go | 8 +-- x/backend/keeper/keeper.go | 10 +-- x/backend/keeper/keeper_channel.go | 6 +- x/backend/keeper/querier.go | 6 +- x/backend/keeper/querier_v2.go | 4 +- x/backend/keeper_test.go | 16 ++--- x/backend/mock_test.go | 32 +++++----- x/backend/module.go | 4 +- x/backend/orm/orm.go | 12 ++-- x/backend/orm/orm_mysql_sys_test.go | 6 +- x/backend/orm/orm_test.go | 6 +- x/backend/querier_test.go | 6 +- x/backend/ticker_test.go | 8 +-- x/backend/types/expected_keepers.go | 10 +-- x/backend/types/klines_test.go | 2 +- x/backend/types/params_test.go | 2 +- x/backend/types/tx.go | 6 +- x/backend/types/tx_test.go | 12 ++-- x/backend/types/types.go | 2 +- x/backend/types/types_v2.go | 2 +- x/backend/types/types_v2_test.go | 2 +- x/common/util.go | 2 +- x/common/util_test.go | 2 +- x/debug/alias.go | 4 +- x/debug/client/cli/debug.go | 10 +-- x/debug/keeper/keeper.go | 2 +- x/debug/keeper/querier.go | 4 +- x/debug/module.go | 2 +- x/debug/types/expected_keepers.go | 2 +- x/dex/alias.go | 10 +-- x/dex/client/cli/query.go | 6 +- x/dex/client/cli/tx.go | 18 +++--- x/dex/client/proposal_handler.go | 6 +- x/dex/client/rest/rest.go | 6 +- x/dex/endblocker.go | 4 +- x/dex/genesis.go | 4 +- x/dex/genesis_test.go | 6 +- x/dex/handler.go | 4 +- x/dex/handler_test.go | 4 +- x/dex/keeper.md | 6 +- x/dex/keeper/expected_keeper.go | 6 +- x/dex/keeper/invariant.go | 2 +- x/dex/keeper/invariant_test.go | 2 +- x/dex/keeper/keeper.go | 6 +- x/dex/keeper/keeper_test.go | 4 +- x/dex/keeper/product_lock.go | 4 +- x/dex/keeper/product_lock_test.go | 2 +- x/dex/keeper/proposal.go | 8 +-- x/dex/keeper/proposal_test.go | 8 +-- x/dex/keeper/querier.go | 4 +- x/dex/keeper/querier_test.go | 4 +- x/dex/keeper/test_common.go | 12 ++-- x/dex/legacy/v0_11/migrate.go | 4 +- x/dex/legacy/v0_11/types.go | 2 +- x/dex/mock.go | 4 +- x/dex/module.go | 8 +-- x/dex/module_test.go | 4 +- x/dex/proposal_handler.go | 4 +- x/dex/proposal_handler_test.go | 6 +- x/dex/types/codec.go | 14 ++--- x/dex/types/const.go | 2 +- x/dex/types/msgs_test.go | 2 +- x/dex/types/params.go | 4 +- x/dex/types/proposal.go | 4 +- x/distribution/abci.go | 4 +- x/distribution/abci_test.go | 2 +- x/distribution/alias.go | 12 ++-- x/distribution/client/cli/query.go | 6 +- x/distribution/client/cli/tx.go | 10 +-- x/distribution/client/common/common.go | 2 +- x/distribution/client/proposal_handler.go | 6 +- x/distribution/client/rest/query.go | 4 +- x/distribution/client/rest/rest.go | 6 +- x/distribution/client/rest/tx.go | 4 +- x/distribution/genesis.go | 2 +- x/distribution/genesis_test.go | 2 +- x/distribution/handler.go | 6 +- x/distribution/keeper/alias.go | 2 +- x/distribution/keeper/allocation.go | 6 +- x/distribution/keeper/allocation_test.go | 4 +- x/distribution/keeper/hooks.go | 4 +- x/distribution/keeper/hooks_test.go | 2 +- x/distribution/keeper/invariants.go | 4 +- x/distribution/keeper/invariants_test.go | 2 +- x/distribution/keeper/keeper.go | 2 +- x/distribution/keeper/key.go | 2 +- x/distribution/keeper/proposal_handler.go | 2 +- x/distribution/keeper/querier.go | 2 +- x/distribution/keeper/querier_test.go | 2 +- x/distribution/keeper/store.go | 2 +- x/distribution/keeper/test_common.go | 4 +- x/distribution/keeper/validator.go | 4 +- x/distribution/module.go | 6 +- x/distribution/module_test.go | 4 +- x/distribution/proposal_handler_test.go | 6 +- x/distribution/types/codec.go | 6 +- x/distribution/types/expected_keepers.go | 2 +- x/distribution/types/keys.go | 2 +- x/distribution/types/proposal.go | 4 +- x/genutil/alias.go | 2 +- x/genutil/client/cli/collect.go | 2 +- x/genutil/client/cli/gentx.go | 2 +- x/genutil/client/cli/migrate.go | 4 +- x/genutil/collect.go | 2 +- x/genutil/gentx.go | 2 +- x/genutil/legacy/v0_11/migrate.go | 16 ++--- x/genutil/module.go | 2 +- x/genutil/types/codec.go | 2 +- x/genutil/types/genesis_state.go | 2 +- x/gov/alias.go | 4 +- x/gov/client/cli/query.go | 6 +- x/gov/client/cli/tx.go | 2 +- x/gov/endblocker.go | 4 +- x/gov/endblocker_test.go | 10 +-- x/gov/genesis.go | 4 +- x/gov/genesis_test.go | 4 +- x/gov/handler.go | 6 +- x/gov/handler_test.go | 6 +- x/gov/invariants.go | 4 +- x/gov/invariants_test.go | 4 +- x/gov/keeper/deposit.go | 2 +- x/gov/keeper/deposit_test.go | 6 +- x/gov/keeper/expected_keepers.go | 2 +- x/gov/keeper/keeper.go | 8 +-- x/gov/keeper/keeper_test.go | 2 +- x/gov/keeper/proposal.go | 2 +- x/gov/keeper/proposal_handler_router.go | 2 +- x/gov/keeper/proposal_handler_router_test.go | 2 +- x/gov/keeper/proposal_test.go | 6 +- x/gov/keeper/querier.go | 2 +- x/gov/keeper/querier_test.go | 4 +- x/gov/keeper/tally.go | 4 +- x/gov/keeper/tally_test.go | 6 +- x/gov/keeper/test_common.go | 8 +-- x/gov/keeper/vote.go | 2 +- x/gov/keeper/vote_test.go | 2 +- x/gov/module.go | 12 ++-- x/gov/module_test.go | 6 +- x/order/alias.go | 4 +- x/order/app_test.go | 10 +-- x/order/beginblocker.go | 8 +-- x/order/client/cli/query.go | 8 +-- x/order/client/cli/tx.go | 2 +- x/order/client/rest/rest.go | 6 +- x/order/client/rest/rest_doc.go | 4 +- x/order/client/rest/rest_v2.go | 6 +- x/order/endblocker.go | 8 +-- x/order/endblocker_test.go | 10 +-- x/order/genesis.go | 4 +- x/order/genesis_test.go | 8 +-- x/order/handler.go | 6 +- x/order/handler_test.go | 12 ++-- x/order/keeper/disk_cache.go | 2 +- x/order/keeper/disk_cache_keeper.go | 4 +- x/order/keeper/disk_cache_test.go | 4 +- x/order/keeper/dump_store_test.go | 4 +- x/order/keeper/expect_keepers.go | 6 +- x/order/keeper/fee.go | 2 +- x/order/keeper/fee_test.go | 4 +- x/order/keeper/invariant.go | 4 +- x/order/keeper/invariant_test.go | 6 +- x/order/keeper/keeper.go | 8 +-- x/order/keeper/keeper_dump.go | 4 +- x/order/keeper/keeper_test.go | 8 +-- x/order/keeper/memory_cache.go | 2 +- x/order/keeper/memory_cache_test.go | 2 +- x/order/keeper/order.go | 4 +- x/order/keeper/order_map_test.go | 4 +- x/order/keeper/order_test.go | 8 +-- x/order/keeper/product_lock.go | 2 +- x/order/keeper/product_lock_test.go | 4 +- x/order/keeper/querier.go | 4 +- x/order/keeper/querier_test.go | 4 +- x/order/keeper/test_common.go | 12 ++-- x/order/legacy/v0_11/migrate.go | 2 +- x/order/legacy/v0_11/types.go | 2 +- x/order/match/continuousauction/impl.go | 2 +- x/order/match/engine.go | 6 +- x/order/match/periodicauction/fill.go | 6 +- x/order/match/periodicauction/fill_test.go | 8 +-- x/order/match/periodicauction/impl.go | 2 +- x/order/match/periodicauction/impl_test.go | 6 +- x/order/match/periodicauction/match.go | 4 +- x/order/match/periodicauction/match_test.go | 6 +- x/order/module.go | 10 +-- x/order/module_test.go | 6 +- x/order/types/codec.go | 4 +- x/order/types/const.go | 2 +- x/order/types/msgs_test.go | 2 +- x/order/types/order_test.go | 2 +- x/order/types/params.go | 4 +- x/order/types/params_test.go | 2 +- x/params/alias.go | 2 +- x/params/client/cli/query.go | 4 +- x/params/client/cli/tx.go | 6 +- x/params/client/proposal_handler.go | 6 +- x/params/client/rest/rest.go | 6 +- x/params/codec.go | 4 +- x/params/keeper.go | 2 +- x/params/module.go | 4 +- x/params/proposal_handler.go | 6 +- x/params/querier.go | 2 +- x/params/types/proposal.go | 4 +- x/staking/alias.go | 12 ++-- x/staking/app_test.go | 4 +- x/staking/client/cli/flags.go | 2 +- x/staking/client/cli/query.go | 10 +-- x/staking/client/cli/tx.go | 6 +- x/staking/client/cli/tx_vote.go | 16 ++--- x/staking/client/rest/query.go | 4 +- x/staking/client/rest/tx.go | 2 +- x/staking/client/rest/utils.go | 4 +- x/staking/common_test.go | 4 +- x/staking/delegator_test.go | 2 +- x/staking/genesis.go | 4 +- x/staking/genesis_test.go | 6 +- x/staking/handler.go | 4 +- x/staking/handler_shares.go | 6 +- x/staking/handler_shares_test.go | 2 +- x/staking/handler_test.go | 4 +- x/staking/keeper/alias_functions.go | 4 +- x/staking/keeper/delegation.go | 2 +- x/staking/keeper/delegator.go | 2 +- x/staking/keeper/hooks.go | 2 +- x/staking/keeper/invariants.go | 6 +- x/staking/keeper/invariants_test.go | 2 +- x/staking/keeper/keeper.go | 4 +- x/staking/keeper/min_self_delegation.go | 2 +- x/staking/keeper/params.go | 2 +- x/staking/keeper/pool.go | 2 +- x/staking/keeper/proxy.go | 2 +- x/staking/keeper/proxy_test.go | 2 +- x/staking/keeper/querier.go | 4 +- x/staking/keeper/querier_test.go | 4 +- x/staking/keeper/shares.go | 2 +- x/staking/keeper/shares_test.go | 2 +- x/staking/keeper/test_common.go | 4 +- x/staking/keeper/val_state.go | 2 +- x/staking/keeper/val_state_change.go | 2 +- x/staking/keeper/validator.go | 4 +- x/staking/keeper/weight.go | 2 +- x/staking/legacy/v0_11/migrate.go | 2 +- x/staking/legacy/v0_11/types.go | 2 +- x/staking/module.go | 10 +-- x/staking/types/codec.go | 18 +++--- x/staking/types/delegator.go | 2 +- x/staking/types/expected_keepers.go | 4 +- x/staking/types/hooks.go | 2 +- x/staking/types/keys.go | 2 +- x/staking/types/validator.go | 2 +- x/staking/types/validator_test.go | 2 +- x/staking/validator_state_machine_test.go | 2 +- x/staking/validator_test.go | 2 +- x/stream/expected_keeper.go | 8 +-- x/stream/exported/exported.go | 2 +- x/stream/keeper_skeleton.go | 4 +- x/token/alias.go | 2 +- x/token/beginblocker.go | 4 +- x/token/client/cli/query.go | 4 +- x/token/client/cli/tx.go | 2 +- x/token/client/rest/rest.go | 4 +- x/token/client/rest/rest_doc.go | 2 +- x/token/client/rest/rest_v2.go | 4 +- x/token/genesis.go | 6 +- x/token/genesis_test.go | 2 +- x/token/handler.go | 6 +- x/token/keeper.go | 4 +- x/token/keeper_test.go | 4 +- x/token/legacy/v0_10/types.go | 2 +- x/token/legacy/v0_11/migrate.go | 2 +- x/token/legacy/v0_11/types.go | 4 +- x/token/module.go | 4 +- x/token/module_basic.go | 6 +- x/token/module_test.go | 4 +- x/token/querier.go | 2 +- x/token/querier_test.go | 4 +- x/token/querier_v2.go | 4 +- x/token/test_common.go | 8 +-- x/token/token_test.go | 14 ++--- x/token/types/codec.go | 16 ++--- x/token/types/msgs_test.go | 6 +- x/token/types/params.go | 4 +- x/token/types/params_test.go | 4 +- x/token/types/token.go | 2 +- x/token/types/token_test.go | 6 +- x/token/types/util_test.go | 8 +-- x/upgrade/alias.go | 4 +- x/upgrade/client/cli/query.go | 12 ++-- x/upgrade/client/cli/tx.go | 8 +-- x/upgrade/client/proposal_handler.go | 6 +- x/upgrade/client/rest/rest.go | 2 +- x/upgrade/doc/abci.Application.puml | 2 +- x/upgrade/doc/genesis.puml | 4 +- x/upgrade/genesis.go | 6 +- x/upgrade/hander_test.go | 6 +- x/upgrade/handler.go | 2 +- x/upgrade/keeper/expected_keeper.go | 8 +-- x/upgrade/keeper/keeper.go | 14 ++--- x/upgrade/keeper/keeper_deprecated.go | 4 +- x/upgrade/keeper/keeper_test.go | 10 +-- x/upgrade/keeper/proposal.go | 10 +-- x/upgrade/keeper/querier.go | 2 +- x/upgrade/keeper/test_common.go | 12 ++-- x/upgrade/module.go | 6 +- x/upgrade/tally.go | 2 +- x/upgrade/tally_test.go | 6 +- x/upgrade/test_common.go | 14 ++--- x/upgrade/types/codec.go | 2 +- x/upgrade/types/errors.go | 2 +- x/upgrade/types/genesis.go | 4 +- x/upgrade/types/params.go | 2 +- x/upgrade/types/proposal.go | 6 +- x/upgrade/types/types.go | 2 +- 378 files changed, 1103 insertions(+), 1062 deletions(-) rename cmd/{okchaincli => okexchaincli}/main.go (92%) rename cmd/{okchaind => okexchaind}/main.go (87%) rename cmd/{okchaind => okexchaind}/replay.go (98%) rename cmd/{okchaind => okexchaind}/rest.go (73%) rename cmd/{okchaind => okexchaind}/testnet.go (94%) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5f308f899a..9f79158661 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -64,7 +64,7 @@ jobs: export GO111MODULE=on mkdir -p /tmp/logs /tmp/workspace/profiles - excluded_packages_expr="(okchain/x/.*/client)|(x/simulation)" + excluded_packages_expr="(okexchain/x/.*/client)|(x/simulation)" included_packages=("./app" "./x/common" "./x/dex" "./x/backend" "./x/distribution" "./x/gov" "./x/order" "./x/params" "./x/staking" "./x/token" "./x/upgrade" "./x/ammswap") for pkg in ${included_packages[@]}; do package_lines=`go list ${pkg}/... | grep -v -E "${excluded_packages_expr}"` @@ -85,7 +85,7 @@ jobs: echo "--> Filter out DONTCOVER:" excludelist="$(find . -type f -name '*.go' | xargs grep -l 'DONTCOVER')" for filename in ${excludelist}; do - filename=$(echo $filename | sed 's/^./github.com\/okex\/okchain/g') + filename=$(echo $filename | sed 's/^./github.com\/okex\/okexchain/g') echo "Excluding ${filename} from coverage report..." sed -i.bak "/$(echo $filename | sed 's/\//\\\//g')/d" coverage.txt done @@ -122,7 +122,7 @@ jobs: # command: | # excludelist="$(find . -type f -name '*.go' | xargs grep -l 'DONTCOVER')" # for filename in ${excludelist}; do -# filename=$(echo $filename | sed 's/^./github.com\/okex\/okchain/g') +# filename=$(echo $filename | sed 's/^./github.com\/okex\/okexchain/g') # echo "Excluding ${filename} from coverage report..." # sed -i.bak "/$(echo $filename | sed 's/\//\\\//g')/d" coverage.txt # done diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md index c4b9e30013..dbc1e29eb9 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -27,7 +27,7 @@ v Please also ensure that this is not a duplicate issue :) ## Version - + ## Steps to Reproduce diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md index 8bce4d5816..a92e42d4c1 100644 --- a/.github/ISSUE_TEMPLATE/feature-request.md +++ b/.github/ISSUE_TEMPLATE/feature-request.md @@ -19,7 +19,7 @@ v without deliberation ## Proposal diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 2d626ca406..b6af0b3f87 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -4,7 +4,7 @@ v Before smashing the submit button please review the checkboxes. v If a checkbox is n/a - please still include it but + a little note why ☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --> -- Targeted PR against correct branch (see [CONTRIBUTING.md](https://github.com/okex/okchain/blob/develop/CONTRIBUTING.md#pr-targeting)) +- Targeted PR against correct branch (see [CONTRIBUTING.md](https://github.com/okex/okexchain/blob/develop/CONTRIBUTING.md#pr-targeting)) - [ ] Linked to github-issue with discussion and accepted design OR link to spec that describes this work. - [ ] Wrote tests diff --git a/.gitignore b/.gitignore index 6f9e9d206e..be872a698c 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,8 @@ .idea # Build +okchaind +okchaincli vendor build tools/ @@ -23,17 +25,18 @@ doc # Data - ideally these don't exist baseapp/data/* client/lcd/keys/* -cmd/okchaincli/statik/statik.go +cmd/okexchaincli/statik/statik.go mytestnet doc/statik/statik.go dev/cache cmd/launch/launch -cmd/okchaincli/okchaincli -cmd/okchaind/okchaind -cmd/okchaintool/okchaintool +cmd/okexchaincli/okexchaincli +cmd/okexchaind/okexchaind +cmd/okexchaintool/okexchaintool cmd/tiger/tiger +cmd/okexchaind/testnet_okchain.go dev/testnet/cache -testnet_okchain.go +testnet_okexchain.go tools diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6dfb7f025a..9553da461b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -21,8 +21,8 @@ Contributing to this repo can mean many things such as participated in discussion or proposing code changes. To ensure a smooth workflow for all contributors, the general procedure for contributing has been established: -1. Either [open](https://github.com/okex/okchain/issues/new/choose) or - [find](https://github.com/okex/okchain/issues) an issue you'd like to help with +1. Either [open](https://github.com/okex/okexchain/issues/new/choose) or + [find](https://github.com/okex/okexchain/issues) an issue you'd like to help with 2. Participate in thoughtful discussion on that issue 3. If you would like to contribute: 1. If a the issue is a proposal, ensure that the proposal has been accepted @@ -54,7 +54,7 @@ tools` for installing the linting tools. Other notes: - Looking for a good place to start contributing? How about checking out some - [good first issues](https://github.com/okex/okchain/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) + [good first issues](https://github.com/okex/okexchain/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) - Please make sure to use `gofmt` before every commit - the easiest way to do this is have your editor run it for you upon saving a file. Additionally please ensure that your code is lint compliant by running `make lint` @@ -95,12 +95,12 @@ Please note that Go requires code to live under absolute paths, which complicate While my fork lives at `https://github.com/rigeyrigerige/OKChain`, the code should never exist at `$GOPATH/src/github.com/rigeyrigerige/OKChain`. Instead, we use `git remote` to add the fork as a new remote for the original repo, -`$GOPATH/src/github.com/okex/okchain `, and do all the work there. +`$GOPATH/src/github.com/okex/okexchain `, and do all the work there. For instance, to create a fork and work on a branch of it, I would: - Create the fork on github, using the fork button. - - Go to the original repo checked out locally (i.e. `$GOPATH/src/github.com/okex/okchain`) + - Go to the original repo checked out locally (i.e. `$GOPATH/src/github.com/okex/okexchain`) - `git remote rename origin upstream` - `git remote add origin git@github.com:rigeyrigerige/OKChain.git` @@ -180,7 +180,7 @@ only pull requests targeted directly against master. - `master` must never fail `make test` or `make test_cli` - `master` should not fail `make lint` - no `--force` onto `master` (except when reverting a broken commit, which should seldom happen) - - create a development branch either on github.com/okex/okchain, or your fork (using `git remote add origin`) + - create a development branch either on github.com/okex/okexchain, or your fork (using `git remote add origin`) - before submitting a pull request, begin `git rebase` on top of `master` ### Pull Merge Procedure diff --git a/Dockerfile b/Dockerfile index a4bc48b852..5abd6c3621 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # Simple usage with a mounted data directory: # > docker build -t okchain . -# > docker run -it -p 36657:36657 -p 36656:36656 -v ~/.okchaind:/root/.okchaind -v ~/.okchaincli:/root/.okchaincli okchain okchaind init mynode -# > docker run -it -p 36657:36657 -p 36656:36656 -v ~/.okchaind:/root/.okchaind -v ~/.okchaincli:/root/.okchaincli okchain okchaind start +# > docker run -it -p 36657:36657 -p 36656:36656 -v ~/.okexchaind:/root/.okexchaind -v ~/.okexchaincli:/root/.okexchaincli okchain okexchaind init mynode +# > docker run -it -p 36657:36657 -p 36656:36656 -v ~/.okexchaind:/root/.okexchaind -v ~/.okexchaincli:/root/.okexchaincli okchain okexchaind start FROM golang:alpine AS build-env # Install minimum necessary dependencies, remove packages @@ -25,5 +25,5 @@ WORKDIR /root COPY --from=build-env /go/bin/okchaind /usr/bin/okchaind COPY --from=build-env /go/bin/okchaincli /usr/bin/okchaincli -# Run okchaind by default, omit entrypoint to ease using container with okchaincli +# Run okexchaind by default, omit entrypoint to ease using container with okexchaincli CMD ["okchaind"] diff --git a/Makefile b/Makefile index 6384d82173..e17195a462 100644 --- a/Makefile +++ b/Makefile @@ -10,9 +10,9 @@ Version=v0.11.1 CosmosSDK=v0.37.9 Tendermint=v0.32.10 Iavl=v0.12.4 -Name=okchain -ServerName=okchaind -ClientName=okchaincli +Name=okexchain +ServerName=okexchaind +ClientName=okexchaincli # the height of the 1st block is GenesisHeight+1 GenesisHeight=0 @@ -49,15 +49,15 @@ BUILD_TESTNET_FLAGS := $(BUILD_FLAGS) all: install -install: okchain +install: okexchain -okchain: - go install -v $(BUILD_FLAGS) -tags "$(BUILD_TAGS)" ./cmd/okchaind - go install -v $(BUILD_FLAGS) -tags "$(BUILD_TAGS)" ./cmd/okchaincli +okexchain: + go install -v $(BUILD_FLAGS) -tags "$(BUILD_TAGS)" ./cmd/okexchaind + go install -v $(BUILD_FLAGS) -tags "$(BUILD_TAGS)" ./cmd/okexchaincli testnet: - go install -v $(BUILD_TESTNET_FLAGS) -tags "$(BUILD_TAGS)" ./cmd/okchaind - go install -v $(BUILD_TESTNET_FLAGS) -tags "$(BUILD_TAGS)" ./cmd/okchaincli + go install -v $(BUILD_TESTNET_FLAGS) -tags "$(BUILD_TAGS)" ./cmd/okexchaind + go install -v $(BUILD_TESTNET_FLAGS) -tags "$(BUILD_TAGS)" ./cmd/okexchaincli test-unit: @VERSION=$(VERSION) go test -mod=readonly -tags='ledger test_ledger_mock' ./app/... @@ -95,32 +95,32 @@ go.sum: go.mod @go mod tidy cli: - go install -v $(BUILD_FLAGS) -tags "$(BUILD_TAGS)" ./cmd/okchaincli + go install -v $(BUILD_FLAGS) -tags "$(BUILD_TAGS)" ./cmd/okexchaincli server: - go install -v $(BUILD_FLAGS) -tags "$(BUILD_TAGS)" ./cmd/okchaind + go install -v $(BUILD_FLAGS) -tags "$(BUILD_TAGS)" ./cmd/okexchaind format: find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/lcd/statik/statik.go" | xargs gofmt -w -s build: ifeq ($(OS),Windows_NT) - go build $(BUILD_FLAGS) -o build/okchaind.exe ./cmd/okchaind - go build $(BUILD_FLAGS) -o build/okchaincli.exe ./cmd/okchaincli + go build $(BUILD_FLAGS) -o build/okexchaind.exe ./cmd/okexchaind + go build $(BUILD_FLAGS) -o build/okexchaincli.exe ./cmd/okexchaincli else - go build $(BUILD_FLAGS) -o build/okchaind ./cmd/okchaind - go build $(BUILD_FLAGS) -o build/okchaincli ./cmd/okchaincli + go build $(BUILD_FLAGS) -o build/okexchaind ./cmd/okexchaind + go build $(BUILD_FLAGS) -o build/okexchaincli ./cmd/okexchaincli endif build-linux: LEDGER_ENABLED=false GOOS=linux GOARCH=amd64 $(MAKE) build -build-docker-okchainnode: +build-docker-okexchainnode: $(MAKE) -C networks/local # Run a 4-node testnet locally localnet-start: build-linux localnet-stop - @if ! [ -f build/node0/okchaind/config/genesis.json ]; then docker run --rm -v $(CURDIR)/build:/okchaind:Z okchain/node testnet --v 4 -o . --starting-ip-address 192.168.10.2 ; fi + @if ! [ -f build/node0/okexchaind/config/genesis.json ]; then docker run --rm -v $(CURDIR)/build:/okexchaind:Z okexchain/node testnet --v 4 -o . --starting-ip-address 192.168.10.2 ; fi docker-compose up -d # Stop testnet diff --git a/README.md b/README.md index 81afedd0f0..9f69e38528 100644 --- a/README.md +++ b/README.md @@ -20,9 +20,9 @@ See the [documentation](https://okexchain-docs.readthedocs.io/en/latest/index.ht ## OKExChain Testnet -To run a full-node for the testnet of the OKExChain, first [install `okexchaind`](https://okexchain-docs.readthedocs.io/en/latest/getting-start/install-okchain.html), then follow [the guide](https://okexchain-docs.readthedocs.io/en/latest/getting-start/join-okchain-testnet.html). +To run a full-node for the testnet of the OKExChain, first [install `okexchaind`](https://okexchain-docs.readthedocs.io/en/latest/getting-start/install-okexchain.html), then follow [the guide](https://okexchain-docs.readthedocs.io/en/latest/getting-start/join-okexchain-testnet.html). -For status updates and genesis file, see the [genesis](https://okexchain-docs.readthedocs.io/en/latest/getting-start/join-okchain-testnet.html#genesis-seeds). +For status updates and genesis file, see the [genesis](https://okexchain-docs.readthedocs.io/en/latest/getting-start/join-okexchain-testnet.html#genesis-seeds). ## Quick Start diff --git a/app/abci.go b/app/abci.go index 241b9e597e..a7a7246996 100644 --- a/app/abci.go +++ b/app/abci.go @@ -3,17 +3,17 @@ package app import ( "fmt" - "github.com/okex/okchain/x/common/perf" + "github.com/okex/okexchain/x/common/perf" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/x/auth" - "github.com/okex/okchain/app/protocol" + "github.com/okex/okexchain/app/protocol" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/crypto/tmhash" ) // DeliverTx implements the Application interface -func (app *OKChainApp) DeliverTx(req abci.RequestDeliverTx) (res abci.ResponseDeliverTx) { +func (app *OKExChainApp) DeliverTx(req abci.RequestDeliverTx) (res abci.ResponseDeliverTx) { protocol.GetEngine().GetCurrentProtocol().CheckStopped() resp := app.BaseApp.DeliverTx(req) @@ -26,14 +26,14 @@ func (app *OKChainApp) DeliverTx(req abci.RequestDeliverTx) (res abci.ResponseDe } // InitChain implements the Application interface -func (app *OKChainApp) InitChain(req abci.RequestInitChain) (res abci.ResponseInitChain) { +func (app *OKExChainApp) InitChain(req abci.RequestInitChain) (res abci.ResponseInitChain) { app.log("[ABCI interface] ---> InitChain") return app.BaseApp.InitChain(req) } // BeginBlock implements the Application interface -func (app *OKChainApp) BeginBlock(req abci.RequestBeginBlock) (res abci.ResponseBeginBlock) { +func (app *OKExChainApp) BeginBlock(req abci.RequestBeginBlock) (res abci.ResponseBeginBlock) { protocol.GetEngine().GetCurrentProtocol().CheckStopped() @@ -47,7 +47,7 @@ func (app *OKChainApp) BeginBlock(req abci.RequestBeginBlock) (res abci.Response } // EndBlock implements the Application interface -func (app *OKChainApp) EndBlock(req abci.RequestEndBlock) (res abci.ResponseEndBlock) { +func (app *OKExChainApp) EndBlock(req abci.RequestEndBlock) (res abci.ResponseEndBlock) { protocol.GetEngine().GetCurrentProtocol().CheckStopped() seq := perf.GetPerf().OnAppEndBlockEnter(app.LastBlockHeight() + 1) @@ -57,7 +57,7 @@ func (app *OKChainApp) EndBlock(req abci.RequestEndBlock) (res abci.ResponseEndB } // Commit implements the Application interface -func (app *OKChainApp) Commit() abci.ResponseCommit { +func (app *OKExChainApp) Commit() abci.ResponseCommit { protocol.GetEngine().GetCurrentProtocol().CheckStopped() seq := perf.GetPerf().OnCommitEnter(app.LastBlockHeight() + 1) @@ -68,7 +68,7 @@ func (app *OKChainApp) Commit() abci.ResponseCommit { } // sync txBytes to backend module -func (app *OKChainApp) syncTx(txBytes []byte) { +func (app *OKExChainApp) syncTx(txBytes []byte) { if tx, err := auth.DefaultTxDecoder(protocol.GetEngine().GetCurrentProtocol().GetCodec())(txBytes); err == nil { if stdTx, ok := tx.(auth.StdTx); ok { txHash := fmt.Sprintf("%X", tmhash.Sum(txBytes)) @@ -83,6 +83,6 @@ func (app *OKChainApp) syncTx(txBytes []byte) { } // log format -func (app *OKChainApp) log(format string, a ...interface{}) { +func (app *OKExChainApp) log(format string, a ...interface{}) { app.Logger().Info(fmt.Sprintf(format, a...)) } diff --git a/app/alias.go b/app/alias.go index 117c6c833d..b53b3fc8be 100644 --- a/app/alias.go +++ b/app/alias.go @@ -1,7 +1,7 @@ package app import ( - "github.com/okex/okchain/app/protocol" + "github.com/okex/okexchain/app/protocol" ) var ( @@ -9,8 +9,8 @@ var ( MakeCodec = protocol.MakeCodec // ModuleBasics is the variable alias for NewBasicManager ModuleBasics = protocol.ModuleBasics - // DefaultCLIHome is the directory for okchaincli + // DefaultCLIHome is the directory for okexchaincli DefaultCLIHome = protocol.DefaultCLIHome - // DefaultNodeHome is the directory for okchaind + // DefaultNodeHome is the directory for okexchaind DefaultNodeHome = protocol.DefaultNodeHome ) diff --git a/app/app.go b/app/app.go index c442a34e47..a651d5e0fa 100644 --- a/app/app.go +++ b/app/app.go @@ -5,10 +5,10 @@ import ( "io" "strconv" - "github.com/okex/okchain/app/protocol" - "github.com/okex/okchain/x/common/perf" - "github.com/okex/okchain/x/common/version" - "github.com/okex/okchain/x/upgrade" + "github.com/okex/okexchain/app/protocol" + "github.com/okex/okexchain/x/common/perf" + "github.com/okex/okexchain/x/common/version" + "github.com/okex/okexchain/x/upgrade" "github.com/cosmos/cosmos-sdk/baseapp" sdk "github.com/cosmos/cosmos-sdk/types" @@ -21,16 +21,16 @@ import ( dbm "github.com/tendermint/tm-db" ) -const appName = "OKChainApp" +const appName = "OKExChainApp" -// OKChainApp extends BaseApp(ABCI application) -type OKChainApp struct { +// OKExChainApp extends BaseApp(ABCI application) +type OKExChainApp struct { *baseapp.BaseApp } -// NewOKChainApp returns a reference to an initialized OKChainApp. -func NewOKChainApp(logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, - invCheckPeriod uint, baseAppOptions ...func(*baseapp.BaseApp)) *OKChainApp { +// NewOKExChainApp returns a reference to an initialized OKExChainApp. +func NewOKExChainApp(logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, + invCheckPeriod uint, baseAppOptions ...func(*baseapp.BaseApp)) *OKExChainApp { bApp := baseapp.NewBaseApp(appName, logger, db, nil, baseAppOptions...) bApp.SetCommitMultiStoreTracer(traceStore) // set app version @@ -38,7 +38,7 @@ func NewOKChainApp(logger log.Logger, db dbm.DB, traceStore io.Writer, loadLates // set protocol version bApp.ProtocolVersion = int32(version.CurrentProtocolVersion) - app := &OKChainApp{ + app := &OKExChainApp{ BaseApp: bApp, } // set hook function postEndBlocker @@ -70,13 +70,13 @@ func NewOKChainApp(logger log.Logger, db dbm.DB, traceStore io.Writer, loadLates } // LoadHeight loads data on a particular height -func (app *OKChainApp) LoadHeight(height int64) error { +func (app *OKExChainApp) LoadHeight(height int64) error { //return app.LoadVersion(height, app.keys[bam.MainStoreKey]) return app.LoadVersion(height, protocol.GetMainStoreKey()) } // hook function for BaseApp's EndBlock(upgrade) -func (app *OKChainApp) postEndBlocker(res *abci.ResponseEndBlock) { +func (app *OKExChainApp) postEndBlocker(res *abci.ResponseEndBlock) { var found bool var appVersionBytes []byte @@ -124,9 +124,9 @@ func (app *OKChainApp) postEndBlocker(res *abci.ResponseEndBlock) { } } -func (app *OKChainApp) recoverLocalEnv(loadLatest bool) { +func (app *OKExChainApp) recoverLocalEnv(loadLatest bool) { // the current field in AppProtocolEngine is 0 - // on the beginning for the running of NewOKChainApp() + // on the beginning for the running of NewOKExChainApp() // it will mount protocolv0.GetKVStoreKeysMap() app.MountKVStores(protocol.GetKVStoreKeysMap()) diff --git a/app/app_test.go b/app/app_test.go index d9c4be0e20..a4290b04e9 100644 --- a/app/app_test.go +++ b/app/app_test.go @@ -10,11 +10,11 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/auth" "github.com/cosmos/cosmos-sdk/x/mock" - "github.com/okex/okchain/app/protocol" - "github.com/okex/okchain/x/common/version" - "github.com/okex/okchain/x/order" - "github.com/okex/okchain/x/order/types" - "github.com/okex/okchain/x/upgrade" + "github.com/okex/okexchain/app/protocol" + "github.com/okex/okexchain/x/common/version" + "github.com/okex/okexchain/x/order" + "github.com/okex/okexchain/x/order/types" + "github.com/okex/okexchain/x/upgrade" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/libs/cli/flags" cmn "github.com/tendermint/tendermint/libs/common" @@ -38,7 +38,7 @@ func TestExportAppStateAndValidators_abci_postEndBlocker(t *testing.T) { logger, err := flags.ParseLogLevel("*:error", logger, "error") require.Nil(t, err) defer db.Close() - app := NewOKChainApp(logger, db, nil, true, 0) + app := NewOKExChainApp(logger, db, nil, true, 0) // make simulation of abci.RequestInitChain genDoc, err := tm.GenesisDocFromFile("./genesis/genesis.json") @@ -96,7 +96,7 @@ func TestExportAppStateAndValidators_abci_postEndBlocker(t *testing.T) { require.Equal(t, 1, len(vals)) // situation 2: with jail white list - jailWhiteList := []string{"okchainvaloper10q0rk5qnyag7wfvvt7rtphlw589m7frs863s3m"} + jailWhiteList := []string{"okexchainvaloper10q0rk5qnyag7wfvvt7rtphlw589m7frshchly8"} _, _, err = app.ExportAppStateAndValidators(true, jailWhiteList) require.NoError(t, err) @@ -110,7 +110,7 @@ func TestExportAppStateAndValidators_abci_postEndBlocker(t *testing.T) { }) // situation 4 : validator in the jail white list doesn't exist in the stakingKeeper - jailWhiteList = []string{"okchainvaloper1qryc3z7jxlk7ma56qcaz75ksely65havrmtufv"} + jailWhiteList = []string{"okexchainvaloper1qryc3z7jxlk7ma56qcaz75ksely65havrmtufv"} require.Panics(t, func() { _, _, _ = app.ExportAppStateAndValidators(true, jailWhiteList) }) @@ -188,7 +188,7 @@ func TestExportAppStateAndValidators_abci_postEndBlocker(t *testing.T) { }) } -func TestOKChainApp_MountKVStores(t *testing.T) { +func TestOKExChainApp_MountKVStores(t *testing.T) { db := dbm.NewMemDB() defer db.Close() bApp := baseapp.NewBaseApp(appName, nil, db, nil) @@ -196,7 +196,7 @@ func TestOKChainApp_MountKVStores(t *testing.T) { m := make(map[string]*sdk.KVStoreKey) m["testKey"] = sdk.NewKVStoreKey("testValue") - app := OKChainApp{bApp} + app := OKExChainApp{bApp} app.MountKVStores(m) require.NoError(t, app.GetCommitMultiStore().LoadVersion(0)) store := app.GetCommitMultiStore().GetKVStore(m["testKey"]) @@ -205,7 +205,7 @@ func TestOKChainApp_MountKVStores(t *testing.T) { require.Equal(t, []byte("value"), value) } -// make a tx 2 check the abci deliver of OKChainApp +// make a tx 2 check the abci deliver of OKExChainApp func makeTestTx(t *testing.T) auth.StdTx { privKey := getPrivateKey(privateKey) addr := sdk.AccAddress(privKey.PubKey().Address()) diff --git a/app/export.go b/app/export.go index 20d8df2956..3a56822e3c 100644 --- a/app/export.go +++ b/app/export.go @@ -6,8 +6,8 @@ import ( "github.com/cosmos/cosmos-sdk/x/slashing" "github.com/cosmos/cosmos-sdk/codec" - "github.com/okex/okchain/app/protocol" - "github.com/okex/okchain/x/staking" + "github.com/okex/okexchain/app/protocol" + "github.com/okex/okexchain/x/staking" abci "github.com/tendermint/tendermint/abci/types" tmtypes "github.com/tendermint/tendermint/types" @@ -15,8 +15,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" ) -// ExportAppStateAndValidators exports the state of okchain for a genesis file -func (app *OKChainApp) ExportAppStateAndValidators(forZeroHeight bool, jailWhiteList []string, +// ExportAppStateAndValidators exports the state of okexchain for a genesis file +func (app *OKExChainApp) ExportAppStateAndValidators(forZeroHeight bool, jailWhiteList []string, ) (appState json.RawMessage, validators []tmtypes.GenesisValidator, err error) { // as if they could withdraw from the start of the next block ctx := app.NewContext(true, abci.Header{Height: app.LastBlockHeight()}) @@ -41,7 +41,7 @@ func (app *OKChainApp) ExportAppStateAndValidators(forZeroHeight bool, jailWhite // prepare for fresh start at zero height // NOTE zero height genesis is a temporary feature which will be deprecated in favour of export at a block height -func (app *OKChainApp) prepForZeroHeightGenesis(ctx sdk.Context, jailWhiteList []string) { +func (app *OKExChainApp) prepForZeroHeightGenesis(ctx sdk.Context, jailWhiteList []string) { var applyWhiteList bool // check if there is a whitelist diff --git a/app/genesis/genesis.json b/app/genesis/genesis.json index 910b19387a..d61bffb4f2 100644 --- a/app/genesis/genesis.json +++ b/app/genesis/genesis.json @@ -1,6 +1,6 @@ { "genesis_time": "2020-01-01T10:16:17.025816Z", - "chain_id": "okchain", + "chain_id": "okexchain", "consensus_params": { "block": { "max_bytes": "22020096", @@ -21,7 +21,7 @@ "accounts": [ { "account_number": "0", - "address": "okchain10q0rk5qnyag7wfvvt7rtphlw589m7frsmyq4ya", + "address": "okexchain10q0rk5qnyag7wfvvt7rtphlw589m7frsku8qc9", "coins": [ { "amount": "9000000.00000000", @@ -38,6 +38,12 @@ "start_time": "0" } ], + "ammswap": { + "params": { + "fee_rate": "0.00300000" + }, + "swap_token_pair_records": null + }, "auth": { "params": { "max_memo_characters": "256", @@ -109,12 +115,12 @@ "amount": [], "gas": "0" }, - "memo": "33935a25b0a0806372c93903a15fe73f66752254@127.0.0.1:26656", + "memo": "7f75cd135d02418d17d1092fe3a4ffc1c5d1aebb@127.0.0.1:26656", "msg": [ { - "type": "okchain/staking/MsgCreateValidator", + "type": "okexchain/staking/MsgCreateValidator", "value": { - "delegator_address": "okchain10q0rk5qnyag7wfvvt7rtphlw589m7frsmyq4ya", + "delegator_address": "okexchain10q0rk5qnyag7wfvvt7rtphlw589m7frsku8qc9", "description": { "details": "", "identity": "", @@ -125,8 +131,8 @@ "amount": "0.00100000", "denom": "okt" }, - "pubkey": "okchainvalconspub1zcjduepqqxsxcjjletkq40ypzuqz8n925pk0ycw9h8g4saw27adyf2t93szsvpk77u", - "validator_address": "okchainvaloper10q0rk5qnyag7wfvvt7rtphlw589m7frs863s3m" + "pubkey": "okexchainvalconspub1zcjduepqfcprr6x7d44wu4nt0suey3fz6pzp274486s5lua9vx7l3w3xhw2splls6m", + "validator_address": "okexchainvaloper10q0rk5qnyag7wfvvt7rtphlw589m7frshchly8" } } ], @@ -136,7 +142,7 @@ "type": "tendermint/PubKeySecp256k1", "value": "AgYaL1tZ7ekqvweQhKojG8sDHUfN23qJWviAsTDIWvYU" }, - "signature": "ZuRwla7Kpt6H3etoJ6peAwzaC6k8m8lu7lQozm4oQKIpYEaoWAIZAqZBbAaqebKmIov3f22Ys4xDOlCt2teHlg==" + "signature": "40IhUZ1h5oYh7671R7tRYVyLFwwWU+RIj6J8Qe4lf0MzxtaQ0oFDeShDJk3fKG0nx7q2zV8/hpnXPgoA2OAESQ==" } ] } @@ -212,12 +218,6 @@ "voting_period": "259200000000000" } }, - "ammswap": { - "params": { - "fee_rate": "0.00300000" - }, - "swap_token_pair_records": null - }, "slashing": { "missed_blocks": {}, "params": { @@ -284,7 +284,7 @@ "mintable": true, "original_symbol": "okt", "original_total_supply": "1000000000.00000000", - "owner": "okchain10q0rk5qnyag7wfvvt7rtphlw589m7frsmyq4ya", + "owner": "okexchain10q0rk5qnyag7wfvvt7rtphlw589m7frsku8qc9", "symbol": "okt", "type": "0", "whole_name": "OKT" @@ -298,7 +298,7 @@ "proposal_id": "0", "protocol_def": { "height": "1", - "software": "https://github.com/okex/okchain/releases/tag/v", + "software": "https://github.com/okex/okexchain/releases/tag/v", "threshold": "0.90000000", "version": "0" } diff --git a/app/protocol/engine.go b/app/protocol/engine.go index 59bb510254..0c272fd0ba 100644 --- a/app/protocol/engine.go +++ b/app/protocol/engine.go @@ -4,12 +4,12 @@ import ( "fmt" "sync" - "github.com/okex/okchain/x/common/monitor" + "github.com/okex/okexchain/x/common/monitor" "github.com/tendermint/tendermint/libs/log" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/common/proto" + "github.com/okex/okexchain/x/common/proto" ) var ( diff --git a/app/protocol/engine_test.go b/app/protocol/engine_test.go index 8cfcbc9702..f511bf9da0 100644 --- a/app/protocol/engine_test.go +++ b/app/protocol/engine_test.go @@ -17,7 +17,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/common/proto" + "github.com/okex/okexchain/x/common/proto" "github.com/stretchr/testify/require" ) @@ -40,11 +40,11 @@ func TestAppProtocolEngine(t *testing.T) { require.NotEqual(t, nil, engine.GetProtocolKeeper()) //check app upgrade config - appUpgradeConfig := proto.NewAppUpgradeConfig(0, proto.NewProtocolDefinition(0, "OKChain", 1024, sdk.NewDec(0))) + appUpgradeConfig := proto.NewAppUpgradeConfig(0, proto.NewProtocolDefinition(0, "OKExChain", 1024, sdk.NewDec(0))) protocolKeeper.SetUpgradeConfig(ctx, appUpgradeConfig) auc, ok := engine.GetUpgradeConfigByStore(ctx.KVStore(mainKey)) require.Equal(t, true, ok) - require.Equal(t, "OKChain", auc.ProtocolDef.Software) + require.Equal(t, "OKExChain", auc.ProtocolDef.Software) // add protocol randomly num := rand.Intn(3) + 1 diff --git a/app/protocol/mock_protocol.go b/app/protocol/mock_protocol.go index 9135ac67b7..65f530c1b4 100644 --- a/app/protocol/mock_protocol.go +++ b/app/protocol/mock_protocol.go @@ -3,7 +3,7 @@ package protocol import ( "encoding/json" - "github.com/okex/okchain/x/token" + "github.com/okex/okexchain/x/token" "github.com/tendermint/tendermint/libs/log" @@ -12,10 +12,10 @@ import ( "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/backend" - distr "github.com/okex/okchain/x/distribution" - "github.com/okex/okchain/x/staking" - "github.com/okex/okchain/x/stream" + "github.com/okex/okexchain/x/backend" + distr "github.com/okex/okexchain/x/distribution" + "github.com/okex/okexchain/x/staking" + "github.com/okex/okexchain/x/stream" ) var _ Protocol = (*MockProtocol)(nil) diff --git a/app/protocol/protocol_v0.go b/app/protocol/protocol_v0.go index c64aa62082..d34093a1d8 100644 --- a/app/protocol/protocol_v0.go +++ b/app/protocol/protocol_v0.go @@ -19,26 +19,26 @@ import ( "github.com/cosmos/cosmos-sdk/x/mint" "github.com/cosmos/cosmos-sdk/x/slashing" "github.com/cosmos/cosmos-sdk/x/supply" - "github.com/okex/okchain/app/utils" - "github.com/okex/okchain/x/ammswap" - "github.com/okex/okchain/x/backend" - "github.com/okex/okchain/x/common/proto" - "github.com/okex/okchain/x/common/version" - "github.com/okex/okchain/x/debug" - "github.com/okex/okchain/x/dex" - dexClient "github.com/okex/okchain/x/dex/client" - distr "github.com/okex/okchain/x/distribution" - "github.com/okex/okchain/x/genutil" - "github.com/okex/okchain/x/gov" - "github.com/okex/okchain/x/gov/keeper" - "github.com/okex/okchain/x/order" - "github.com/okex/okchain/x/params" - paramsclient "github.com/okex/okchain/x/params/client" - "github.com/okex/okchain/x/staking" - "github.com/okex/okchain/x/stream" - "github.com/okex/okchain/x/token" - "github.com/okex/okchain/x/upgrade" - upgradeClient "github.com/okex/okchain/x/upgrade/client" + "github.com/okex/okexchain/app/utils" + "github.com/okex/okexchain/x/ammswap" + "github.com/okex/okexchain/x/backend" + "github.com/okex/okexchain/x/common/proto" + "github.com/okex/okexchain/x/common/version" + "github.com/okex/okexchain/x/debug" + "github.com/okex/okexchain/x/dex" + dexClient "github.com/okex/okexchain/x/dex/client" + distr "github.com/okex/okexchain/x/distribution" + "github.com/okex/okexchain/x/genutil" + "github.com/okex/okexchain/x/gov" + "github.com/okex/okexchain/x/gov/keeper" + "github.com/okex/okexchain/x/order" + "github.com/okex/okexchain/x/params" + paramsclient "github.com/okex/okexchain/x/params/client" + "github.com/okex/okexchain/x/staking" + "github.com/okex/okexchain/x/stream" + "github.com/okex/okexchain/x/token" + "github.com/okex/okexchain/x/upgrade" + upgradeClient "github.com/okex/okexchain/x/upgrade/client" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/libs/log" ) @@ -47,10 +47,10 @@ var ( // check the implements of ProtocolV0 _ Protocol = (*ProtocolV0)(nil) - // DefaultCLIHome is the directory for okchaincli - DefaultCLIHome = os.ExpandEnv("$HOME/.okchaincli") - // DefaultNodeHome is the directory for okchaind - DefaultNodeHome = os.ExpandEnv("$HOME/.okchaind") + // DefaultCLIHome is the directory for okexchaincli + DefaultCLIHome = os.ExpandEnv("$HOME/.okexchaincli") + // DefaultNodeHome is the directory for okexchaind + DefaultNodeHome = os.ExpandEnv("$HOME/.okexchaind") // ModuleBasics is in charge of setting up basic, non-dependant module elements, // such as codec registration and genesis verification @@ -71,7 +71,7 @@ var ( slashing.AppModuleBasic{}, supply.AppModuleBasic{}, - // okchain extended + // okexchain extended token.AppModuleBasic{}, dex.AppModuleBasic{}, order.AppModuleBasic{}, @@ -98,7 +98,7 @@ var ( } ) -// ProtocolV0 is the struct of the original protocol of okchain +// ProtocolV0 is the struct of the original protocol of okexchain type ProtocolV0 struct { parent Parent version uint64 @@ -184,12 +184,12 @@ func (p *ProtocolV0) GetCodec() *codec.Codec { return p.cdc } -// CheckStopped gives a quick check whether okchain needs stopped +// CheckStopped gives a quick check whether okexchain needs stopped func (p *ProtocolV0) CheckStopped() { if p.stopped { - p.logger.Info("OKChain is going to exit") + p.logger.Info("OKExChain is going to exit") server.Stop() - p.logger.Info("OKChain was stopped") + p.logger.Info("OKExChain was stopped") select {} } } @@ -251,7 +251,7 @@ func (p *ProtocolV0) produceKeepers() { // get config appConfig, err := config.ParseConfig() if err != nil { - p.logger.Error(fmt.Sprintf("the config of OKChain was parsed error : %s", err.Error())) + p.logger.Error(fmt.Sprintf("the config of OKExChain was parsed error : %s", err.Error())) panic(err) } @@ -466,9 +466,9 @@ func (p *ProtocolV0) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci. return p.mm.EndBlock(ctx, req) } -// Stop makes okchain exit gracefully +// Stop makes okexchain exit gracefully func (p *ProtocolV0) Stop() { - p.logger.Info(fmt.Sprintf("[%s]%s", utils.GoID, "OKChain stops notification.")) + p.logger.Info(fmt.Sprintf("[%s]%s", utils.GoID, "OKExChain stops notification.")) p.stopped = true } diff --git a/app/protocol/protocol_v0_test.go b/app/protocol/protocol_v0_test.go index cc526835b3..649aad1242 100644 --- a/app/protocol/protocol_v0_test.go +++ b/app/protocol/protocol_v0_test.go @@ -5,17 +5,17 @@ import ( "os" "github.com/cosmos/cosmos-sdk/x/auth" - "github.com/okex/okchain/x/common" - "github.com/okex/okchain/x/order" - "github.com/okex/okchain/x/token" - "github.com/okex/okchain/x/upgrade" + "github.com/okex/okexchain/x/common" + "github.com/okex/okexchain/x/order" + "github.com/okex/okexchain/x/token" + "github.com/okex/okexchain/x/upgrade" "github.com/cosmos/cosmos-sdk/baseapp" dbm "github.com/tendermint/tm-db" abci "github.com/tendermint/tendermint/abci/types" - "github.com/okex/okchain/x/common/proto" + "github.com/okex/okexchain/x/common/proto" "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/libs/log" tm "github.com/tendermint/tendermint/types" diff --git a/app/protocol/store_keys.go b/app/protocol/store_keys.go index 839ca949dc..0d07273867 100644 --- a/app/protocol/store_keys.go +++ b/app/protocol/store_keys.go @@ -7,18 +7,18 @@ import ( "github.com/cosmos/cosmos-sdk/x/mint" "github.com/cosmos/cosmos-sdk/x/slashing" "github.com/cosmos/cosmos-sdk/x/supply" - "github.com/okex/okchain/x/ammswap" - "github.com/okex/okchain/x/debug" - "github.com/okex/okchain/x/dex" - "github.com/okex/okchain/x/staking" - - distr "github.com/okex/okchain/x/distribution" - "github.com/okex/okchain/x/gov" - "github.com/okex/okchain/x/order" - "github.com/okex/okchain/x/params" - - "github.com/okex/okchain/x/token" - "github.com/okex/okchain/x/upgrade" + "github.com/okex/okexchain/x/ammswap" + "github.com/okex/okexchain/x/debug" + "github.com/okex/okexchain/x/dex" + "github.com/okex/okexchain/x/staking" + + distr "github.com/okex/okexchain/x/distribution" + "github.com/okex/okexchain/x/gov" + "github.com/okex/okexchain/x/order" + "github.com/okex/okexchain/x/params" + + "github.com/okex/okexchain/x/token" + "github.com/okex/okexchain/x/upgrade" ) // store keys used in all modules diff --git a/app/protocol/types.go b/app/protocol/types.go index aef4ba759d..c7c8f533d7 100644 --- a/app/protocol/types.go +++ b/app/protocol/types.go @@ -3,19 +3,19 @@ package protocol import ( "encoding/json" - "github.com/okex/okchain/x/token" + "github.com/okex/okexchain/x/token" "github.com/tendermint/tendermint/libs/log" "github.com/cosmos/cosmos-sdk/x/slashing" - "github.com/okex/okchain/x/staking" + "github.com/okex/okexchain/x/staking" "github.com/cosmos/cosmos-sdk/x/crisis" - "github.com/okex/okchain/x/backend" - distr "github.com/okex/okchain/x/distribution" - "github.com/okex/okchain/x/stream" + "github.com/okex/okexchain/x/backend" + distr "github.com/okex/okexchain/x/distribution" + "github.com/okex/okexchain/x/stream" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" @@ -31,7 +31,7 @@ type Protocol interface { Init() GetCodec() *codec.Codec - // gracefully stop okchaind + // gracefully stop okexchaind CheckStopped() // setter diff --git a/cmd/okchaincli/main.go b/cmd/okexchaincli/main.go similarity index 92% rename from cmd/okchaincli/main.go rename to cmd/okexchaincli/main.go index 67f13b33e8..9504bb63d5 100644 --- a/cmd/okchaincli/main.go +++ b/cmd/okexchaincli/main.go @@ -14,9 +14,9 @@ import ( "github.com/cosmos/cosmos-sdk/x/auth" authcmd "github.com/cosmos/cosmos-sdk/x/auth/client/cli" "github.com/cosmos/cosmos-sdk/x/bank" - "github.com/okex/okchain/app" - debugcli "github.com/okex/okchain/x/debug/client/cli" - tokencli "github.com/okex/okchain/x/token/client/cli" + "github.com/okex/okexchain/app" + debugcli "github.com/okex/okexchain/x/debug/client/cli" + tokencli "github.com/okex/okexchain/x/token/client/cli" "github.com/spf13/cobra" "github.com/spf13/viper" @@ -43,8 +43,8 @@ func main() { // the below functions and eliminate global vars, like we do with the cdc rootCmd := &cobra.Command{ - Use: "okchaincli", - Short: "Command line interface for interacting with okchaind", + Use: "okexchaincli", + Short: "Command line interface for interacting with okexchaind", } // add --chain-id to persistent flags and mark it required @@ -71,8 +71,8 @@ func main() { client.NewCompletionCmd(rootCmd, true), ) - // add flags and prefix all env exposed with OKCHAIN - executor := cli.PrepareMainCmd(rootCmd, "OKCHAIN", app.DefaultCLIHome) + // add flags and prefix all env exposed with OKEXCHAIN + executor := cli.PrepareMainCmd(rootCmd, "OKEXCHAIN", app.DefaultCLIHome) if err := executor.Execute(); err != nil { fmt.Printf("Failed executing CLI command: %s, exiting...\n", err) diff --git a/cmd/okchaind/main.go b/cmd/okexchaind/main.go similarity index 87% rename from cmd/okchaind/main.go rename to cmd/okexchaind/main.go index 898c11b7d1..8e3d558075 100644 --- a/cmd/okchaind/main.go +++ b/cmd/okexchaind/main.go @@ -11,9 +11,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/genaccounts" genaccscli "github.com/cosmos/cosmos-sdk/x/genaccounts/client/cli" - "github.com/okex/okchain/app" - genutilcli "github.com/okex/okchain/x/genutil/client/cli" - "github.com/okex/okchain/x/staking" + "github.com/okex/okexchain/app" + genutilcli "github.com/okex/okexchain/x/genutil/client/cli" + "github.com/okex/okexchain/x/staking" "github.com/spf13/cobra" "github.com/spf13/viper" abci "github.com/tendermint/tendermint/abci/types" @@ -39,8 +39,8 @@ func main() { ctx := server.NewDefaultContext() cobra.EnableCommandSorting = false rootCmd := &cobra.Command{ - Use: "okchaind", - Short: "OKChain Daemon (server)", + Use: "okexchaind", + Short: "OKExChain Daemon (server)", PersistentPreRunE: server.PersistentPreRunEFn(ctx), } @@ -57,7 +57,7 @@ func main() { rootCmd.PersistentFlags().String(client.FlagKeyPass, client.DefaultKeyPass, "Pass word of sender") // prepare and add flags - executor := cli.PrepareBaseCmd(rootCmd, "OKCHAIN", app.DefaultNodeHome) + executor := cli.PrepareBaseCmd(rootCmd, "OKEXCHAIN", app.DefaultNodeHome) rootCmd.PersistentFlags().UintVar(&invCheckPeriod, flagInvCheckPeriod, 0, "Assert registered invariants every N blocks") @@ -68,7 +68,7 @@ func main() { } func newApp(logger log.Logger, db dbm.DB, traceStore io.Writer) abci.Application { - return app.NewOKChainApp( + return app.NewOKExChainApp( logger, db, traceStore, true, invCheckPeriod, baseapp.SetPruning(store.NewPruningOptionsFromString(viper.GetString("pruning"))), baseapp.SetMinGasPrices(viper.GetString(server.FlagMinGasPrices)), @@ -81,13 +81,13 @@ func exportAppStateAndTMValidators( ) (json.RawMessage, []tmtypes.GenesisValidator, error) { if height != -1 { - gApp := app.NewOKChainApp(logger, db, traceStore, false, uint(1)) + gApp := app.NewOKExChainApp(logger, db, traceStore, false, uint(1)) err := gApp.LoadHeight(height) if err != nil { return nil, nil, err } return gApp.ExportAppStateAndValidators(forZeroHeight, jailWhiteList) } - gApp := app.NewOKChainApp(logger, db, traceStore, true, uint(1)) + gApp := app.NewOKExChainApp(logger, db, traceStore, true, uint(1)) return gApp.ExportAppStateAndValidators(forZeroHeight, jailWhiteList) } diff --git a/cmd/okchaind/replay.go b/cmd/okexchaind/replay.go similarity index 98% rename from cmd/okchaind/replay.go rename to cmd/okexchaind/replay.go index ab37670838..31a95d847d 100644 --- a/cmd/okchaind/replay.go +++ b/cmd/okexchaind/replay.go @@ -37,7 +37,7 @@ func replayCmd(ctx *server.Context) *cobra.Command { log.Println("--------- replay success ---------") }, } - cmd.Flags().StringP(dataDirFlag, "d", ".okchaind/data", "Directory of block data for replaying") + cmd.Flags().StringP(dataDirFlag, "d", ".okexchaind/data", "Directory of block data for replaying") return cmd } diff --git a/cmd/okchaind/rest.go b/cmd/okexchaind/rest.go similarity index 73% rename from cmd/okchaind/rest.go rename to cmd/okexchaind/rest.go index 9e672597a7..13f99e8e00 100644 --- a/cmd/okchaind/rest.go +++ b/cmd/okexchaind/rest.go @@ -6,14 +6,14 @@ import ( authrest "github.com/cosmos/cosmos-sdk/x/auth/client/rest" bankrest "github.com/cosmos/cosmos-sdk/x/bank/client/rest" supplyrest "github.com/cosmos/cosmos-sdk/x/supply/client/rest" - backendrest "github.com/okex/okchain/x/backend/client/rest" - dexrest "github.com/okex/okchain/x/dex/client/rest" - dist "github.com/okex/okchain/x/distribution" - distrest "github.com/okex/okchain/x/distribution/client/rest" - orderrest "github.com/okex/okchain/x/order/client/rest" - stakingrest "github.com/okex/okchain/x/staking/client/rest" - "github.com/okex/okchain/x/token" - tokensrest "github.com/okex/okchain/x/token/client/rest" + backendrest "github.com/okex/okexchain/x/backend/client/rest" + dexrest "github.com/okex/okexchain/x/dex/client/rest" + dist "github.com/okex/okexchain/x/distribution" + distrest "github.com/okex/okexchain/x/distribution/client/rest" + orderrest "github.com/okex/okexchain/x/order/client/rest" + stakingrest "github.com/okex/okexchain/x/staking/client/rest" + "github.com/okex/okexchain/x/token" + tokensrest "github.com/okex/okexchain/x/token/client/rest" ) // registerRoutes registers the routes from the different modules for the LCD. @@ -25,7 +25,7 @@ func registerRoutes(rs *lcd.RestServer) { } func registerRoutesV1(rs *lcd.RestServer) { - v1Router := rs.Mux.PathPrefix("/okchain/v1").Name("v1").Subrouter() + v1Router := rs.Mux.PathPrefix("/okexchain/v1").Name("v1").Subrouter() client.RegisterRoutes(rs.CliCtx, v1Router) authrest.RegisterRoutes(rs.CliCtx, v1Router) bankrest.RegisterRoutes(rs.CliCtx, v1Router) @@ -40,7 +40,7 @@ func registerRoutesV1(rs *lcd.RestServer) { } func registerRoutesV2(rs *lcd.RestServer) { - v2Router := rs.Mux.PathPrefix("/okchain/v2").Name("v1").Subrouter() + v2Router := rs.Mux.PathPrefix("/okexchain/v2").Name("v1").Subrouter() client.RegisterRoutes(rs.CliCtx, v2Router) authrest.RegisterRoutes(rs.CliCtx, v2Router) bankrest.RegisterRoutes(rs.CliCtx, v2Router) diff --git a/cmd/okchaind/testnet.go b/cmd/okexchaind/testnet.go similarity index 94% rename from cmd/okchaind/testnet.go rename to cmd/okexchaind/testnet.go index bc93aa8363..576897490b 100644 --- a/cmd/okchaind/testnet.go +++ b/cmd/okexchaind/testnet.go @@ -19,8 +19,8 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" "github.com/cosmos/cosmos-sdk/x/auth" "github.com/cosmos/cosmos-sdk/x/genaccounts" - "github.com/okex/okchain/x/genutil" - "github.com/okex/okchain/x/staking" + "github.com/okex/okexchain/x/genutil" + "github.com/okex/okexchain/x/staking" "github.com/spf13/cobra" "github.com/spf13/viper" tmconfig "github.com/tendermint/tendermint/config" @@ -48,14 +48,14 @@ func testnetCmd(ctx *server.Context, cdc *codec.Codec, cmd := &cobra.Command{ Use: "testnet", - Short: "Initialize files for a OKChaind testnet", + Short: "Initialize files for a OKExChain testnet", Long: `testnet will create "v" number of directories and populate each with necessary files (private validator, genesis, config, etc.). Note, strict routability for addresses is turned off in the config file. Example: - okchaind testnet --v 4 --output-dir ./output --starting-ip-address 192.168.10.2 -l + okexchaind testnet --v 4 --output-dir ./output --starting-ip-address 192.168.10.2 -l `, RunE: func(cmd *cobra.Command, _ []string) error { config := ctx.Config @@ -81,9 +81,9 @@ Example: "Directory to store initialization data for the testnet") cmd.Flags().String(flagNodeDirPrefix, "node", "Prefix the directory name for each node with (node results in node0, node1, ...)") - cmd.Flags().String(flagNodeDaemonHome, "okchaind", + cmd.Flags().String(flagNodeDaemonHome, "okexchaind", "Home directory of the node's daemon configuration") - cmd.Flags().String(flagNodeCLIHome, "okchaincli", + cmd.Flags().String(flagNodeCLIHome, "okexchaincli", "Home directory of the node's cli configuration") cmd.Flags().String(flagStartingIPAddress, "192.168.0.1", "Starting IP address (192.168.0.1 results in persistent peers list ID0@192.168.0.1:46656, ID1@192.168.0.2:46656, ...)") @@ -113,8 +113,8 @@ func InitTestnet(cmd *cobra.Command, config *tmconfig.Config, cdc *codec.Codec, nodeIDs := make([]string, numValidators) valPubKeys := make([]crypto.PubKey, numValidators) - okchainConfig := srvconfig.DefaultConfig() - okchainConfig.MinGasPrices = minGasPrices + okexchainConfig := srvconfig.DefaultConfig() + okexchainConfig.MinGasPrices = minGasPrices var ( accs []genaccounts.GenesisAccount @@ -233,8 +233,8 @@ func InitTestnet(cmd *cobra.Command, config *tmconfig.Config, cdc *codec.Codec, return err } - okchainConfigFilePath := filepath.Join(nodeDir, "config/okchaind.toml") - srvconfig.WriteConfigFile(okchainConfigFilePath, okchainConfig) + okexchainConfigFilePath := filepath.Join(nodeDir, "config/okexchaind.toml") + srvconfig.WriteConfigFile(okexchainConfigFilePath, okexchainConfig) } if err := initGenFiles(cdc, mbm, chainID, accs, genFiles, numValidators); err != nil { diff --git a/docker-compose.yml b/docker-compose.yml index 9da1ee365d..0bb2608100 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,58 +1,58 @@ version: '3' services: - okchaindnode0: - container_name: okchaindnode0 - image: "okchain/node" + okexchaindnode0: + container_name: okexchaindnode0 + image: "okexchain/node" ports: - "26656-26657:26656-26657" environment: - ID=0 - - LOG=${LOG:-okchaind.log} + - LOG=${LOG:-okexchaind.log} volumes: - - ./build:/okchaind:Z + - ./build:/okexchaind:Z networks: localnet: ipv4_address: 192.168.10.2 - okchaindnode1: - container_name: okchaindnode1 - image: "okchain/node" + okexchaindnode1: + container_name: okexchaindnode1 + image: "okexchain/node" ports: - "26659-26660:26656-26657" environment: - ID=1 - - LOG=${LOG:-okchaind.log} + - LOG=${LOG:-okexchaind.log} volumes: - - ./build:/okchaind:Z + - ./build:/okexchaind:Z networks: localnet: ipv4_address: 192.168.10.3 - okchaindnode2: - container_name: okchaindnode2 - image: "okchain/node" + okexchaindnode2: + container_name: okexchaindnode2 + image: "okexchain/node" environment: - ID=2 - - LOG=${LOG:-okchaind.log} + - LOG=${LOG:-okexchaind.log} ports: - "26661-26662:26656-26657" volumes: - - ./build:/okchaind:Z + - ./build:/okexchaind:Z networks: localnet: ipv4_address: 192.168.10.4 - okchaindnode3: - container_name: okchaindnode3 - image: "okchain/node" + okexchaindnode3: + container_name: okexchaindnode3 + image: "okexchain/node" environment: - ID=3 - - LOG=${LOG:-okchaind.log} + - LOG=${LOG:-okexchaind.log} ports: - "26663-26664:26656-26657" volumes: - - ./build:/okchaind:Z + - ./build:/okexchaind:Z networks: localnet: ipv4_address: 192.168.10.5 diff --git a/go.mod b/go.mod index cea15e3a21..acb763306e 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/okex/okchain +module github.com/okex/okexchain go 1.12 @@ -46,7 +46,7 @@ require ( ) replace ( - github.com/cosmos/cosmos-sdk => github.com/okex/cosmos-sdk v0.37.9-okchain10 - github.com/tendermint/iavl => github.com/okex/iavl v0.12.4-okchain - github.com/tendermint/tendermint => github.com/okex/tendermint v0.32.10-okchain1 + github.com/cosmos/cosmos-sdk => github.com/okex/cosmos-sdk v0.37.9-okexchain + github.com/tendermint/iavl => github.com/okex/iavl v0.12.4-okexchain + github.com/tendermint/tendermint => github.com/okex/tendermint v0.32.10-okexchain ) diff --git a/go.sum b/go.sum index 356c85d72d..b0f811cd9a 100644 --- a/go.sum +++ b/go.sum @@ -195,14 +195,12 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJ github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/okex/cosmos-sdk v0.37.9-okchain10 h1:8aechlCGhrow5SQFqGqGpIKcAP8QHfeX667tP/D5Pc8= -github.com/okex/cosmos-sdk v0.37.9-okchain10/go.mod h1:HjW0+Q5rWWm+4CaK8f5CIN/xf38vkPA2xue1PB5Nk3A= -github.com/okex/cosmos-sdk v0.37.9-okchain8 h1:wefXKagVlmm5KVNzXBrlqvh17axzmZSTBsbES30Ma0w= -github.com/okex/cosmos-sdk v0.37.9-okchain8/go.mod h1:HjW0+Q5rWWm+4CaK8f5CIN/xf38vkPA2xue1PB5Nk3A= -github.com/okex/iavl v0.12.4-okchain h1:BAFmygzhx6k4KGnLrY87ZrJvRSb+wf8Oo4e2KhUwXcU= -github.com/okex/iavl v0.12.4-okchain/go.mod h1:8LHakzt8/0G3/I8FUU0ReNx98S/EP6eyPJkAUvEXT/o= -github.com/okex/tendermint v0.32.10-okchain1 h1:mEsl6YGb7mCkJaXZxnIZO6/jmF947X39wFa4oI8gKgE= -github.com/okex/tendermint v0.32.10-okchain1/go.mod h1:5/B1XZjNYtVBso8o1l/Eg4A0Mhu42lDcmftoQl95j/E= +github.com/okex/cosmos-sdk v0.37.9-okexchain h1:e0yqer6lxFwvMkvS1ebd7rSxRaByjObR3INByjNuTZI= +github.com/okex/cosmos-sdk v0.37.9-okexchain/go.mod h1:HjW0+Q5rWWm+4CaK8f5CIN/xf38vkPA2xue1PB5Nk3A= +github.com/okex/iavl v0.12.4-okexchain h1:fHH/ax1CABQSNiISXIMba3V76qvNZ4HIILaewsMaMbc= +github.com/okex/iavl v0.12.4-okexchain/go.mod h1:8LHakzt8/0G3/I8FUU0ReNx98S/EP6eyPJkAUvEXT/o= +github.com/okex/tendermint v0.32.10-okexchain h1:fYrmdPNH5e1QGr0lzI4yuBZ6QLv52t4enfoBVAoe5rg= +github.com/okex/tendermint v0.32.10-okexchain/go.mod h1:5/B1XZjNYtVBso8o1l/Eg4A0Mhu42lDcmftoQl95j/E= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= diff --git a/networks/local/node/wrapper.sh b/networks/local/node/wrapper.sh index acceb102dc..0c293ce67f 100755 --- a/networks/local/node/wrapper.sh +++ b/networks/local/node/wrapper.sh @@ -3,15 +3,15 @@ ## ## Input parameters ## -BINARY=/okchaind/${BINARY:-okchaind} +BINARY=/okexchaind/${BINARY:-okexchaind} ID=${ID:-0} -LOG=${LOG:-okchaind.log} +LOG=${LOG:-okexchaind.log} ## ## Assert linux binary ## if ! [ -f "${BINARY}" ]; then - echo "The binary $(basename "${BINARY}") cannot be found. Please add the binary to the shared folder. Please use the BINARY environment variable if the name of the binary is not 'okchaind' E.g.: -e BINARY=okchaind_my_test_version" + echo "The binary $(basename "${BINARY}") cannot be found. Please add the binary to the shared folder. Please use the BINARY environment variable if the name of the binary is not 'okexchaind' E.g.: -e BINARY=okexchaind_my_test_version" exit 1 fi BINARY_CHECK="$(file "$BINARY" | grep 'ELF 64-bit LSB executable, x86-64')" @@ -23,7 +23,7 @@ fi ## ## Run binary with all parameters ## -export OKCHAINDHOME="/okchaind/node${ID}/okchaind" +export OKCHAINDHOME="/okexchaind/node${ID}/okexchaind" if [ -d "$(dirname "${OKCHAINDHOME}"/"${LOG}")" ]; then "${BINARY}" --home "${OKCHAINDHOME}" "$@" | tee "${OKCHAINDHOME}/${LOG}" diff --git a/x/ammswap/alias.go b/x/ammswap/alias.go index 02283d6cc5..24ea044bb1 100644 --- a/x/ammswap/alias.go +++ b/x/ammswap/alias.go @@ -1,8 +1,8 @@ package ammswap import ( - "github.com/okex/okchain/x/ammswap/keeper" - "github.com/okex/okchain/x/ammswap/types" + "github.com/okex/okexchain/x/ammswap/keeper" + "github.com/okex/okexchain/x/ammswap/types" ) const ( diff --git a/x/ammswap/client/cli/query.go b/x/ammswap/client/cli/query.go index 8ab5b8c67c..e63b1babde 100644 --- a/x/ammswap/client/cli/query.go +++ b/x/ammswap/client/cli/query.go @@ -2,12 +2,14 @@ package cli import ( "fmt" + "github.com/cosmos/cosmos-sdk/version" + "strings" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/context" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/codec" - "github.com/okex/okchain/x/ammswap/types" + "github.com/okex/okexchain/x/ammswap/types" "github.com/spf13/cobra" ) @@ -25,6 +27,7 @@ func GetQueryCmd(queryRoute string, cdc *codec.Codec) *cobra.Command { swapQueryCmd.AddCommand( flags.GetCommands( GetCmdSwapTokenPair(queryRoute, cdc), + GetCmdQueryParams(queryRoute, cdc), )..., ) @@ -52,3 +55,33 @@ func GetCmdSwapTokenPair(queryRoute string, cdc *codec.Codec) *cobra.Command { }, } } + +// GetCmdQueryProposal implements the query proposal command. +func GetCmdQueryParams(queryRoute string, cdc *codec.Codec) *cobra.Command { + return &cobra.Command{ + Use: "params", + Short: "Query the parameters of the governance process", + Long: strings.TrimSpace( + fmt.Sprintf(`Query the all the parameters for the governance process. + +Example: +$ %s query gov params +`, + version.ClientName, + ), + ), + Args: cobra.NoArgs, + RunE: func(cmd *cobra.Command, args []string) error { + cliCtx := context.NewCLIContext().WithCodec(cdc) + tp, _, err := cliCtx.QueryWithData(fmt.Sprintf("custom/%s/params", queryRoute), nil) + if err != nil { + return err + } + + var params types.Params + cdc.MustUnmarshalJSON(tp, ¶ms) + + return cliCtx.PrintOutput(params) + }, + } +} diff --git a/x/ammswap/client/cli/tx.go b/x/ammswap/client/cli/tx.go index b506d8b84d..4ccbeffbb6 100644 --- a/x/ammswap/client/cli/tx.go +++ b/x/ammswap/client/cli/tx.go @@ -13,7 +13,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/auth/client/utils" "github.com/spf13/cobra" - "github.com/okex/okchain/x/ammswap/types" + "github.com/okex/okexchain/x/ammswap/types" ) // GetTxCmd returns the transaction commands for this module diff --git a/x/ammswap/client/rest/tx.go b/x/ammswap/client/rest/tx.go index c94eae222f..b8b226ae0a 100644 --- a/x/ammswap/client/rest/tx.go +++ b/x/ammswap/client/rest/tx.go @@ -9,8 +9,8 @@ import ( "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/types/rest" "github.com/gorilla/mux" - "github.com/okex/okchain/x/ammswap/types" - "github.com/okex/okchain/x/common" + "github.com/okex/okexchain/x/ammswap/types" + "github.com/okex/okexchain/x/common" ) func registerTxRoutes(cliCtx context.CLIContext, r *mux.Router) { diff --git a/x/ammswap/genesis.go b/x/ammswap/genesis.go index c65af9180c..987117e0d6 100644 --- a/x/ammswap/genesis.go +++ b/x/ammswap/genesis.go @@ -4,7 +4,7 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/ammswap/types" + "github.com/okex/okexchain/x/ammswap/types" ) // GenesisState stores genesis data, all slashing state that must be provided at genesis diff --git a/x/ammswap/genesis_test.go b/x/ammswap/genesis_test.go index 42e974ae61..74611d224a 100644 --- a/x/ammswap/genesis_test.go +++ b/x/ammswap/genesis_test.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/supply" - "github.com/okex/okchain/x/ammswap/types" + "github.com/okex/okexchain/x/ammswap/types" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" ) diff --git a/x/ammswap/handler.go b/x/ammswap/handler.go index c4f6ab8509..7f01d55de3 100644 --- a/x/ammswap/handler.go +++ b/x/ammswap/handler.go @@ -3,9 +3,9 @@ package ammswap import ( "fmt" - "github.com/okex/okchain/x/ammswap/types" - "github.com/okex/okchain/x/common" - "github.com/okex/okchain/x/common/perf" + "github.com/okex/okexchain/x/ammswap/types" + "github.com/okex/okexchain/x/common" + "github.com/okex/okexchain/x/common/perf" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/ammswap/handler_test.go b/x/ammswap/handler_test.go index dafff12dcd..9b448f97a1 100644 --- a/x/ammswap/handler_test.go +++ b/x/ammswap/handler_test.go @@ -8,8 +8,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/supply" - "github.com/okex/okchain/x/ammswap/types" - token "github.com/okex/okchain/x/token/types" + "github.com/okex/okexchain/x/ammswap/types" + token "github.com/okex/okexchain/x/token/types" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" ) diff --git a/x/ammswap/keeper/common_test.go b/x/ammswap/keeper/common_test.go index 37b62500e9..d99e9a7922 100644 --- a/x/ammswap/keeper/common_test.go +++ b/x/ammswap/keeper/common_test.go @@ -11,13 +11,13 @@ import ( "github.com/cosmos/cosmos-sdk/x/mock" "github.com/cosmos/cosmos-sdk/x/supply" "github.com/cosmos/cosmos-sdk/x/supply/exported" - "github.com/okex/okchain/x/ammswap/types" - staking "github.com/okex/okchain/x/staking/types" + "github.com/okex/okexchain/x/ammswap/types" + staking "github.com/okex/okexchain/x/staking/types" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/crypto/secp256k1" - "github.com/okex/okchain/x/token" + "github.com/okex/okexchain/x/token" ) type TestInput struct { diff --git a/x/ammswap/keeper/keeper.go b/x/ammswap/keeper/keeper.go index f33e93cbca..7b6867822c 100644 --- a/x/ammswap/keeper/keeper.go +++ b/x/ammswap/keeper/keeper.go @@ -7,8 +7,8 @@ import ( "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/ammswap/types" - tokentypes "github.com/okex/okchain/x/token/types" + "github.com/okex/okexchain/x/ammswap/types" + tokentypes "github.com/okex/okexchain/x/token/types" ) // Keeper of the swap store diff --git a/x/ammswap/keeper/keeper_test.go b/x/ammswap/keeper/keeper_test.go index 2b17b6a2b1..03ccc139bc 100644 --- a/x/ammswap/keeper/keeper_test.go +++ b/x/ammswap/keeper/keeper_test.go @@ -5,14 +5,14 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/supply" - "github.com/okex/okchain/x/ammswap/types" - "github.com/okex/okchain/x/common" + "github.com/okex/okexchain/x/ammswap/types" + "github.com/okex/okexchain/x/common" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" ) func TestKeeper_GetPoolTokenInfo(t *testing.T) { - addrTest := "okchain1a20d4xmqj4m9shtm0skt0aaahsgeu4h6746fs2" + addrTest := "okexchain1a20d4xmqj4m9shtm0skt0aaahsgeu4h6746fs2" mapp, _ := GetTestInput(t, 1) keeper := mapp.swapKeeper mapp.BeginBlock(abci.RequestBeginBlock{Header: abci.Header{Height: 2}}) diff --git a/x/ammswap/keeper/querier.go b/x/ammswap/keeper/querier.go index b26d949df4..7afb963bdb 100644 --- a/x/ammswap/keeper/querier.go +++ b/x/ammswap/keeper/querier.go @@ -1,11 +1,11 @@ package keeper import ( - "github.com/okex/okchain/x/common" + "github.com/okex/okexchain/x/common" abci "github.com/tendermint/tendermint/abci/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/ammswap/types" + "github.com/okex/okexchain/x/ammswap/types" ) // NewQuerier creates a new querier for swap clients. @@ -14,7 +14,8 @@ func NewQuerier(k Keeper) sdk.Querier { switch path[0] { case types.QuerySwapTokenPair: return querySwapTokenPair(ctx, path[1:], req, k) - + case types.QueryParams: + return queryParams(ctx, path[1:], req, k) default: return nil, sdk.ErrUnknownRequest("unknown swap query endpoint") } @@ -32,3 +33,7 @@ func querySwapTokenPair(ctx sdk.Context, path []string, req abci.RequestQuery, k bz := keeper.cdc.MustMarshalJSON(tokenPair) return bz, nil } + +func queryParams(ctx sdk.Context, path []string, req abci.RequestQuery, keeper Keeper) ([]byte, sdk.Error) { + return keeper.cdc.MustMarshalJSON(keeper.GetParams(ctx)), nil +} diff --git a/x/ammswap/keeper/querier_test.go b/x/ammswap/keeper/querier_test.go index 696e6b805e..5cb65c188c 100644 --- a/x/ammswap/keeper/querier_test.go +++ b/x/ammswap/keeper/querier_test.go @@ -5,8 +5,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/supply" - "github.com/okex/okchain/x/ammswap/types" - "github.com/okex/okchain/x/common" + "github.com/okex/okexchain/x/ammswap/types" + "github.com/okex/okexchain/x/common" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" ) diff --git a/x/ammswap/keeper/swap.go b/x/ammswap/keeper/swap.go index c7a182dff7..559b05107e 100644 --- a/x/ammswap/keeper/swap.go +++ b/x/ammswap/keeper/swap.go @@ -2,7 +2,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/ammswap/types" + "github.com/okex/okexchain/x/ammswap/types" ) // IsTokenExist check token is exist diff --git a/x/ammswap/keeper/swap_test.go b/x/ammswap/keeper/swap_test.go index 173e949cc2..de6c69fca0 100644 --- a/x/ammswap/keeper/swap_test.go +++ b/x/ammswap/keeper/swap_test.go @@ -6,8 +6,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/supply" - "github.com/okex/okchain/x/ammswap/types" - token "github.com/okex/okchain/x/token/types" + "github.com/okex/okexchain/x/ammswap/types" + token "github.com/okex/okexchain/x/token/types" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" ) diff --git a/x/ammswap/mock_test.go b/x/ammswap/mock_test.go index f8ffa5f155..4e6a6d644f 100644 --- a/x/ammswap/mock_test.go +++ b/x/ammswap/mock_test.go @@ -11,13 +11,13 @@ import ( "github.com/cosmos/cosmos-sdk/x/mock" "github.com/cosmos/cosmos-sdk/x/supply" "github.com/cosmos/cosmos-sdk/x/supply/exported" - "github.com/okex/okchain/x/ammswap/types" - staking "github.com/okex/okchain/x/staking/types" + "github.com/okex/okexchain/x/ammswap/types" + staking "github.com/okex/okexchain/x/staking/types" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/crypto/secp256k1" - "github.com/okex/okchain/x/token" + "github.com/okex/okexchain/x/token" ) type MockApp struct { diff --git a/x/ammswap/module.go b/x/ammswap/module.go index 805cde4f6b..63a3757363 100644 --- a/x/ammswap/module.go +++ b/x/ammswap/module.go @@ -8,8 +8,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" "github.com/gorilla/mux" - "github.com/okex/okchain/x/ammswap/client/cli" - "github.com/okex/okchain/x/ammswap/client/rest" + "github.com/okex/okexchain/x/ammswap/client/cli" + "github.com/okex/okexchain/x/ammswap/client/rest" "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" ) diff --git a/x/ammswap/module_test.go b/x/ammswap/module_test.go index 4080fea85b..2a3d0379e0 100644 --- a/x/ammswap/module_test.go +++ b/x/ammswap/module_test.go @@ -6,7 +6,7 @@ import ( cliLcd "github.com/cosmos/cosmos-sdk/client/lcd" "github.com/cosmos/cosmos-sdk/codec" - "github.com/okex/okchain/x/ammswap/types" + "github.com/okex/okexchain/x/ammswap/types" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" ) diff --git a/x/ammswap/types/codec.go b/x/ammswap/types/codec.go index db8c9a8628..6b7b8eb568 100644 --- a/x/ammswap/types/codec.go +++ b/x/ammswap/types/codec.go @@ -6,10 +6,10 @@ import ( // RegisterCodec registers concrete types on codec func RegisterCodec(cdc *codec.Codec) { - cdc.RegisterConcrete(MsgAddLiquidity{}, "okchain/ammswap/MsgAddLiquidity", nil) - cdc.RegisterConcrete(MsgRemoveLiquidity{}, "okchain/ammswap/MsgRemoveLiquidity", nil) - cdc.RegisterConcrete(MsgCreateExchange{}, "okchain/ammswap/MsgCreateExchange", nil) - cdc.RegisterConcrete(MsgTokenToNativeToken{}, "okchain/ammswap/MsgSwapToken", nil) + cdc.RegisterConcrete(MsgAddLiquidity{}, "okexchain/ammswap/MsgAddLiquidity", nil) + cdc.RegisterConcrete(MsgRemoveLiquidity{}, "okexchain/ammswap/MsgRemoveLiquidity", nil) + cdc.RegisterConcrete(MsgCreateExchange{}, "okexchain/ammswap/MsgCreateExchange", nil) + cdc.RegisterConcrete(MsgTokenToNativeToken{}, "okexchain/ammswap/MsgSwapToken", nil) } // ModuleCdc defines the module codec diff --git a/x/ammswap/types/expected_keepers.go b/x/ammswap/types/expected_keepers.go index e4a0f41ed4..ee28ba2c07 100644 --- a/x/ammswap/types/expected_keepers.go +++ b/x/ammswap/types/expected_keepers.go @@ -4,7 +4,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/params" supplyexported "github.com/cosmos/cosmos-sdk/x/supply/exported" - token "github.com/okex/okchain/x/token/types" + token "github.com/okex/okexchain/x/token/types" ) // ParamSubspace defines the expected Subspace interface diff --git a/x/ammswap/types/keys.go b/x/ammswap/types/keys.go index 34e570a420..7816cec89f 100644 --- a/x/ammswap/types/keys.go +++ b/x/ammswap/types/keys.go @@ -15,6 +15,8 @@ const ( // QuerySwapTokenPair query endpoints supported by the swap Querier QuerySwapTokenPair = "swapTokenPair" + + QueryParams = "params" ) var ( diff --git a/x/ammswap/types/msgs.go b/x/ammswap/types/msgs.go index d78ecd4356..f7f62a69a7 100644 --- a/x/ammswap/types/msgs.go +++ b/x/ammswap/types/msgs.go @@ -4,7 +4,7 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/common" + "github.com/okex/okexchain/x/common" ) // PoolSwap message types and routes diff --git a/x/ammswap/types/swap.go b/x/ammswap/types/swap.go index 7e3979bb1f..c4f96bfe07 100644 --- a/x/ammswap/types/swap.go +++ b/x/ammswap/types/swap.go @@ -3,7 +3,7 @@ package types import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/supply" - token "github.com/okex/okchain/x/token/types" + token "github.com/okex/okexchain/x/token/types" "fmt" "regexp" diff --git a/x/ammswap/types/test_common.go b/x/ammswap/types/test_common.go index 499637d1d7..abe3f48437 100644 --- a/x/ammswap/types/test_common.go +++ b/x/ammswap/types/test_common.go @@ -2,7 +2,7 @@ package types import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/common" + "github.com/okex/okexchain/x/common" ) // nolint diff --git a/x/backend/README.md b/x/backend/README.md index 467f7095b4..16fbe82685 100644 --- a/x/backend/README.md +++ b/x/backend/README.md @@ -2,7 +2,7 @@ go get go-sqlite3 ## Unexpected -1. github.com/okex/okchain/vendor/github.com/mattn/go-sqlite3 +1. github.com/okex/okexchain/vendor/github.com/mattn/go-sqlite3 ../../vendor/github.com/mattn/go-sqlite3/backup.go:14:10: fatal error: 'stdlib.h' file not found #include diff --git a/x/backend/abci.go b/x/backend/abci.go index bc025d1fc0..0222093618 100644 --- a/x/backend/abci.go +++ b/x/backend/abci.go @@ -4,11 +4,11 @@ import ( "fmt" "strconv" - "github.com/okex/okchain/x/backend/types" + "github.com/okex/okexchain/x/backend/types" sdk "github.com/cosmos/cosmos-sdk/types" - orderTypes "github.com/okex/okchain/x/order/types" + orderTypes "github.com/okex/okexchain/x/order/types" ) // EndBlocker called every block, check expired orders diff --git a/x/backend/alias.go b/x/backend/alias.go index de19768af5..7a516c1133 100644 --- a/x/backend/alias.go +++ b/x/backend/alias.go @@ -2,10 +2,10 @@ package backend import ( - "github.com/okex/okchain/x/backend/config" - "github.com/okex/okchain/x/backend/keeper" - "github.com/okex/okchain/x/backend/orm" - "github.com/okex/okchain/x/backend/types" + "github.com/okex/okexchain/x/backend/config" + "github.com/okex/okexchain/x/backend/keeper" + "github.com/okex/okexchain/x/backend/orm" + "github.com/okex/okexchain/x/backend/types" ) const ( diff --git a/x/backend/cache/cache.go b/x/backend/cache/cache.go index b28b0f9b2a..39ce2e6861 100644 --- a/x/backend/cache/cache.go +++ b/x/backend/cache/cache.go @@ -1,6 +1,6 @@ package cache -import "github.com/okex/okchain/x/backend/types" +import "github.com/okex/okexchain/x/backend/types" // Cache defines struct to store data in memory type Cache struct { diff --git a/x/backend/cache/cache_test.go b/x/backend/cache/cache_test.go index 9c5adceb89..756b426b17 100644 --- a/x/backend/cache/cache_test.go +++ b/x/backend/cache/cache_test.go @@ -3,8 +3,8 @@ package cache import ( "testing" - "github.com/okex/okchain/x/backend/types" - "github.com/okex/okchain/x/common" + "github.com/okex/okexchain/x/backend/types" + "github.com/okex/okexchain/x/common" "github.com/stretchr/testify/require" ) diff --git a/x/backend/cases/utils.go b/x/backend/cases/utils.go index c3c92f387d..51cb3859e6 100644 --- a/x/backend/cases/utils.go +++ b/x/backend/cases/utils.go @@ -4,9 +4,9 @@ import ( "os" ) -// GetBackendDBDir return the path "$GOPATH/src/github.com/okex/okchain/x/backend/cases" +// GetBackendDBDir return the path "$GOPATH/src/github.com/okex/okexchain/x/backend/cases" func GetBackendDBDir() string { gopath := os.Getenv("GOPATH") - dir := gopath + "/src/github.com/okex/okchain/x/backend/cases" + dir := gopath + "/src/github.com/okex/okexchain/x/backend/cases" return dir } diff --git a/x/backend/cases/utils_test.go b/x/backend/cases/utils_test.go index 19a98bc5f4..fa4f02acb0 100644 --- a/x/backend/cases/utils_test.go +++ b/x/backend/cases/utils_test.go @@ -8,6 +8,6 @@ import ( func TestGetBackendDBDir(t *testing.T) { gopath := os.Getenv("GOPATH") - dir := gopath + "/src/github.com/okex/okchain/x/backend/cases" + dir := gopath + "/src/github.com/okex/okexchain/x/backend/cases" require.Equal(t, dir, GetBackendDBDir()) } diff --git a/x/backend/client/cli/query.go b/x/backend/client/cli/query.go index deb5a5c46f..7cc7b3571c 100644 --- a/x/backend/client/cli/query.go +++ b/x/backend/client/cli/query.go @@ -10,7 +10,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/context" "github.com/cosmos/cosmos-sdk/codec" - "github.com/okex/okchain/x/backend/types" + "github.com/okex/okexchain/x/backend/types" "github.com/spf13/cobra" "github.com/tendermint/tendermint/crypto/tmhash" tmliteProxy "github.com/tendermint/tendermint/lite/proxy" diff --git a/x/backend/client/rest/rest.go b/x/backend/client/rest/rest.go index d883a66be9..d66c738794 100644 --- a/x/backend/client/rest/rest.go +++ b/x/backend/client/rest/rest.go @@ -10,9 +10,9 @@ import ( "github.com/cosmos/cosmos-sdk/client/context" "github.com/cosmos/cosmos-sdk/types/rest" "github.com/gorilla/mux" - "github.com/okex/okchain/x/backend/client/cli" - "github.com/okex/okchain/x/backend/types" - "github.com/okex/okchain/x/common" + "github.com/okex/okexchain/x/backend/client/cli" + "github.com/okex/okexchain/x/backend/types" + "github.com/okex/okexchain/x/common" ) // RegisterRoutes - Central function to define routes that get registered by the main application diff --git a/x/backend/client/rest/rest_v2.go b/x/backend/client/rest/rest_v2.go index 1e717395a4..120dfff859 100644 --- a/x/backend/client/rest/rest_v2.go +++ b/x/backend/client/rest/rest_v2.go @@ -9,8 +9,8 @@ import ( "github.com/cosmos/cosmos-sdk/client/context" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/gorilla/mux" - "github.com/okex/okchain/x/backend/types" - "github.com/okex/okchain/x/common" + "github.com/okex/okexchain/x/backend/types" + "github.com/okex/okexchain/x/common" ) const ( diff --git a/x/backend/config/config.go b/x/backend/config/config.go index 3998012205..65f0ff1429 100644 --- a/x/backend/config/config.go +++ b/x/backend/config/config.go @@ -5,7 +5,7 @@ import ( "os" "path/filepath" - okchaincfg "github.com/cosmos/cosmos-sdk/server/config" + okexchaincfg "github.com/cosmos/cosmos-sdk/server/config" "github.com/tendermint/tendermint/libs/common" ) @@ -13,15 +13,15 @@ import ( // nolint var ( DefaultMaintainConfile = "maintain.conf" - DefaultNodeHome = okchaincfg.GetNodeHome() + DefaultNodeHome = okexchaincfg.GetNodeHome() DefaultNodeCofig = filepath.Join(DefaultNodeHome, "config") DefaultTestConfig = filepath.Join(DefaultNodeHome, "test_config") DefaultTestDataHome = filepath.Join(DefaultNodeHome, "test_data") - DefaultConfig = okchaincfg.DefaultBackendConfig + DefaultConfig = okexchaincfg.DefaultBackendConfig ) // nolint -type Config = okchaincfg.BackendConfig +type Config = okexchaincfg.BackendConfig func loadMaintainConf(confDir string, fileName string) (*Config, error) { fPath := confDir + string(os.PathSeparator) + fileName diff --git a/x/backend/keeper/keeper.go b/x/backend/keeper/keeper.go index 51b1f99539..00da65f38d 100644 --- a/x/backend/keeper/keeper.go +++ b/x/backend/keeper/keeper.go @@ -12,11 +12,11 @@ import ( "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/backend/cache" - "github.com/okex/okchain/x/backend/config" - "github.com/okex/okchain/x/backend/orm" - "github.com/okex/okchain/x/backend/types" - "github.com/okex/okchain/x/token" + "github.com/okex/okexchain/x/backend/cache" + "github.com/okex/okexchain/x/backend/config" + "github.com/okex/okexchain/x/backend/orm" + "github.com/okex/okexchain/x/backend/types" + "github.com/okex/okexchain/x/token" "github.com/tendermint/tendermint/libs/log" ) diff --git a/x/backend/keeper/keeper_channel.go b/x/backend/keeper/keeper_channel.go index 0e5b021568..4c9b14d997 100644 --- a/x/backend/keeper/keeper_channel.go +++ b/x/backend/keeper/keeper_channel.go @@ -4,9 +4,9 @@ import ( "fmt" "time" - "github.com/okex/okchain/x/backend/config" - "github.com/okex/okchain/x/backend/orm" - "github.com/okex/okchain/x/backend/types" + "github.com/okex/okexchain/x/backend/config" + "github.com/okex/okexchain/x/backend/orm" + "github.com/okex/okexchain/x/backend/types" "github.com/tendermint/tendermint/libs/log" ) diff --git a/x/backend/keeper/querier.go b/x/backend/keeper/querier.go index 247e3b8a9a..7ac6091ce2 100644 --- a/x/backend/keeper/querier.go +++ b/x/backend/keeper/querier.go @@ -8,9 +8,9 @@ import ( "time" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/backend/types" - "github.com/okex/okchain/x/common" - orderTypes "github.com/okex/okchain/x/order/types" + "github.com/okex/okexchain/x/backend/types" + "github.com/okex/okexchain/x/common" + orderTypes "github.com/okex/okexchain/x/order/types" abci "github.com/tendermint/tendermint/abci/types" ) diff --git a/x/backend/keeper/querier_v2.go b/x/backend/keeper/querier_v2.go index b35cc41326..2727b88721 100644 --- a/x/backend/keeper/querier_v2.go +++ b/x/backend/keeper/querier_v2.go @@ -6,8 +6,8 @@ import ( "time" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/backend/types" - "github.com/okex/okchain/x/common" + "github.com/okex/okexchain/x/backend/types" + "github.com/okex/okexchain/x/common" abci "github.com/tendermint/tendermint/abci/types" ) diff --git a/x/backend/keeper_test.go b/x/backend/keeper_test.go index 13b0fcb209..37bc5d7398 100644 --- a/x/backend/keeper_test.go +++ b/x/backend/keeper_test.go @@ -5,17 +5,17 @@ import ( "testing" "time" - "github.com/okex/okchain/x/backend/cases" - "github.com/okex/okchain/x/backend/config" - "github.com/okex/okchain/x/backend/orm" - "github.com/okex/okchain/x/dex" - orderTypes "github.com/okex/okchain/x/order/types" + "github.com/okex/okexchain/x/backend/cases" + "github.com/okex/okexchain/x/backend/config" + "github.com/okex/okexchain/x/backend/orm" + "github.com/okex/okexchain/x/dex" + orderTypes "github.com/okex/okexchain/x/order/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/auth" - "github.com/okex/okchain/x/backend/types" - "github.com/okex/okchain/x/common" - tokenTypes "github.com/okex/okchain/x/token/types" + "github.com/okex/okexchain/x/backend/types" + "github.com/okex/okexchain/x/common" + tokenTypes "github.com/okex/okexchain/x/token/types" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" ) diff --git a/x/backend/mock_test.go b/x/backend/mock_test.go index a05cdd566b..7da8f512e2 100644 --- a/x/backend/mock_test.go +++ b/x/backend/mock_test.go @@ -2,7 +2,7 @@ package backend import ( "fmt" - types2 "github.com/okex/okchain/x/dex/types" + types2 "github.com/okex/okexchain/x/dex/types" "os" "testing" "time" @@ -10,29 +10,29 @@ import ( "github.com/cosmos/cosmos-sdk/client/lcd" "github.com/cosmos/cosmos-sdk/x/supply" "github.com/cosmos/cosmos-sdk/x/supply/exported" - "github.com/okex/okchain/x/backend/client/cli" - "github.com/okex/okchain/x/backend/config" - "github.com/okex/okchain/x/backend/orm" - "github.com/okex/okchain/x/backend/types" - "github.com/okex/okchain/x/common/monitor" - "github.com/okex/okchain/x/common/version" - "github.com/okex/okchain/x/order/keeper" - ordertypes "github.com/okex/okchain/x/order/types" - tokentypes "github.com/okex/okchain/x/token/types" + "github.com/okex/okexchain/x/backend/client/cli" + "github.com/okex/okexchain/x/backend/config" + "github.com/okex/okexchain/x/backend/orm" + "github.com/okex/okexchain/x/backend/types" + "github.com/okex/okexchain/x/common/monitor" + "github.com/okex/okexchain/x/common/version" + "github.com/okex/okexchain/x/order/keeper" + ordertypes "github.com/okex/okexchain/x/order/types" + tokentypes "github.com/okex/okexchain/x/token/types" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/auth" "github.com/cosmos/cosmos-sdk/x/bank" "github.com/cosmos/cosmos-sdk/x/mock" - "github.com/okex/okchain/x/common" + "github.com/okex/okexchain/x/common" - //"github.com/okex/okchain/x/gov" - "github.com/okex/okchain/x/dex" - "github.com/okex/okchain/x/order" + //"github.com/okex/okexchain/x/gov" + "github.com/okex/okexchain/x/dex" + "github.com/okex/okexchain/x/order" - //"github.com/okex/okchain/x/staking" - "github.com/okex/okchain/x/token" + //"github.com/okex/okexchain/x/staking" + "github.com/okex/okexchain/x/token" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/crypto/secp256k1" diff --git a/x/backend/module.go b/x/backend/module.go index 2566ff128d..1f60241192 100644 --- a/x/backend/module.go +++ b/x/backend/module.go @@ -3,8 +3,8 @@ package backend import ( "encoding/json" - "github.com/okex/okchain/x/backend/client/cli" - "github.com/okex/okchain/x/backend/client/rest" + "github.com/okex/okexchain/x/backend/client/cli" + "github.com/okex/okexchain/x/backend/client/rest" "github.com/gorilla/mux" "github.com/spf13/cobra" diff --git a/x/backend/orm/orm.go b/x/backend/orm/orm.go index 0cf4aa139d..1e41738779 100644 --- a/x/backend/orm/orm.go +++ b/x/backend/orm/orm.go @@ -12,26 +12,26 @@ import ( "github.com/shopspring/decimal" - okchaincfg "github.com/cosmos/cosmos-sdk/server/config" + okexchaincfg "github.com/cosmos/cosmos-sdk/server/config" _ "github.com/go-sql-driver/mysql" "github.com/jinzhu/gorm" _ "github.com/jinzhu/gorm/dialects/mysql" _ "github.com/jinzhu/gorm/dialects/sqlite" - "github.com/okex/okchain/x/backend/types" - "github.com/okex/okchain/x/token" + "github.com/okex/okexchain/x/backend/types" + "github.com/okex/okexchain/x/token" "github.com/pkg/errors" "github.com/tendermint/tendermint/libs/log" ) // nolint const ( - EngineTypeSqlite = okchaincfg.BackendOrmEngineTypeSqlite - EngineTypeMysql = okchaincfg.BackendOrmEngineTypeMysql + EngineTypeSqlite = okexchaincfg.BackendOrmEngineTypeSqlite + EngineTypeMysql = okexchaincfg.BackendOrmEngineTypeMysql ) // nolint -type OrmEngineInfo = okchaincfg.BackendOrmEngineInfo +type OrmEngineInfo = okexchaincfg.BackendOrmEngineInfo // ORM is designed for deal with database by orm // http://gorm.io/docs/query.html diff --git a/x/backend/orm/orm_mysql_sys_test.go b/x/backend/orm/orm_mysql_sys_test.go index 3bab131508..4cb330d217 100644 --- a/x/backend/orm/orm_mysql_sys_test.go +++ b/x/backend/orm/orm_mysql_sys_test.go @@ -3,9 +3,9 @@ package orm import ( "testing" - "github.com/okex/okchain/x/backend/types" - "github.com/okex/okchain/x/common" - "github.com/okex/okchain/x/token" + "github.com/okex/okexchain/x/backend/types" + "github.com/okex/okexchain/x/common" + "github.com/okex/okexchain/x/token" ) type DangrousORM struct { diff --git a/x/backend/orm/orm_test.go b/x/backend/orm/orm_test.go index e7f5e0f499..7d89f7d28b 100644 --- a/x/backend/orm/orm_test.go +++ b/x/backend/orm/orm_test.go @@ -12,9 +12,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/jinzhu/gorm" _ "github.com/jinzhu/gorm/dialects/sqlite" - "github.com/okex/okchain/x/backend/types" - "github.com/okex/okchain/x/common" - "github.com/okex/okchain/x/token" + "github.com/okex/okexchain/x/backend/types" + "github.com/okex/okexchain/x/common" + "github.com/okex/okexchain/x/token" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" tcommon "github.com/tendermint/tendermint/libs/common" diff --git a/x/backend/querier_test.go b/x/backend/querier_test.go index 663c113299..1e9d0cfe25 100644 --- a/x/backend/querier_test.go +++ b/x/backend/querier_test.go @@ -10,9 +10,9 @@ import ( "github.com/tendermint/go-amino" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/backend/types" - "github.com/okex/okchain/x/common" - orderTypes "github.com/okex/okchain/x/order/types" + "github.com/okex/okexchain/x/backend/types" + "github.com/okex/okexchain/x/common" + orderTypes "github.com/okex/okexchain/x/order/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" diff --git a/x/backend/ticker_test.go b/x/backend/ticker_test.go index cbb0ee68d7..78e0df38be 100644 --- a/x/backend/ticker_test.go +++ b/x/backend/ticker_test.go @@ -7,10 +7,10 @@ import ( "github.com/stretchr/testify/require" - "github.com/okex/okchain/x/backend/cache" - "github.com/okex/okchain/x/backend/orm" - "github.com/okex/okchain/x/backend/types" - "github.com/okex/okchain/x/common" + "github.com/okex/okexchain/x/backend/cache" + "github.com/okex/okexchain/x/backend/orm" + "github.com/okex/okexchain/x/backend/types" + "github.com/okex/okexchain/x/common" "github.com/stretchr/testify/assert" ) diff --git a/x/backend/types/expected_keepers.go b/x/backend/types/expected_keepers.go index c6cf5e33d5..0060e3a26c 100644 --- a/x/backend/types/expected_keepers.go +++ b/x/backend/types/expected_keepers.go @@ -2,11 +2,11 @@ package types import ( sdk "github.com/cosmos/cosmos-sdk/types" - dextypes "github.com/okex/okchain/x/dex/types" - "github.com/okex/okchain/x/order" - ordertypes "github.com/okex/okchain/x/order/types" - "github.com/okex/okchain/x/stream/exported" - "github.com/okex/okchain/x/token" + dextypes "github.com/okex/okexchain/x/dex/types" + "github.com/okex/okexchain/x/order" + ordertypes "github.com/okex/okexchain/x/order/types" + "github.com/okex/okexchain/x/stream/exported" + "github.com/okex/okexchain/x/token" "github.com/willf/bitset" ) diff --git a/x/backend/types/klines_test.go b/x/backend/types/klines_test.go index 64834a7699..1fbfa4b69d 100644 --- a/x/backend/types/klines_test.go +++ b/x/backend/types/klines_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - "github.com/okex/okchain/x/common" + "github.com/okex/okexchain/x/common" "github.com/stretchr/testify/require" diff --git a/x/backend/types/params_test.go b/x/backend/types/params_test.go index 63836289cc..1d6a74d85f 100644 --- a/x/backend/types/params_test.go +++ b/x/backend/types/params_test.go @@ -1,7 +1,7 @@ package types import ( - "github.com/okex/okchain/x/common" + "github.com/okex/okexchain/x/common" "testing" "github.com/stretchr/testify/require" diff --git a/x/backend/types/tx.go b/x/backend/types/tx.go index 72cda85211..32db1e63d8 100644 --- a/x/backend/types/tx.go +++ b/x/backend/types/tx.go @@ -3,9 +3,9 @@ package types import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/auth" - "github.com/okex/okchain/x/common" - orderTypes "github.com/okex/okchain/x/order/types" - tokenTypes "github.com/okex/okchain/x/token/types" + "github.com/okex/okexchain/x/common" + orderTypes "github.com/okex/okexchain/x/order/types" + tokenTypes "github.com/okex/okexchain/x/token/types" "github.com/willf/bitset" ) diff --git a/x/backend/types/tx_test.go b/x/backend/types/tx_test.go index 19eda0a6c8..7e79c03d44 100644 --- a/x/backend/types/tx_test.go +++ b/x/backend/types/tx_test.go @@ -7,20 +7,20 @@ import ( "testing" "time" - "github.com/okex/okchain/x/common" + "github.com/okex/okexchain/x/common" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/auth" - "github.com/okex/okchain/x/order" - orderKeeper "github.com/okex/okchain/x/order/keeper" - tokenKeeper "github.com/okex/okchain/x/token" - token "github.com/okex/okchain/x/token/types" + "github.com/okex/okexchain/x/order" + orderKeeper "github.com/okex/okexchain/x/order/keeper" + tokenKeeper "github.com/okex/okexchain/x/token" + token "github.com/okex/okexchain/x/token/types" "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/crypto/secp256k1" ) func TestGenerateTx(t *testing.T) { - txbldr := auth.NewTxBuilder(auth.DefaultTxEncoder(auth.ModuleCdc), 1, 2, 3, 4, false, "okchain", "memo", nil, nil) + txbldr := auth.NewTxBuilder(auth.DefaultTxEncoder(auth.ModuleCdc), 1, 2, 3, 4, false, "okexchain", "memo", nil, nil) testInput := orderKeeper.CreateTestInput(t) keeper := testInput.OrderKeeper diff --git a/x/backend/types/types.go b/x/backend/types/types.go index e9e7b23e58..8bc1ea0181 100644 --- a/x/backend/types/types.go +++ b/x/backend/types/types.go @@ -3,7 +3,7 @@ package types import ( "fmt" - orderTypes "github.com/okex/okchain/x/order/types" + orderTypes "github.com/okex/okexchain/x/order/types" "time" ) diff --git a/x/backend/types/types_v2.go b/x/backend/types/types_v2.go index 3741deec00..69574bd604 100644 --- a/x/backend/types/types_v2.go +++ b/x/backend/types/types_v2.go @@ -8,7 +8,7 @@ import ( "strings" "time" - "github.com/okex/okchain/x/dex" + "github.com/okex/okexchain/x/dex" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/backend/types/types_v2_test.go b/x/backend/types/types_v2_test.go index 219e6321b5..b5ee6bf12f 100644 --- a/x/backend/types/types_v2_test.go +++ b/x/backend/types/types_v2_test.go @@ -8,7 +8,7 @@ import ( "time" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/dex" + "github.com/okex/okexchain/x/dex" "github.com/stretchr/testify/require" ) diff --git a/x/common/util.go b/x/common/util.go index 98db921cfe..fe31fe0124 100644 --- a/x/common/util.go +++ b/x/common/util.go @@ -86,7 +86,7 @@ func HasSufficientCoins(addr sdk.AccAddress, availableCoins, amt sdk.Coins) (err } // SkipSysTestChecker is supported to used in System Unit Test -// (described in http://gitlab.okcoin-inc.com/dex/okchain/issues/472) +// (described in http://gitlab.okcoin-inc.com/dex/okexchain/issues/472) // if System environment variables "SYS_TEST_ALL" is set to 1, all of the system test will be enable. \n // if System environment variables "ORM_MYSQL_SYS_TEST" is set to 1, // all of the system test in orm_mysql_sys_test.go will be enble. diff --git a/x/common/util_test.go b/x/common/util_test.go index f9eb586684..81ba0150d8 100644 --- a/x/common/util_test.go +++ b/x/common/util_test.go @@ -81,7 +81,7 @@ func TestSdkNewDecCoin(t *testing.T) { } func TestHasSufCoins(t *testing.T) { - addr, err := sdk.AccAddressFromBech32("okchain18mxjm0knqjpkaxk2zd2jr67pgrd8c0ctznrds8") + addr, err := sdk.AccAddressFromBech32("okexchain18mxjm0knqjpkaxk2zd2jr67pgrd8c0ct0tycvl") require.Nil(t, err) availDecCoins, err := sdk.ParseDecCoins(fmt.Sprintf("%d%s,%d%s", diff --git a/x/debug/alias.go b/x/debug/alias.go index 5351a28690..451cff7978 100644 --- a/x/debug/alias.go +++ b/x/debug/alias.go @@ -1,8 +1,8 @@ package debug import ( - "github.com/okex/okchain/x/debug/keeper" - "github.com/okex/okchain/x/debug/types" + "github.com/okex/okexchain/x/debug/keeper" + "github.com/okex/okexchain/x/debug/types" ) const ( diff --git a/x/debug/client/cli/debug.go b/x/debug/client/cli/debug.go index c18aa86877..50ef85f08d 100644 --- a/x/debug/client/cli/debug.go +++ b/x/debug/client/cli/debug.go @@ -7,7 +7,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/context" "github.com/cosmos/cosmos-sdk/codec" - "github.com/okex/okchain/x/debug/types" + "github.com/okex/okexchain/x/debug/types" "github.com/spf13/cobra" ) @@ -64,11 +64,11 @@ func CmdSetLogLevel(queryRoute string, cdc *codec.Codec) *cobra.Command { return &cobra.Command{ Use: "set-loglevel", Args: cobra.ExactArgs(1), - Short: "Set the okchaind log level", + Short: "Set the okexchaind log level", Long: strings.TrimSpace(` -$ okchaincli debug set-loglevel "main:info,state:info" +$ okexchaincli debug set-loglevel "main:info,state:info" -$ okchaincli debug set-loglevel "upgrade:error" +$ okexchaincli debug set-loglevel "upgrade:error" `), RunE: func(cmd *cobra.Command, args []string) error { cliCtx := context.NewCLIContext().WithCodec(cdc) @@ -81,7 +81,7 @@ $ okchaincli debug set-loglevel "upgrade:error" return err } - fmt.Println("Succeed to set the okchaind log level.") + fmt.Println("Succeed to set the okexchaind log level.") return nil }, } diff --git a/x/debug/keeper/keeper.go b/x/debug/keeper/keeper.go index 921cb3e00e..f52f08b3b7 100644 --- a/x/debug/keeper/keeper.go +++ b/x/debug/keeper/keeper.go @@ -5,7 +5,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/debug/types" + "github.com/okex/okexchain/x/debug/types" ) // keeper of debug module diff --git a/x/debug/keeper/querier.go b/x/debug/keeper/querier.go index dc5b9c5f2a..00b7856403 100644 --- a/x/debug/keeper/querier.go +++ b/x/debug/keeper/querier.go @@ -3,10 +3,10 @@ package keeper import ( "strings" - "github.com/okex/okchain/x/staking" + "github.com/okex/okexchain/x/staking" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/debug/types" + "github.com/okex/okexchain/x/debug/types" abci "github.com/tendermint/tendermint/abci/types" tmlog "github.com/tendermint/tendermint/libs/log" ) diff --git a/x/debug/module.go b/x/debug/module.go index 265de02193..d5a00d3ef7 100644 --- a/x/debug/module.go +++ b/x/debug/module.go @@ -8,7 +8,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" "github.com/gorilla/mux" - "github.com/okex/okchain/x/debug/types" + "github.com/okex/okexchain/x/debug/types" "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" ) diff --git a/x/debug/types/expected_keepers.go b/x/debug/types/expected_keepers.go index 3c1e31b964..0ce78b4591 100644 --- a/x/debug/types/expected_keepers.go +++ b/x/debug/types/expected_keepers.go @@ -2,7 +2,7 @@ package types import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/staking" + "github.com/okex/okexchain/x/staking" ) type OrderKeeper interface { diff --git a/x/dex/alias.go b/x/dex/alias.go index 96b451ad21..3c87c02004 100644 --- a/x/dex/alias.go +++ b/x/dex/alias.go @@ -1,14 +1,14 @@ // nolint // aliases generated for the following subdirectories: -// ALIASGEN: github.com/okex/okchain/x/dex/keeper -// ALIASGEN: github.com/okex/okchain/x/dex/types +// ALIASGEN: github.com/okex/okexchain/x/dex/keeper +// ALIASGEN: github.com/okex/okexchain/x/dex/types package dex import ( "github.com/cosmos/cosmos-sdk/x/auth" - "github.com/okex/okchain/x/common/version" - "github.com/okex/okchain/x/dex/keeper" - "github.com/okex/okchain/x/dex/types" + "github.com/okex/okexchain/x/common/version" + "github.com/okex/okexchain/x/dex/keeper" + "github.com/okex/okexchain/x/dex/types" ) const ( diff --git a/x/dex/client/cli/query.go b/x/dex/client/cli/query.go index 6563adab5f..1070cb2f94 100644 --- a/x/dex/client/cli/query.go +++ b/x/dex/client/cli/query.go @@ -11,7 +11,7 @@ import ( "github.com/spf13/cobra" "github.com/spf13/viper" - "github.com/okex/okchain/x/dex/types" + "github.com/okex/okexchain/x/dex/types" ) // GetQueryCmd returns the cli query commands for this module @@ -135,7 +135,7 @@ func GetCmdQueryParams(queryRoute string, cdc *codec.Codec) *cobra.Command { Short: "Query all the modifiable parameters of gov proposal", Long: strings.TrimSpace(`Query the all the parameters for the governance process: -$ okchaincli query dex params +$ okexchaincli query dex params `), Args: cobra.NoArgs, RunE: func(_ *cobra.Command, _ []string) error { @@ -162,7 +162,7 @@ func GetCmdQueryProductsUnderDelisting(queryRoute string, cdc *codec.Codec) *cob Long: strings.TrimSpace(` Query all the products' names involved in dex delisting: -$ okchaincli query dex products-delisting`), +$ okexchaincli query dex products-delisting`), RunE: func(cmd *cobra.Command, _ []string) error { cliCtx := context.NewCLIContext().WithCodec(cdc) res, _, err := cliCtx.QueryWithData(fmt.Sprintf("custom/%s/%s", queryRoute, types.QueryProductsDelisting), nil) diff --git a/x/dex/client/cli/tx.go b/x/dex/client/cli/tx.go index a509b77ca7..a845c8b98e 100644 --- a/x/dex/client/cli/tx.go +++ b/x/dex/client/cli/tx.go @@ -5,7 +5,7 @@ import ( "strings" "github.com/cosmos/cosmos-sdk/version" - "github.com/okex/okchain/x/gov" + "github.com/okex/okexchain/x/gov" "github.com/pkg/errors" @@ -18,9 +18,9 @@ import ( "github.com/cosmos/cosmos-sdk/x/auth" authTypes "github.com/cosmos/cosmos-sdk/x/auth" "github.com/cosmos/cosmos-sdk/x/auth/client/utils" - "github.com/okex/okchain/x/common" - dexUtils "github.com/okex/okchain/x/dex/client/utils" - "github.com/okex/okchain/x/dex/types" + "github.com/okex/okexchain/x/common" + dexUtils "github.com/okex/okexchain/x/dex/client/utils" + "github.com/okex/okexchain/x/dex/types" "github.com/spf13/cobra" ) @@ -64,7 +64,7 @@ func getCmdList(cdc *codec.Codec) *cobra.Command { Args: cobra.ExactArgs(0), Long: strings.TrimSpace(`List a trading pair: -$ okchaincli tx dex list --base-asset mytoken --quote-asset okt --from mykey +$ okexchaincli tx dex list --base-asset mytoken --quote-asset okt --from mykey `), RunE: func(cmd *cobra.Command, _ []string) error { cliCtx := context.NewCLIContext().WithCodec(cdc) @@ -112,7 +112,7 @@ func getCmdDeposit(cdc *codec.Codec) *cobra.Command { Short: "deposit an amount of token on a product", Long: strings.TrimSpace(`Deposit an amount of token on a product: -$ okchaincli tx dex deposit mytoken_okt 1000okt --from mykey +$ okexchaincli tx dex deposit mytoken_okt 1000okt --from mykey The 'product' is a trading pair in full name of the tokens: ${base-asset-symbol}_${quote-asset-symbol}, for example 'mytoken_okt'. `), @@ -145,7 +145,7 @@ func getCmdWithdraw(cdc *codec.Codec) *cobra.Command { Short: "withdraw an amount of token from a product", Long: strings.TrimSpace(`Withdraw an amount of token from a product: -$ okchaincli tx dex withdraw mytoken_okt 1000okt --from mykey +$ okexchaincli tx dex withdraw mytoken_okt 1000okt --from mykey The 'product' is a trading pair in full name of the tokens: ${base-asset-symbol}_${quote-asset-symbol}, for example 'mytoken_okt'. `), @@ -313,7 +313,7 @@ func getCmdRegisterOperator(cdc *codec.Codec) *cobra.Command { Args: cobra.ExactArgs(0), Long: strings.TrimSpace(`Register a dex operator: -$ okchaincli tx dex register-operator --website http://xxx/operator.json --handling-fee-address addr --from mykey +$ okexchaincli tx dex register-operator --website http://xxx/operator.json --handling-fee-address addr --from mykey `), RunE: func(cmd *cobra.Command, _ []string) error { cliCtx := context.NewCLIContext().WithCodec(cdc) @@ -355,7 +355,7 @@ func getCmdEditOperator(cdc *codec.Codec) *cobra.Command { Args: cobra.ExactArgs(0), Long: strings.TrimSpace(`Edit a dex operator: -$ okchaincli tx dex edit-operator --website http://xxx/operator.json --handling-fee-address addr --from mykey +$ okexchaincli tx dex edit-operator --website http://xxx/operator.json --handling-fee-address addr --from mykey `), RunE: func(cmd *cobra.Command, _ []string) error { cliCtx := context.NewCLIContext().WithCodec(cdc) diff --git a/x/dex/client/proposal_handler.go b/x/dex/client/proposal_handler.go index 2c67d9e705..8d3c5ef8f7 100644 --- a/x/dex/client/proposal_handler.go +++ b/x/dex/client/proposal_handler.go @@ -1,9 +1,9 @@ package client import ( - "github.com/okex/okchain/x/dex/client/cli" - "github.com/okex/okchain/x/dex/client/rest" - govclient "github.com/okex/okchain/x/gov/client" + "github.com/okex/okexchain/x/dex/client/cli" + "github.com/okex/okexchain/x/dex/client/rest" + govclient "github.com/okex/okexchain/x/gov/client" ) // param change proposal handler diff --git a/x/dex/client/rest/rest.go b/x/dex/client/rest/rest.go index b5256504bd..4f373f74be 100644 --- a/x/dex/client/rest/rest.go +++ b/x/dex/client/rest/rest.go @@ -6,12 +6,12 @@ import ( "net/http" "strings" - "github.com/okex/okchain/x/dex/types" + "github.com/okex/okexchain/x/dex/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/rest" - "github.com/okex/okchain/x/common" - govRest "github.com/okex/okchain/x/gov/client/rest" + "github.com/okex/okexchain/x/common" + govRest "github.com/okex/okexchain/x/gov/client/rest" "github.com/cosmos/cosmos-sdk/client/context" "github.com/gorilla/mux" diff --git a/x/dex/endblocker.go b/x/dex/endblocker.go index 5da7ec88c1..8c04fbef46 100644 --- a/x/dex/endblocker.go +++ b/x/dex/endblocker.go @@ -3,8 +3,8 @@ package dex import ( "fmt" - "github.com/okex/okchain/x/common/perf" - "github.com/okex/okchain/x/dex/types" + "github.com/okex/okexchain/x/common/perf" + "github.com/okex/okexchain/x/dex/types" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/dex/genesis.go b/x/dex/genesis.go index c79bc28a38..8b3b090be9 100644 --- a/x/dex/genesis.go +++ b/x/dex/genesis.go @@ -4,8 +4,8 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/dex/types" - ordertypes "github.com/okex/okchain/x/order/types" + "github.com/okex/okexchain/x/dex/types" + ordertypes "github.com/okex/okexchain/x/order/types" ) // GenesisState - all dex state that must be provided at genesis diff --git a/x/dex/genesis_test.go b/x/dex/genesis_test.go index 253b9bac7d..7a7a2f44ed 100644 --- a/x/dex/genesis_test.go +++ b/x/dex/genesis_test.go @@ -6,8 +6,8 @@ import ( "time" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/dex/types" - ordertypes "github.com/okex/okchain/x/order/types" + "github.com/okex/okexchain/x/dex/types" + ordertypes "github.com/okex/okexchain/x/order/types" "github.com/stretchr/testify/require" ) @@ -25,7 +25,7 @@ func TestInitGenesis(t *testing.T) { operators = append(operators, types.DEXOperator{ Address: tokenPair.Owner, HandlingFeeAddress: tokenPair.Owner, - Website: "http://www.okchain.com/operator.json", + Website: "http://www.okexchain.com/operator.json", InitHeight: 100, }) diff --git a/x/dex/handler.go b/x/dex/handler.go index ca3adc9e71..7a5211c5b3 100644 --- a/x/dex/handler.go +++ b/x/dex/handler.go @@ -4,8 +4,8 @@ import ( "fmt" "strconv" - "github.com/okex/okchain/x/common/perf" - "github.com/okex/okchain/x/dex/types" + "github.com/okex/okexchain/x/common/perf" + "github.com/okex/okexchain/x/dex/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/tendermint/tendermint/crypto/tmhash" diff --git a/x/dex/handler_test.go b/x/dex/handler_test.go index 141099ff18..b3281431f2 100644 --- a/x/dex/handler_test.go +++ b/x/dex/handler_test.go @@ -3,10 +3,10 @@ package dex import ( "testing" - "github.com/okex/okchain/x/common" + "github.com/okex/okexchain/x/common" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/dex/types" + "github.com/okex/okexchain/x/dex/types" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" ) diff --git a/x/dex/keeper.md b/x/dex/keeper.md index 2fc3c1382d..7445973af4 100644 --- a/x/dex/keeper.md +++ b/x/dex/keeper.md @@ -5,9 +5,9 @@ KVStoreKey的name是"token_pair" | key | value | number(key) | value details | Value size | Clean up | 备注 | | :----------------------: | :----------------------: | :----------: | :-----------------: | :--------: | :----------------------: | :-------------: | | 0x01+$trading_pair | struct x/dex.TokenPair | 币对数 | TokenPair结构体如下 | <1k | 有接口删除上交易所的币对 | 存的交易币对的详细信息 | -| "tokenPairNumberKey" | uint64 | 1 | dex运营方在okchain发行的币对数量 | <1k | | 存的okchain交易币对的数量 | -| 0x02+$owner_addr | WithdrawInfo | 在途赎回数 | dex运营方在okchain发行的币对数量 | <1k | | 存的okchain交易币对的数量 | -| 0x03+$trading_pair | product lock | 币对数 | dex运营方在okchain发行的币对数量 | <1k | | 存的okchain交易币对的数量 | +| "tokenPairNumberKey" | uint64 | 1 | dex运营方在okexchain发行的币对数量 | <1k | | 存的okexchain交易币对的数量 | +| 0x02+$owner_addr | WithdrawInfo | 在途赎回数 | dex运营方在okexchain发行的币对数量 | <1k | | 存的okexchain交易币对的数量 | +| 0x03+$trading_pair | product lock | 币对数 | dex运营方在okexchain发行的币对数量 | <1k | | 存的okexchain交易币对的数量 | tokenPair的value是经过Codec.MustMarshalBinaryBare序列化后的[]byte,tokenPair的结构体如下: diff --git a/x/dex/keeper/expected_keeper.go b/x/dex/keeper/expected_keeper.go index ec06ec976c..5eae08a025 100644 --- a/x/dex/keeper/expected_keeper.go +++ b/x/dex/keeper/expected_keeper.go @@ -5,9 +5,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/supply/exported" - "github.com/okex/okchain/x/dex/types" - ordertypes "github.com/okex/okchain/x/order/types" - "github.com/okex/okchain/x/params" + "github.com/okex/okexchain/x/dex/types" + ordertypes "github.com/okex/okexchain/x/order/types" + "github.com/okex/okexchain/x/params" ) // SupplyKeeper defines the expected supply Keeper diff --git a/x/dex/keeper/invariant.go b/x/dex/keeper/invariant.go index 076d677c10..a21caa6332 100644 --- a/x/dex/keeper/invariant.go +++ b/x/dex/keeper/invariant.go @@ -4,7 +4,7 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/dex/types" + "github.com/okex/okexchain/x/dex/types" ) // RegisterInvariants registers all dex invariants diff --git a/x/dex/keeper/invariant_test.go b/x/dex/keeper/invariant_test.go index b8d7ad2f48..f16ad05cea 100644 --- a/x/dex/keeper/invariant_test.go +++ b/x/dex/keeper/invariant_test.go @@ -4,7 +4,7 @@ import ( "testing" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/dex/types" + "github.com/okex/okexchain/x/dex/types" "github.com/stretchr/testify/require" ) diff --git a/x/dex/keeper/keeper.go b/x/dex/keeper/keeper.go index 1a03803549..30baa4ef62 100644 --- a/x/dex/keeper/keeper.go +++ b/x/dex/keeper/keeper.go @@ -5,14 +5,14 @@ import ( "sort" "time" - "github.com/okex/okchain/x/stream/exported" + "github.com/okex/okexchain/x/stream/exported" "github.com/pkg/errors" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/dex/types" - "github.com/okex/okchain/x/params" + "github.com/okex/okexchain/x/dex/types" + "github.com/okex/okexchain/x/params" ) // Keeper maintains the link to data storage and exposes getter/setter methods for the various parts of the state machine diff --git a/x/dex/keeper/keeper_test.go b/x/dex/keeper/keeper_test.go index cb5b9574d2..742909ba49 100644 --- a/x/dex/keeper/keeper_test.go +++ b/x/dex/keeper/keeper_test.go @@ -4,12 +4,12 @@ import ( "testing" "time" - "github.com/okex/okchain/x/common" + "github.com/okex/okexchain/x/common" "github.com/stretchr/testify/require" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/dex/types" + "github.com/okex/okexchain/x/dex/types" ) const TestProductNotExist = "product-not-exist" diff --git a/x/dex/keeper/product_lock.go b/x/dex/keeper/product_lock.go index d29810099e..d6afdc4462 100644 --- a/x/dex/keeper/product_lock.go +++ b/x/dex/keeper/product_lock.go @@ -2,8 +2,8 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/dex/types" - ordertypes "github.com/okex/okchain/x/order/types" + "github.com/okex/okexchain/x/dex/types" + ordertypes "github.com/okex/okexchain/x/order/types" ) // IsTokenPairLocked return true if token pair locked diff --git a/x/dex/keeper/product_lock_test.go b/x/dex/keeper/product_lock_test.go index 82b819e2e4..de0c6c845c 100644 --- a/x/dex/keeper/product_lock_test.go +++ b/x/dex/keeper/product_lock_test.go @@ -3,7 +3,7 @@ package keeper import ( "testing" - "github.com/okex/okchain/x/order/types" + "github.com/okex/okexchain/x/order/types" "github.com/stretchr/testify/require" ) diff --git a/x/dex/keeper/proposal.go b/x/dex/keeper/proposal.go index dd0d4d1b8b..892eed3146 100644 --- a/x/dex/keeper/proposal.go +++ b/x/dex/keeper/proposal.go @@ -5,10 +5,10 @@ import ( "time" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/common" - "github.com/okex/okchain/x/dex/types" - "github.com/okex/okchain/x/gov" - govTypes "github.com/okex/okchain/x/gov/types" + "github.com/okex/okexchain/x/common" + "github.com/okex/okexchain/x/dex/types" + "github.com/okex/okexchain/x/gov" + govTypes "github.com/okex/okexchain/x/gov/types" ) // GetMinDeposit returns min deposit diff --git a/x/dex/keeper/proposal_test.go b/x/dex/keeper/proposal_test.go index 058cde0bea..c550cc9fe0 100644 --- a/x/dex/keeper/proposal_test.go +++ b/x/dex/keeper/proposal_test.go @@ -5,10 +5,10 @@ import ( "time" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/common" - "github.com/okex/okchain/x/dex/types" - govTypes "github.com/okex/okchain/x/gov/types" - ordertypes "github.com/okex/okchain/x/order/types" + "github.com/okex/okexchain/x/common" + "github.com/okex/okexchain/x/dex/types" + govTypes "github.com/okex/okexchain/x/gov/types" + ordertypes "github.com/okex/okexchain/x/order/types" "github.com/stretchr/testify/require" ) diff --git a/x/dex/keeper/querier.go b/x/dex/keeper/querier.go index bb5957807a..cb1c2bb5bf 100644 --- a/x/dex/keeper/querier.go +++ b/x/dex/keeper/querier.go @@ -6,11 +6,11 @@ import ( "sort" "strings" - "github.com/okex/okchain/x/dex/types" + "github.com/okex/okexchain/x/dex/types" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/common" + "github.com/okex/okexchain/x/common" abci "github.com/tendermint/tendermint/abci/types" ) diff --git a/x/dex/keeper/querier_test.go b/x/dex/keeper/querier_test.go index b126878483..4b7ec00b4b 100644 --- a/x/dex/keeper/querier_test.go +++ b/x/dex/keeper/querier_test.go @@ -4,10 +4,10 @@ import ( "testing" "time" - "github.com/okex/okchain/x/common" + "github.com/okex/okexchain/x/common" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/dex/types" + "github.com/okex/okexchain/x/dex/types" "github.com/stretchr/testify/require" amino "github.com/tendermint/go-amino" abci "github.com/tendermint/tendermint/abci/types" diff --git a/x/dex/keeper/test_common.go b/x/dex/keeper/test_common.go index 2ce2d70f17..b5048f4d89 100644 --- a/x/dex/keeper/test_common.go +++ b/x/dex/keeper/test_common.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/okex/okchain/x/staking" + "github.com/okex/okexchain/x/staking" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/store" @@ -14,17 +14,17 @@ import ( "github.com/cosmos/cosmos-sdk/x/auth" "github.com/cosmos/cosmos-sdk/x/bank" "github.com/cosmos/cosmos-sdk/x/supply" - "github.com/okex/okchain/x/params" + "github.com/okex/okexchain/x/params" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/crypto/ed25519" "github.com/tendermint/tendermint/libs/log" dbm "github.com/tendermint/tm-db" - "github.com/okex/okchain/x/common" - "github.com/okex/okchain/x/dex/types" - "github.com/okex/okchain/x/gov" - "github.com/okex/okchain/x/token" + "github.com/okex/okexchain/x/common" + "github.com/okex/okexchain/x/dex/types" + "github.com/okex/okexchain/x/gov" + "github.com/okex/okexchain/x/token" ) type testInput struct { diff --git a/x/dex/legacy/v0_11/migrate.go b/x/dex/legacy/v0_11/migrate.go index 5a29f5c02e..ec2f9b4c67 100644 --- a/x/dex/legacy/v0_11/migrate.go +++ b/x/dex/legacy/v0_11/migrate.go @@ -2,8 +2,8 @@ package v0_11 import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/common" - "github.com/okex/okchain/x/dex/legacy/v0_10" + "github.com/okex/okexchain/x/common" + "github.com/okex/okexchain/x/dex/legacy/v0_10" ) func Migrate(oldGenState v0_10.GenesisState) GenesisState { diff --git a/x/dex/legacy/v0_11/types.go b/x/dex/legacy/v0_11/types.go index 4dbf1652c2..8185345c6f 100644 --- a/x/dex/legacy/v0_11/types.go +++ b/x/dex/legacy/v0_11/types.go @@ -3,7 +3,7 @@ package v0_11 import ( "time" - "github.com/okex/okchain/x/dex/legacy/v0_10" + "github.com/okex/okexchain/x/dex/legacy/v0_10" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/dex/mock.go b/x/dex/mock.go index 6850a38a59..b9979ad6f1 100644 --- a/x/dex/mock.go +++ b/x/dex/mock.go @@ -8,8 +8,8 @@ import ( "github.com/cosmos/cosmos-sdk/x/mock" "github.com/cosmos/cosmos-sdk/x/supply" "github.com/cosmos/cosmos-sdk/x/supply/exported" - "github.com/okex/okchain/x/common" - ordertypes "github.com/okex/okchain/x/order/types" + "github.com/okex/okexchain/x/common" + ordertypes "github.com/okex/okexchain/x/order/types" abci "github.com/tendermint/tendermint/abci/types" ) diff --git a/x/dex/module.go b/x/dex/module.go index 6d6e703044..b05a683986 100644 --- a/x/dex/module.go +++ b/x/dex/module.go @@ -3,10 +3,10 @@ package dex import ( "encoding/json" - "github.com/okex/okchain/x/dex/keeper" + "github.com/okex/okexchain/x/dex/keeper" "github.com/cosmos/cosmos-sdk/codec" - "github.com/okex/okchain/x/dex/types" + "github.com/okex/okexchain/x/dex/types" abci "github.com/tendermint/tendermint/abci/types" "github.com/cosmos/cosmos-sdk/client/context" @@ -15,8 +15,8 @@ import ( "github.com/gorilla/mux" "github.com/spf13/cobra" - "github.com/okex/okchain/x/dex/client/cli" - "github.com/okex/okchain/x/dex/client/rest" + "github.com/okex/okexchain/x/dex/client/cli" + "github.com/okex/okexchain/x/dex/client/rest" ) var ( diff --git a/x/dex/module_test.go b/x/dex/module_test.go index 2e6d277f19..ce73a3f679 100644 --- a/x/dex/module_test.go +++ b/x/dex/module_test.go @@ -7,8 +7,8 @@ import ( "testing" "github.com/cosmos/cosmos-sdk/codec" - "github.com/okex/okchain/x/common/version" - "github.com/okex/okchain/x/dex/types" + "github.com/okex/okexchain/x/common/version" + "github.com/okex/okexchain/x/dex/types" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" ) diff --git a/x/dex/proposal_handler.go b/x/dex/proposal_handler.go index ff8f68fe23..f1e9a9baf0 100644 --- a/x/dex/proposal_handler.go +++ b/x/dex/proposal_handler.go @@ -4,8 +4,8 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/dex/types" - govTypes "github.com/okex/okchain/x/gov/types" + "github.com/okex/okexchain/x/dex/types" + govTypes "github.com/okex/okexchain/x/gov/types" ) // NewProposalHandler handles "gov" type message in "dex" diff --git a/x/dex/proposal_handler_test.go b/x/dex/proposal_handler_test.go index e03e3fb113..0d9aa4a8af 100644 --- a/x/dex/proposal_handler_test.go +++ b/x/dex/proposal_handler_test.go @@ -5,9 +5,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/dex/types" - govTypes "github.com/okex/okchain/x/gov/types" - ordertypes "github.com/okex/okchain/x/order/types" + "github.com/okex/okexchain/x/dex/types" + govTypes "github.com/okex/okexchain/x/gov/types" + ordertypes "github.com/okex/okexchain/x/order/types" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" ) diff --git a/x/dex/types/codec.go b/x/dex/types/codec.go index e407d076f8..36f52a6753 100644 --- a/x/dex/types/codec.go +++ b/x/dex/types/codec.go @@ -4,13 +4,13 @@ import "github.com/cosmos/cosmos-sdk/codec" // RegisterCodec registers concrete types on the Amino codec func RegisterCodec(cdc *codec.Codec) { - cdc.RegisterConcrete(MsgList{}, "okchain/dex/MsgList", nil) - cdc.RegisterConcrete(MsgDeposit{}, "okchain/dex/MsgDeposit", nil) - cdc.RegisterConcrete(MsgWithdraw{}, "okchain/dex/MsgWithdraw", nil) - cdc.RegisterConcrete(MsgTransferOwnership{}, "okchain/dex/MsgTransferTradingPairOwnership", nil) - cdc.RegisterConcrete(DelistProposal{}, "okchain/dex/DelistProposal", nil) - cdc.RegisterConcrete(MsgCreateOperator{}, "okchain/dex/CreateOperator", nil) - cdc.RegisterConcrete(MsgUpdateOperator{}, "okchain/dex/UpdateOperator", nil) + cdc.RegisterConcrete(MsgList{}, "okexchain/dex/MsgList", nil) + cdc.RegisterConcrete(MsgDeposit{}, "okexchain/dex/MsgDeposit", nil) + cdc.RegisterConcrete(MsgWithdraw{}, "okexchain/dex/MsgWithdraw", nil) + cdc.RegisterConcrete(MsgTransferOwnership{}, "okexchain/dex/MsgTransferTradingPairOwnership", nil) + cdc.RegisterConcrete(DelistProposal{}, "okexchain/dex/DelistProposal", nil) + cdc.RegisterConcrete(MsgCreateOperator{}, "okexchain/dex/CreateOperator", nil) + cdc.RegisterConcrete(MsgUpdateOperator{}, "okexchain/dex/UpdateOperator", nil) } // ModuleCdc represents generic sealed codec to be used throughout this module diff --git a/x/dex/types/const.go b/x/dex/types/const.go index ff9eacfbff..26f75ee71e 100644 --- a/x/dex/types/const.go +++ b/x/dex/types/const.go @@ -2,5 +2,5 @@ package types const ( // TestTokenPairOwner defines owner of token pair, just for test - TestTokenPairOwner = "okchain10q0rk5qnyag7wfvvt7rtphlw589m7frsmyq4ya" + TestTokenPairOwner = "okexchain10q0rk5qnyag7wfvvt7rtphlw589m7frsku8qc9" ) diff --git a/x/dex/types/msgs_test.go b/x/dex/types/msgs_test.go index 97b5a3f48b..4619c46c73 100644 --- a/x/dex/types/msgs_test.go +++ b/x/dex/types/msgs_test.go @@ -9,7 +9,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/auth" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/common" + "github.com/okex/okexchain/x/common" "github.com/stretchr/testify/require" ) diff --git a/x/dex/types/params.go b/x/dex/types/params.go index e9f9d63343..6ea71ffeb2 100644 --- a/x/dex/types/params.go +++ b/x/dex/types/params.go @@ -6,8 +6,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/params/subspace" - "github.com/okex/okchain/x/common" - "github.com/okex/okchain/x/params" + "github.com/okex/okexchain/x/common" + "github.com/okex/okexchain/x/params" ) var ( diff --git a/x/dex/types/proposal.go b/x/dex/types/proposal.go index 517c30552f..c14ef13334 100644 --- a/x/dex/types/proposal.go +++ b/x/dex/types/proposal.go @@ -5,7 +5,7 @@ import ( "strings" sdk "github.com/cosmos/cosmos-sdk/types" - govtypes "github.com/okex/okchain/x/gov/types" + govtypes "github.com/okex/okexchain/x/gov/types" ) const ( @@ -14,7 +14,7 @@ const ( func init() { govtypes.RegisterProposalType(proposalTypeDelist) - govtypes.RegisterProposalTypeCodec(DelistProposal{}, "okchain/dex/DelistProposal") + govtypes.RegisterProposalTypeCodec(DelistProposal{}, "okexchain/dex/DelistProposal") } diff --git a/x/distribution/abci.go b/x/distribution/abci.go index 323f58e8fa..af799681fc 100644 --- a/x/distribution/abci.go +++ b/x/distribution/abci.go @@ -5,7 +5,7 @@ import ( tmtypes "github.com/tendermint/tendermint/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/distribution/keeper" + "github.com/okex/okexchain/x/distribution/keeper" ) // BeginBlocker set the proposer for determining distribution during endblock @@ -22,7 +22,7 @@ func BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock, k keeper.Keeper) if ctx.BlockHeight() > tmtypes.GetStartBlockHeight()+1 { previousProposer := k.GetPreviousProposerConsAddr(ctx) - /* allocate tokens by okchain custom rule */ + /* allocate tokens by okexchain custom rule */ k.AllocateTokens(ctx, previousTotalPower, previousProposer, req.LastCommitInfo.GetVotes()) } diff --git a/x/distribution/abci_test.go b/x/distribution/abci_test.go index cee66f6fa6..c717ec7297 100644 --- a/x/distribution/abci_test.go +++ b/x/distribution/abci_test.go @@ -3,7 +3,7 @@ package distribution import ( "testing" - "github.com/okex/okchain/x/distribution/keeper" + "github.com/okex/okexchain/x/distribution/keeper" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" ) diff --git a/x/distribution/alias.go b/x/distribution/alias.go index 1cdbf9815d..8b1dc807a4 100644 --- a/x/distribution/alias.go +++ b/x/distribution/alias.go @@ -1,15 +1,15 @@ // nolint // autogenerated code using github.com/rigelrozanski/multitool // aliases generated for the following subdirectories: -// ALIASGEN: github.com/okex/okchain/x/distribution/keeper -// ALIASGEN: github.com/okex/okchain/x/distribution/types -// ALIASGEN: github.com/okex/okchain/x/distribution/client +// ALIASGEN: github.com/okex/okexchain/x/distribution/keeper +// ALIASGEN: github.com/okex/okexchain/x/distribution/types +// ALIASGEN: github.com/okex/okexchain/x/distribution/client package distribution import ( - "github.com/okex/okchain/x/distribution/client" - "github.com/okex/okchain/x/distribution/keeper" - "github.com/okex/okchain/x/distribution/types" + "github.com/okex/okexchain/x/distribution/client" + "github.com/okex/okexchain/x/distribution/keeper" + "github.com/okex/okexchain/x/distribution/types" ) const ( diff --git a/x/distribution/client/cli/query.go b/x/distribution/client/cli/query.go index b30a56f22d..cf76f4f07d 100644 --- a/x/distribution/client/cli/query.go +++ b/x/distribution/client/cli/query.go @@ -11,8 +11,8 @@ import ( "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/version" - "github.com/okex/okchain/x/distribution/client/common" - "github.com/okex/okchain/x/distribution/types" + "github.com/okex/okexchain/x/distribution/client/common" + "github.com/okex/okexchain/x/distribution/types" ) // GetQueryCmd returns the cli query commands for this module @@ -62,7 +62,7 @@ func GetCmdQueryValidatorCommission(queryRoute string, cdc *codec.Codec) *cobra. fmt.Sprintf(`Query available rewards by a specified validator address. Example: -$ %s query distr commission okchainvaloper1alq9na49n9yycysh889rl90g9nhe58lcs50wu5 +$ %s query distr commission okexchainvaloper1alq9na49n9yycysh889rl90g9nhe58lcs50wu5 `, version.ClientName, ), diff --git a/x/distribution/client/cli/tx.go b/x/distribution/client/cli/tx.go index 7ee359a939..be0b84fa75 100644 --- a/x/distribution/client/cli/tx.go +++ b/x/distribution/client/cli/tx.go @@ -12,8 +12,8 @@ import ( "github.com/cosmos/cosmos-sdk/version" "github.com/cosmos/cosmos-sdk/x/auth" "github.com/cosmos/cosmos-sdk/x/auth/client/utils" - "github.com/okex/okchain/x/distribution/types" - "github.com/okex/okchain/x/gov" + "github.com/okex/okexchain/x/distribution/types" + "github.com/okex/okexchain/x/gov" "github.com/spf13/cobra" ) @@ -44,7 +44,7 @@ func GetCmdSetWithdrawAddr(cdc *codec.Codec) *cobra.Command { fmt.Sprintf(`Set the withdraw address for rewards associated with a delegator address. Example: -$ %s tx distr set-withdraw-addr okchain1hw4r48aww06ldrfeuq2v438ujnl6alszzzqpph --from mykey +$ %s tx distr set-withdraw-addr okexchain1hw4r48aww06ldrfeuq2v438ujnl6alszzzqpph --from mykey `, version.ClientName, ), @@ -75,7 +75,7 @@ func GetCmdWithdrawRewards(cdc *codec.Codec) *cobra.Command { Long: strings.TrimSpace( fmt.Sprintf(` Example: -$ %s tx distr withdraw-rewards okchainvaloper1alq9na49n9yycysh889rl90g9nhe58lcs50wu5 --from mykey +$ %s tx distr withdraw-rewards okexchainvaloper1alq9na49n9yycysh889rl90g9nhe58lcs50wu5 --from mykey `, version.ClientName, ), @@ -117,7 +117,7 @@ Where proposal.json contains: { "title": "Community Pool Spend", "description": "Pay me some %s!", - "recipient": "okchain5afhd6gxevu37mkqcvvsj8qeylhn0rz46zdlq", + "recipient": "okexchain5afhd6gxevu37mkqcvvsj8qeylhn0rz46zdlq", "amount": [ { "denom": %s, diff --git a/x/distribution/client/common/common.go b/x/distribution/client/common/common.go index da158e33ff..0b97caf8cb 100644 --- a/x/distribution/client/common/common.go +++ b/x/distribution/client/common/common.go @@ -5,7 +5,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/context" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/distribution/types" + "github.com/okex/okexchain/x/distribution/types" ) // QueryParams actually queries distribution params diff --git a/x/distribution/client/proposal_handler.go b/x/distribution/client/proposal_handler.go index 03c1ef20a8..24f1b5efe2 100644 --- a/x/distribution/client/proposal_handler.go +++ b/x/distribution/client/proposal_handler.go @@ -1,9 +1,9 @@ package client import ( - "github.com/okex/okchain/x/distribution/client/cli" - "github.com/okex/okchain/x/distribution/client/rest" - govclient "github.com/okex/okchain/x/gov/client" + "github.com/okex/okexchain/x/distribution/client/cli" + "github.com/okex/okexchain/x/distribution/client/rest" + govclient "github.com/okex/okexchain/x/gov/client" ) // param change proposal handler diff --git a/x/distribution/client/rest/query.go b/x/distribution/client/rest/query.go index 5cb4def81d..2b0f5684c7 100644 --- a/x/distribution/client/rest/query.go +++ b/x/distribution/client/rest/query.go @@ -7,8 +7,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/gorilla/mux" - "github.com/okex/okchain/x/distribution/client/common" - "github.com/okex/okchain/x/distribution/types" + "github.com/okex/okexchain/x/distribution/client/common" + "github.com/okex/okexchain/x/distribution/types" "github.com/cosmos/cosmos-sdk/client/context" "github.com/cosmos/cosmos-sdk/types/rest" diff --git a/x/distribution/client/rest/rest.go b/x/distribution/client/rest/rest.go index d6c9559b84..e8ce203a3f 100644 --- a/x/distribution/client/rest/rest.go +++ b/x/distribution/client/rest/rest.go @@ -8,9 +8,9 @@ import ( "github.com/cosmos/cosmos-sdk/types/rest" "github.com/cosmos/cosmos-sdk/x/auth/client/utils" "github.com/gorilla/mux" - "github.com/okex/okchain/x/distribution/types" - "github.com/okex/okchain/x/gov" - govrest "github.com/okex/okchain/x/gov/client/rest" + "github.com/okex/okexchain/x/distribution/types" + "github.com/okex/okexchain/x/gov" + govrest "github.com/okex/okexchain/x/gov/client/rest" ) // RegisterRoutes register distribution REST routes. diff --git a/x/distribution/client/rest/tx.go b/x/distribution/client/rest/tx.go index 60122abb7c..28f46b4366 100644 --- a/x/distribution/client/rest/tx.go +++ b/x/distribution/client/rest/tx.go @@ -8,8 +8,8 @@ import ( "github.com/cosmos/cosmos-sdk/client/context" "github.com/cosmos/cosmos-sdk/x/auth/client/utils" - "github.com/okex/okchain/x/distribution/client/common" - "github.com/okex/okchain/x/distribution/types" + "github.com/okex/okexchain/x/distribution/client/common" + "github.com/okex/okexchain/x/distribution/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/rest" diff --git a/x/distribution/genesis.go b/x/distribution/genesis.go index 892573d451..0d61ac06cc 100644 --- a/x/distribution/genesis.go +++ b/x/distribution/genesis.go @@ -4,7 +4,7 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/distribution/types" + "github.com/okex/okexchain/x/distribution/types" ) // InitGenesis sets distribution information for genesis diff --git a/x/distribution/genesis_test.go b/x/distribution/genesis_test.go index f133b49bb7..e4105bde3c 100644 --- a/x/distribution/genesis_test.go +++ b/x/distribution/genesis_test.go @@ -4,7 +4,7 @@ import ( "testing" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/distribution/keeper" + "github.com/okex/okexchain/x/distribution/keeper" "github.com/stretchr/testify/require" ) diff --git a/x/distribution/handler.go b/x/distribution/handler.go index 91a9876dd8..36eb181268 100644 --- a/x/distribution/handler.go +++ b/x/distribution/handler.go @@ -4,9 +4,9 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/distribution/keeper" - "github.com/okex/okchain/x/distribution/types" - govtypes "github.com/okex/okchain/x/gov/types" + "github.com/okex/okexchain/x/distribution/keeper" + "github.com/okex/okexchain/x/distribution/types" + govtypes "github.com/okex/okexchain/x/gov/types" ) // NewHandler manages all distribution tx diff --git a/x/distribution/keeper/alias.go b/x/distribution/keeper/alias.go index 6f19101f1e..63656b1b81 100644 --- a/x/distribution/keeper/alias.go +++ b/x/distribution/keeper/alias.go @@ -3,7 +3,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/supply/exported" - "github.com/okex/okchain/x/distribution/types" + "github.com/okex/okexchain/x/distribution/types" ) // GetDistributionAccount returns the distribution ModuleAccount diff --git a/x/distribution/keeper/allocation.go b/x/distribution/keeper/allocation.go index d62c340591..9d2711a10a 100644 --- a/x/distribution/keeper/allocation.go +++ b/x/distribution/keeper/allocation.go @@ -4,9 +4,9 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/distribution/types" - "github.com/okex/okchain/x/staking/exported" - stakingexported "github.com/okex/okchain/x/staking/exported" + "github.com/okex/okexchain/x/distribution/types" + "github.com/okex/okexchain/x/staking/exported" + stakingexported "github.com/okex/okexchain/x/staking/exported" abci "github.com/tendermint/tendermint/abci/types" ) diff --git a/x/distribution/keeper/allocation_test.go b/x/distribution/keeper/allocation_test.go index b1c0261394..989d07441c 100644 --- a/x/distribution/keeper/allocation_test.go +++ b/x/distribution/keeper/allocation_test.go @@ -5,8 +5,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/auth" - "github.com/okex/okchain/x/distribution/types" - "github.com/okex/okchain/x/staking" + "github.com/okex/okexchain/x/distribution/types" + "github.com/okex/okexchain/x/staking" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" ) diff --git a/x/distribution/keeper/hooks.go b/x/distribution/keeper/hooks.go index 173fd44c7f..42c4cf7dff 100644 --- a/x/distribution/keeper/hooks.go +++ b/x/distribution/keeper/hooks.go @@ -2,8 +2,8 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/distribution/types" - stakingtypes "github.com/okex/okchain/x/staking/types" + "github.com/okex/okexchain/x/distribution/types" + stakingtypes "github.com/okex/okexchain/x/staking/types" ) // Hooks is struct of keepers from other module diff --git a/x/distribution/keeper/hooks_test.go b/x/distribution/keeper/hooks_test.go index 2745c76c81..f206f0ba0b 100644 --- a/x/distribution/keeper/hooks_test.go +++ b/x/distribution/keeper/hooks_test.go @@ -3,7 +3,7 @@ package keeper import ( "testing" - "github.com/okex/okchain/x/distribution/types" + "github.com/okex/okexchain/x/distribution/types" "github.com/stretchr/testify/require" ) diff --git a/x/distribution/keeper/invariants.go b/x/distribution/keeper/invariants.go index dc7a6ece08..df68cf3e25 100644 --- a/x/distribution/keeper/invariants.go +++ b/x/distribution/keeper/invariants.go @@ -4,8 +4,8 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/distribution/types" - "github.com/okex/okchain/x/staking/exported" + "github.com/okex/okexchain/x/distribution/types" + "github.com/okex/okexchain/x/staking/exported" ) // RegisterInvariants registers all distribution invariants diff --git a/x/distribution/keeper/invariants_test.go b/x/distribution/keeper/invariants_test.go index e4cf4d6cce..5ee8b313c4 100644 --- a/x/distribution/keeper/invariants_test.go +++ b/x/distribution/keeper/invariants_test.go @@ -4,7 +4,7 @@ import ( "testing" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/distribution/types" + "github.com/okex/okexchain/x/distribution/types" "github.com/stretchr/testify/require" ) diff --git a/x/distribution/keeper/keeper.go b/x/distribution/keeper/keeper.go index 3b759b3b12..ef9ce2641d 100644 --- a/x/distribution/keeper/keeper.go +++ b/x/distribution/keeper/keeper.go @@ -6,7 +6,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/params" - "github.com/okex/okchain/x/distribution/types" + "github.com/okex/okexchain/x/distribution/types" "github.com/tendermint/tendermint/libs/log" ) diff --git a/x/distribution/keeper/key.go b/x/distribution/keeper/key.go index 033cce56a0..969e06e1c8 100644 --- a/x/distribution/keeper/key.go +++ b/x/distribution/keeper/key.go @@ -2,7 +2,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/distribution/types" + "github.com/okex/okexchain/x/distribution/types" ) const ( diff --git a/x/distribution/keeper/proposal_handler.go b/x/distribution/keeper/proposal_handler.go index 28db8bf14c..ce06c21b14 100644 --- a/x/distribution/keeper/proposal_handler.go +++ b/x/distribution/keeper/proposal_handler.go @@ -4,7 +4,7 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/distribution/types" + "github.com/okex/okexchain/x/distribution/types" ) // HandleCommunityPoolSpendProposal is a handler for executing a passed community spend proposal diff --git a/x/distribution/keeper/querier.go b/x/distribution/keeper/querier.go index 09bd0013af..37e1739cc8 100644 --- a/x/distribution/keeper/querier.go +++ b/x/distribution/keeper/querier.go @@ -7,7 +7,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/distribution/types" + "github.com/okex/okexchain/x/distribution/types" ) // NewQuerier creates a querier for distribution REST endpoints diff --git a/x/distribution/keeper/querier_test.go b/x/distribution/keeper/querier_test.go index 75c063f8cb..9df0a599a8 100644 --- a/x/distribution/keeper/querier_test.go +++ b/x/distribution/keeper/querier_test.go @@ -4,7 +4,7 @@ import ( "testing" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/distribution/types" + "github.com/okex/okexchain/x/distribution/types" "github.com/stretchr/testify/require" "github.com/tendermint/go-amino" abci "github.com/tendermint/tendermint/abci/types" diff --git a/x/distribution/keeper/store.go b/x/distribution/keeper/store.go index 1558cc3d26..05e7851376 100644 --- a/x/distribution/keeper/store.go +++ b/x/distribution/keeper/store.go @@ -2,7 +2,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/distribution/types" + "github.com/okex/okexchain/x/distribution/types" ) // GetDelegatorWithdrawAddr returns the delegator withdraw address, defaulting to the delegator address diff --git a/x/distribution/keeper/test_common.go b/x/distribution/keeper/test_common.go index 4683192a95..f0ef6d3b4c 100644 --- a/x/distribution/keeper/test_common.go +++ b/x/distribution/keeper/test_common.go @@ -18,9 +18,9 @@ import ( "github.com/cosmos/cosmos-sdk/x/bank" "github.com/cosmos/cosmos-sdk/x/params" "github.com/cosmos/cosmos-sdk/x/supply" - "github.com/okex/okchain/x/staking" + "github.com/okex/okexchain/x/staking" - "github.com/okex/okchain/x/distribution/types" + "github.com/okex/okexchain/x/distribution/types" ) //nolint: deadcode unused diff --git a/x/distribution/keeper/validator.go b/x/distribution/keeper/validator.go index c246ed9323..7491a7a027 100644 --- a/x/distribution/keeper/validator.go +++ b/x/distribution/keeper/validator.go @@ -3,8 +3,8 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/distribution/types" - "github.com/okex/okchain/x/staking/exported" + "github.com/okex/okexchain/x/distribution/types" + "github.com/okex/okexchain/x/staking/exported" ) // initialize rewards for a new validator diff --git a/x/distribution/module.go b/x/distribution/module.go index 679dd83b78..bfd61e56f6 100644 --- a/x/distribution/module.go +++ b/x/distribution/module.go @@ -12,9 +12,9 @@ import ( "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" - "github.com/okex/okchain/x/distribution/client/cli" - "github.com/okex/okchain/x/distribution/client/rest" - "github.com/okex/okchain/x/distribution/types" + "github.com/okex/okexchain/x/distribution/client/cli" + "github.com/okex/okexchain/x/distribution/client/rest" + "github.com/okex/okexchain/x/distribution/types" ) var ( diff --git a/x/distribution/module_test.go b/x/distribution/module_test.go index 0c3341f365..c3e153dab3 100644 --- a/x/distribution/module_test.go +++ b/x/distribution/module_test.go @@ -4,8 +4,8 @@ import ( "testing" "github.com/cosmos/cosmos-sdk/codec" - "github.com/okex/okchain/x/distribution/keeper" - "github.com/okex/okchain/x/distribution/types" + "github.com/okex/okexchain/x/distribution/keeper" + "github.com/okex/okexchain/x/distribution/types" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" ) diff --git a/x/distribution/proposal_handler_test.go b/x/distribution/proposal_handler_test.go index 4b0620be3f..c40aa31768 100644 --- a/x/distribution/proposal_handler_test.go +++ b/x/distribution/proposal_handler_test.go @@ -4,9 +4,9 @@ import ( "testing" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/distribution/keeper" - "github.com/okex/okchain/x/distribution/types" - govtypes "github.com/okex/okchain/x/gov/types" + "github.com/okex/okexchain/x/distribution/keeper" + "github.com/okex/okexchain/x/distribution/types" + govtypes "github.com/okex/okexchain/x/gov/types" "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/crypto/ed25519" ) diff --git a/x/distribution/types/codec.go b/x/distribution/types/codec.go index b48671c11d..f26d240eb1 100644 --- a/x/distribution/types/codec.go +++ b/x/distribution/types/codec.go @@ -6,9 +6,9 @@ import ( // RegisterCodec registers concrete types on codec codec func RegisterCodec(cdc *codec.Codec) { - cdc.RegisterConcrete(MsgWithdrawValidatorCommission{}, "okchain/distribution/MsgWithdrawReward", nil) - cdc.RegisterConcrete(MsgSetWithdrawAddress{}, "okchain/distribution/MsgModifyWithdrawAddress", nil) - cdc.RegisterConcrete(CommunityPoolSpendProposal{}, "okchain/distribution/CommunityPoolSpendProposal", nil) + cdc.RegisterConcrete(MsgWithdrawValidatorCommission{}, "okexchain/distribution/MsgWithdrawReward", nil) + cdc.RegisterConcrete(MsgSetWithdrawAddress{}, "okexchain/distribution/MsgModifyWithdrawAddress", nil) + cdc.RegisterConcrete(CommunityPoolSpendProposal{}, "okexchain/distribution/CommunityPoolSpendProposal", nil) } // ModuleCdc generic sealed codec to be used throughout module diff --git a/x/distribution/types/expected_keepers.go b/x/distribution/types/expected_keepers.go index f3b42b7914..3dfcb0f73e 100644 --- a/x/distribution/types/expected_keepers.go +++ b/x/distribution/types/expected_keepers.go @@ -3,7 +3,7 @@ package types import ( sdk "github.com/cosmos/cosmos-sdk/types" supplyexported "github.com/cosmos/cosmos-sdk/x/supply/exported" - stakingexported "github.com/okex/okchain/x/staking/exported" + stakingexported "github.com/okex/okexchain/x/staking/exported" ) // StakingKeeper expected staking keeper (noalias) diff --git a/x/distribution/types/keys.go b/x/distribution/types/keys.go index 10565c09a5..4540e2ef9f 100644 --- a/x/distribution/types/keys.go +++ b/x/distribution/types/keys.go @@ -13,6 +13,6 @@ const ( // QuerierRoute is the querier route for distribution QuerierRoute = ModuleName - // ShortUseByCli added for okchaincli + // ShortUseByCli added for okexchaincli ShortUseByCli = "distr" ) diff --git a/x/distribution/types/proposal.go b/x/distribution/types/proposal.go index 0454c6ba67..e103b7dbdb 100644 --- a/x/distribution/types/proposal.go +++ b/x/distribution/types/proposal.go @@ -5,7 +5,7 @@ import ( "strings" sdk "github.com/cosmos/cosmos-sdk/types" - govtypes "github.com/okex/okchain/x/gov/types" + govtypes "github.com/okex/okexchain/x/gov/types" ) const ( @@ -18,7 +18,7 @@ var _ govtypes.Content = CommunityPoolSpendProposal{} func init() { govtypes.RegisterProposalType(ProposalTypeCommunityPoolSpend) - govtypes.RegisterProposalTypeCodec(CommunityPoolSpendProposal{}, "okchain/distribution/CommunityPoolSpendProposal") + govtypes.RegisterProposalTypeCodec(CommunityPoolSpendProposal{}, "okexchain/distribution/CommunityPoolSpendProposal") } // CommunityPoolSpendProposal spends from the community pool diff --git a/x/genutil/alias.go b/x/genutil/alias.go index dd560640d9..5cdefc7b45 100644 --- a/x/genutil/alias.go +++ b/x/genutil/alias.go @@ -1,7 +1,7 @@ package genutil import ( - "github.com/okex/okchain/x/genutil/types" + "github.com/okex/okexchain/x/genutil/types" sdkgenutil "github.com/cosmos/cosmos-sdk/x/genutil" sdkgenutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" diff --git a/x/genutil/client/cli/collect.go b/x/genutil/client/cli/collect.go index 3b30cab3cc..bf64dcc1e3 100644 --- a/x/genutil/client/cli/collect.go +++ b/x/genutil/client/cli/collect.go @@ -12,7 +12,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/server" - "github.com/okex/okchain/x/genutil" + "github.com/okex/okexchain/x/genutil" ) const flagGenTxDir = "gentx-dir" diff --git a/x/genutil/client/cli/gentx.go b/x/genutil/client/cli/gentx.go index a0d9b5d388..7eea6972ce 100644 --- a/x/genutil/client/cli/gentx.go +++ b/x/genutil/client/cli/gentx.go @@ -9,7 +9,7 @@ import ( "os" "path/filepath" - "github.com/okex/okchain/x/genutil" + "github.com/okex/okexchain/x/genutil" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" diff --git a/x/genutil/client/cli/migrate.go b/x/genutil/client/cli/migrate.go index a4d151ca54..5f3e9de126 100644 --- a/x/genutil/client/cli/migrate.go +++ b/x/genutil/client/cli/migrate.go @@ -12,7 +12,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/version" extypes "github.com/cosmos/cosmos-sdk/x/genutil" - v011 "github.com/okex/okchain/x/genutil/legacy/v0_11" + v011 "github.com/okex/okexchain/x/genutil/legacy/v0_11" ) var migrationMap = extypes.MigrationMap{ @@ -32,7 +32,7 @@ func MigrateGenesisCmd(_ *server.Context, cdc *codec.Codec) *cobra.Command { Long: fmt.Sprintf(`Migrate the source genesis into the target version and print to STDOUT. Example: -$ %s migrate v0.11 /path/to/genesis.json --chain-id=okchain --genesis-time=2019-04-22T17:00:00Z +$ %s migrate v0.11 /path/to/genesis.json --chain-id=okexchain --genesis-time=2019-04-22T17:00:00Z `, version.ServerName), Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) error { diff --git a/x/genutil/collect.go b/x/genutil/collect.go index c79293ad74..1617a27690 100644 --- a/x/genutil/collect.go +++ b/x/genutil/collect.go @@ -12,7 +12,7 @@ import ( "sort" "strings" - stakingtypes "github.com/okex/okchain/x/staking/types" + stakingtypes "github.com/okex/okexchain/x/staking/types" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/x/genutil/gentx.go b/x/genutil/gentx.go index bab61a97cb..fa6e7c15a4 100644 --- a/x/genutil/gentx.go +++ b/x/genutil/gentx.go @@ -13,7 +13,7 @@ import ( authexported "github.com/cosmos/cosmos-sdk/x/auth/exported" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/cosmos/cosmos-sdk/x/genutil/types" - stakingtypes "github.com/okex/okchain/x/staking/types" + stakingtypes "github.com/okex/okexchain/x/staking/types" ) // ValidateAccountInGenesis checks that the provided key has sufficient coins in the genesis accounts diff --git a/x/genutil/legacy/v0_11/migrate.go b/x/genutil/legacy/v0_11/migrate.go index e6693837e0..7cf4de27ae 100644 --- a/x/genutil/legacy/v0_11/migrate.go +++ b/x/genutil/legacy/v0_11/migrate.go @@ -3,14 +3,14 @@ package v0_11 import ( "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/x/genutil" - v010dex "github.com/okex/okchain/x/dex/legacy/v0_10" - v011dex "github.com/okex/okchain/x/dex/legacy/v0_11" - v010order "github.com/okex/okchain/x/order/legacy/v0_10" - v011order "github.com/okex/okchain/x/order/legacy/v0_11" - v010staking "github.com/okex/okchain/x/staking/legacy/v0_10" - v011staking "github.com/okex/okchain/x/staking/legacy/v0_11" - v010token "github.com/okex/okchain/x/token/legacy/v0_10" - v011token "github.com/okex/okchain/x/token/legacy/v0_11" + v010dex "github.com/okex/okexchain/x/dex/legacy/v0_10" + v011dex "github.com/okex/okexchain/x/dex/legacy/v0_11" + v010order "github.com/okex/okexchain/x/order/legacy/v0_10" + v011order "github.com/okex/okexchain/x/order/legacy/v0_11" + v010staking "github.com/okex/okexchain/x/staking/legacy/v0_10" + v011staking "github.com/okex/okexchain/x/staking/legacy/v0_11" + v010token "github.com/okex/okexchain/x/token/legacy/v0_10" + v011token "github.com/okex/okexchain/x/token/legacy/v0_11" ) // Migrate migrates exported state from v0.10.x to a v0.11.0 genesis state diff --git a/x/genutil/module.go b/x/genutil/module.go index 94521ee258..7e2b5be064 100644 --- a/x/genutil/module.go +++ b/x/genutil/module.go @@ -3,7 +3,7 @@ package genutil import ( "encoding/json" - "github.com/okex/okchain/x/genutil/types" + "github.com/okex/okexchain/x/genutil/types" "github.com/cosmos/cosmos-sdk/client/context" "github.com/cosmos/cosmos-sdk/codec" diff --git a/x/genutil/types/codec.go b/x/genutil/types/codec.go index 4136d91c6d..2f7a521e74 100644 --- a/x/genutil/types/codec.go +++ b/x/genutil/types/codec.go @@ -1,7 +1,7 @@ package types import ( - stakingtypes "github.com/okex/okchain/x/staking/types" + stakingtypes "github.com/okex/okexchain/x/staking/types" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/x/genutil/types/genesis_state.go b/x/genutil/types/genesis_state.go index 0afff674e4..c773b1136d 100644 --- a/x/genutil/types/genesis_state.go +++ b/x/genutil/types/genesis_state.go @@ -5,7 +5,7 @@ import ( "errors" "fmt" - stakingtypes "github.com/okex/okchain/x/staking/types" + stakingtypes "github.com/okex/okexchain/x/staking/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) diff --git a/x/gov/alias.go b/x/gov/alias.go index 5e636ae3eb..a93d7e8497 100644 --- a/x/gov/alias.go +++ b/x/gov/alias.go @@ -7,8 +7,8 @@ package gov import ( sdkGov "github.com/cosmos/cosmos-sdk/x/gov" - "github.com/okex/okchain/x/gov/keeper" - "github.com/okex/okchain/x/gov/types" + "github.com/okex/okexchain/x/gov/keeper" + "github.com/okex/okexchain/x/gov/types" ) const ( diff --git a/x/gov/client/cli/query.go b/x/gov/client/cli/query.go index 4a87cd6bda..7c69c4d2b5 100644 --- a/x/gov/client/cli/query.go +++ b/x/gov/client/cli/query.go @@ -14,7 +14,7 @@ import ( gcutils "github.com/cosmos/cosmos-sdk/x/gov/client/utils" "github.com/spf13/cobra" - "github.com/okex/okchain/x/gov/types" + "github.com/okex/okexchain/x/gov/types" ) // GetQueryCmd returns the cli query commands for this module @@ -54,7 +54,7 @@ func getCmdQueryVote(queryRoute string, cdc *codec.Codec) *cobra.Command { fmt.Sprintf(`Query details for a single vote on a proposal given its identifier. Example: -$ %s query gov vote 1 okchain1skjwj5whet0lpe65qaq4rpq03hjxlwd9nf39lk +$ %s query gov vote 1 okexchain1skjwj5whet0lpe65qaq4rpq03hjxlwd9nf39lk `, version.ClientName, ), @@ -172,7 +172,7 @@ func getCmdQueryDeposit(queryRoute string, cdc *codec.Codec) *cobra.Command { fmt.Sprintf(`Query details for a single proposal deposit on a proposal by its identifier. Example: -$ %s query gov deposit 1 okchain1skjwj5whet0lpe65qaq4rpq03hjxlwd9nf39lk +$ %s query gov deposit 1 okexchain1skjwj5whet0lpe65qaq4rpq03hjxlwd9nf39lk `, version.ClientName, ), diff --git a/x/gov/client/cli/tx.go b/x/gov/client/cli/tx.go index cdddd593b1..b26520cd01 100644 --- a/x/gov/client/cli/tx.go +++ b/x/gov/client/cli/tx.go @@ -15,7 +15,7 @@ import ( sdkGovCli "github.com/cosmos/cosmos-sdk/x/gov/client/cli" "github.com/spf13/cobra" - "github.com/okex/okchain/x/gov/types" + "github.com/okex/okexchain/x/gov/types" ) // Proposal flags diff --git a/x/gov/endblocker.go b/x/gov/endblocker.go index 6fc7056c0d..0aec5eb880 100644 --- a/x/gov/endblocker.go +++ b/x/gov/endblocker.go @@ -7,8 +7,8 @@ import ( "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/tendermint/tendermint/libs/log" - "github.com/okex/okchain/x/common/perf" - "github.com/okex/okchain/x/gov/keeper" + "github.com/okex/okexchain/x/common/perf" + "github.com/okex/okexchain/x/gov/keeper" ) // EndBlocker called every block, process inflation, update validator set. diff --git a/x/gov/endblocker_test.go b/x/gov/endblocker_test.go index 6915ec9301..fb582cfc0a 100644 --- a/x/gov/endblocker_test.go +++ b/x/gov/endblocker_test.go @@ -4,11 +4,11 @@ import ( "testing" "time" - "github.com/okex/okchain/x/gov/keeper" - "github.com/okex/okchain/x/gov/types" - "github.com/okex/okchain/x/params" - paramsTypes "github.com/okex/okchain/x/params/types" - "github.com/okex/okchain/x/staking" + "github.com/okex/okexchain/x/gov/keeper" + "github.com/okex/okexchain/x/gov/types" + "github.com/okex/okexchain/x/params" + paramsTypes "github.com/okex/okexchain/x/params/types" + "github.com/okex/okexchain/x/staking" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" diff --git a/x/gov/genesis.go b/x/gov/genesis.go index f630e46188..64a009db60 100644 --- a/x/gov/genesis.go +++ b/x/gov/genesis.go @@ -9,8 +9,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkGov "github.com/cosmos/cosmos-sdk/x/gov" - "github.com/okex/okchain/x/gov/keeper" - "github.com/okex/okchain/x/gov/types" + "github.com/okex/okexchain/x/gov/keeper" + "github.com/okex/okexchain/x/gov/types" ) // GenesisState - all staking state that must be provided at genesis diff --git a/x/gov/genesis_test.go b/x/gov/genesis_test.go index f8f84e9f72..69c222118a 100644 --- a/x/gov/genesis_test.go +++ b/x/gov/genesis_test.go @@ -7,8 +7,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "github.com/okex/okchain/x/gov/keeper" - "github.com/okex/okchain/x/gov/types" + "github.com/okex/okexchain/x/gov/keeper" + "github.com/okex/okexchain/x/gov/types" ) func TestInitGenesisState(t *testing.T) { diff --git a/x/gov/handler.go b/x/gov/handler.go index efb22f1f9c..68ad41ac99 100644 --- a/x/gov/handler.go +++ b/x/gov/handler.go @@ -5,9 +5,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/common" - "github.com/okex/okchain/x/gov/keeper" - "github.com/okex/okchain/x/gov/types" + "github.com/okex/okexchain/x/common" + "github.com/okex/okexchain/x/gov/keeper" + "github.com/okex/okexchain/x/gov/types" ) // NewHandler handle all "gov" type messages. diff --git a/x/gov/handler_test.go b/x/gov/handler_test.go index c0cf45e246..7905c90344 100644 --- a/x/gov/handler_test.go +++ b/x/gov/handler_test.go @@ -4,12 +4,12 @@ import ( "testing" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/staking" + "github.com/okex/okexchain/x/staking" "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/libs/cli/flags" - "github.com/okex/okchain/x/gov/keeper" - "github.com/okex/okchain/x/gov/types" + "github.com/okex/okexchain/x/gov/keeper" + "github.com/okex/okexchain/x/gov/types" ) func TestNewHandler(t *testing.T) { diff --git a/x/gov/invariants.go b/x/gov/invariants.go index 28b82b7520..7369b0653c 100644 --- a/x/gov/invariants.go +++ b/x/gov/invariants.go @@ -5,8 +5,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/gov/keeper" - "github.com/okex/okchain/x/gov/types" + "github.com/okex/okexchain/x/gov/keeper" + "github.com/okex/okexchain/x/gov/types" ) // RegisterInvariants registers all governance invariants diff --git a/x/gov/invariants_test.go b/x/gov/invariants_test.go index 2ef17453ac..b5db41e4b9 100644 --- a/x/gov/invariants_test.go +++ b/x/gov/invariants_test.go @@ -6,8 +6,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "github.com/okex/okchain/x/gov/keeper" - "github.com/okex/okchain/x/gov/types" + "github.com/okex/okexchain/x/gov/keeper" + "github.com/okex/okexchain/x/gov/types" ) func TestModuleAccountInvariant(t *testing.T) { diff --git a/x/gov/keeper/deposit.go b/x/gov/keeper/deposit.go index 1649168a84..b5f2c61c2d 100644 --- a/x/gov/keeper/deposit.go +++ b/x/gov/keeper/deposit.go @@ -6,7 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkGovTypes "github.com/cosmos/cosmos-sdk/x/gov/types" - "github.com/okex/okchain/x/gov/types" + "github.com/okex/okexchain/x/gov/types" ) // SetDeposit sets the deposit of a specific depositor on a specific proposal diff --git a/x/gov/keeper/deposit_test.go b/x/gov/keeper/deposit_test.go index b3fda3cfa6..4283cb6850 100644 --- a/x/gov/keeper/deposit_test.go +++ b/x/gov/keeper/deposit_test.go @@ -6,9 +6,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "github.com/okex/okchain/x/gov/types" - "github.com/okex/okchain/x/params" - paramsTypes "github.com/okex/okchain/x/params/types" + "github.com/okex/okexchain/x/gov/types" + "github.com/okex/okexchain/x/params" + paramsTypes "github.com/okex/okexchain/x/params/types" ) func TestKeeper_AddDeposit(t *testing.T) { diff --git a/x/gov/keeper/expected_keepers.go b/x/gov/keeper/expected_keepers.go index 28c06bb1e2..df689d443c 100644 --- a/x/gov/keeper/expected_keepers.go +++ b/x/gov/keeper/expected_keepers.go @@ -1,7 +1,7 @@ package keeper import ( - stakingexported "github.com/okex/okchain/x/staking/exported" + stakingexported "github.com/okex/okexchain/x/staking/exported" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/gov/keeper/keeper.go b/x/gov/keeper/keeper.go index 3a57bc514f..6968eb0f1f 100644 --- a/x/gov/keeper/keeper.go +++ b/x/gov/keeper/keeper.go @@ -4,14 +4,14 @@ import ( "fmt" "time" - "github.com/okex/okchain/x/common" - "github.com/okex/okchain/x/gov/types" - "github.com/okex/okchain/x/staking/exported" + "github.com/okex/okexchain/x/common" + "github.com/okex/okexchain/x/gov/types" + "github.com/okex/okexchain/x/staking/exported" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" sdkGov "github.com/cosmos/cosmos-sdk/x/gov" - "github.com/okex/okchain/x/params" + "github.com/okex/okexchain/x/params" ) // Keeper defines governance keeper diff --git a/x/gov/keeper/keeper_test.go b/x/gov/keeper/keeper_test.go index ce12f52ca8..b6ed64fef7 100644 --- a/x/gov/keeper/keeper_test.go +++ b/x/gov/keeper/keeper_test.go @@ -9,7 +9,7 @@ import ( sdkGovTypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/stretchr/testify/require" - "github.com/okex/okchain/x/gov/types" + "github.com/okex/okexchain/x/gov/types" ) func TestKeeper_IterateProposals(t *testing.T) { diff --git a/x/gov/keeper/proposal.go b/x/gov/keeper/proposal.go index eb5a724dca..502ca4e280 100644 --- a/x/gov/keeper/proposal.go +++ b/x/gov/keeper/proposal.go @@ -7,7 +7,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkGovTypes "github.com/cosmos/cosmos-sdk/x/gov/types" - "github.com/okex/okchain/x/gov/types" + "github.com/okex/okexchain/x/gov/types" ) // SubmitProposal creates new proposal given a content diff --git a/x/gov/keeper/proposal_handler_router.go b/x/gov/keeper/proposal_handler_router.go index c956a5ef12..1d803c1dc9 100644 --- a/x/gov/keeper/proposal_handler_router.go +++ b/x/gov/keeper/proposal_handler_router.go @@ -7,7 +7,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkGov "github.com/cosmos/cosmos-sdk/x/gov" - "github.com/okex/okchain/x/gov/types" + "github.com/okex/okexchain/x/gov/types" ) var ( diff --git a/x/gov/keeper/proposal_handler_router_test.go b/x/gov/keeper/proposal_handler_router_test.go index d5bac88c59..2028e41c41 100644 --- a/x/gov/keeper/proposal_handler_router_test.go +++ b/x/gov/keeper/proposal_handler_router_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/okex/okchain/x/gov/types" + "github.com/okex/okexchain/x/gov/types" ) func TestProposalHandlerRouter_AddRoute(t *testing.T) { diff --git a/x/gov/keeper/proposal_test.go b/x/gov/keeper/proposal_test.go index 362253c23f..a398c94852 100644 --- a/x/gov/keeper/proposal_test.go +++ b/x/gov/keeper/proposal_test.go @@ -7,9 +7,9 @@ import ( sdkGovTypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/stretchr/testify/require" - //"github.com/okex/okchain/x/common" - //dexTypes "github.com/okex/okchain/x/dex/types" - "github.com/okex/okchain/x/gov/types" + //"github.com/okex/okexchain/x/common" + //dexTypes "github.com/okex/okexchain/x/dex/types" + "github.com/okex/okexchain/x/gov/types" ) //func TestKeeper_SubmitProposal(t *testing.T) { diff --git a/x/gov/keeper/querier.go b/x/gov/keeper/querier.go index cd662bb24f..30a9510b5f 100644 --- a/x/gov/keeper/querier.go +++ b/x/gov/keeper/querier.go @@ -7,7 +7,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" abci "github.com/tendermint/tendermint/abci/types" - "github.com/okex/okchain/x/gov/types" + "github.com/okex/okexchain/x/gov/types" ) // NewQuerier returns all query handlers diff --git a/x/gov/keeper/querier_test.go b/x/gov/keeper/querier_test.go index 61cdb81909..c3fbe19d92 100644 --- a/x/gov/keeper/querier_test.go +++ b/x/gov/keeper/querier_test.go @@ -10,8 +10,8 @@ import ( abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/libs/cli/flags" - "github.com/okex/okchain/x/gov/types" - "github.com/okex/okchain/x/staking" + "github.com/okex/okexchain/x/gov/types" + "github.com/okex/okexchain/x/staking" ) const custom = "custom" diff --git a/x/gov/keeper/tally.go b/x/gov/keeper/tally.go index ec729b8660..b55f6086c4 100644 --- a/x/gov/keeper/tally.go +++ b/x/gov/keeper/tally.go @@ -4,8 +4,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkGov "github.com/cosmos/cosmos-sdk/x/gov" - "github.com/okex/okchain/x/gov/types" - "github.com/okex/okchain/x/staking/exported" + "github.com/okex/okexchain/x/gov/types" + "github.com/okex/okexchain/x/staking/exported" ) func tallyDelegatorVotes( diff --git a/x/gov/keeper/tally_test.go b/x/gov/keeper/tally_test.go index 726b71cf38..fbbab8e1a5 100644 --- a/x/gov/keeper/tally_test.go +++ b/x/gov/keeper/tally_test.go @@ -4,13 +4,13 @@ import ( "testing" "time" - "github.com/okex/okchain/x/common" + "github.com/okex/okexchain/x/common" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "github.com/okex/okchain/x/gov/types" - "github.com/okex/okchain/x/staking" + "github.com/okex/okexchain/x/gov/types" + "github.com/okex/okexchain/x/staking" ) func newTallyResult(t *testing.T, totalVoted, yes, abstain, no, veto, totalVoting string) types.TallyResult { diff --git a/x/gov/keeper/test_common.go b/x/gov/keeper/test_common.go index 859d7b4f59..8d7384f9d4 100644 --- a/x/gov/keeper/test_common.go +++ b/x/gov/keeper/test_common.go @@ -21,9 +21,9 @@ import ( tmtypes "github.com/tendermint/tendermint/types" dbm "github.com/tendermint/tm-db" - "github.com/okex/okchain/x/gov/types" - "github.com/okex/okchain/x/params" - "github.com/okex/okchain/x/staking" + "github.com/okex/okexchain/x/gov/types" + "github.com/okex/okexchain/x/params" + "github.com/okex/okexchain/x/staking" ) var ( @@ -114,7 +114,7 @@ func CreateTestInput( err := ms.LoadLatestVersion() require.Nil(t, err) - ctx := sdk.NewContext(ms, abci.Header{ChainID: "okchain"}, isCheckTx, log.NewNopLogger()) + ctx := sdk.NewContext(ms, abci.Header{ChainID: "okexchain"}, isCheckTx, log.NewNopLogger()) ctx = ctx.WithConsensusParams( &abci.ConsensusParams{ Validator: &abci.ValidatorParams{ diff --git a/x/gov/keeper/vote.go b/x/gov/keeper/vote.go index 9756897faf..de5cbad262 100644 --- a/x/gov/keeper/vote.go +++ b/x/gov/keeper/vote.go @@ -6,7 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkGovTypes "github.com/cosmos/cosmos-sdk/x/gov/types" - "github.com/okex/okchain/x/gov/types" + "github.com/okex/okexchain/x/gov/types" ) // AddVote adds a vote on a specific proposal diff --git a/x/gov/keeper/vote_test.go b/x/gov/keeper/vote_test.go index e0642ce70e..d4c266c4a4 100644 --- a/x/gov/keeper/vote_test.go +++ b/x/gov/keeper/vote_test.go @@ -8,7 +8,7 @@ import ( sdkGov "github.com/cosmos/cosmos-sdk/x/gov" "github.com/stretchr/testify/require" - "github.com/okex/okchain/x/gov/types" + "github.com/okex/okexchain/x/gov/types" ) func TestKeeper_AddVote(t *testing.T) { diff --git a/x/gov/module.go b/x/gov/module.go index 0aa8978946..b153df79d3 100644 --- a/x/gov/module.go +++ b/x/gov/module.go @@ -12,12 +12,12 @@ import ( "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" - "github.com/okex/okchain/x/common/version" - "github.com/okex/okchain/x/gov/client" - "github.com/okex/okchain/x/gov/client/cli" - GovCli "github.com/okex/okchain/x/gov/client/cli" - "github.com/okex/okchain/x/gov/client/rest" - "github.com/okex/okchain/x/gov/types" + "github.com/okex/okexchain/x/common/version" + "github.com/okex/okexchain/x/gov/client" + "github.com/okex/okexchain/x/gov/client/cli" + GovCli "github.com/okex/okexchain/x/gov/client/cli" + "github.com/okex/okexchain/x/gov/client/rest" + "github.com/okex/okexchain/x/gov/types" ) var ( diff --git a/x/gov/module_test.go b/x/gov/module_test.go index da986e56ae..9e4faca788 100644 --- a/x/gov/module_test.go +++ b/x/gov/module_test.go @@ -8,9 +8,9 @@ import ( "github.com/cosmos/cosmos-sdk/codec" sdkGovClient "github.com/cosmos/cosmos-sdk/x/gov/client" sdkGovRest "github.com/cosmos/cosmos-sdk/x/gov/client/rest" - "github.com/okex/okchain/x/common/version" - "github.com/okex/okchain/x/gov/keeper" - "github.com/okex/okchain/x/gov/types" + "github.com/okex/okexchain/x/common/version" + "github.com/okex/okexchain/x/gov/keeper" + "github.com/okex/okexchain/x/gov/types" "github.com/spf13/cobra" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" diff --git a/x/order/alias.go b/x/order/alias.go index 13d45aff43..c00631b269 100644 --- a/x/order/alias.go +++ b/x/order/alias.go @@ -1,8 +1,8 @@ package order import ( - "github.com/okex/okchain/x/order/keeper" - "github.com/okex/okchain/x/order/types" + "github.com/okex/okexchain/x/order/keeper" + "github.com/okex/okexchain/x/order/types" ) // nolint diff --git a/x/order/app_test.go b/x/order/app_test.go index 8fd0acdf87..88b31a023e 100644 --- a/x/order/app_test.go +++ b/x/order/app_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/okex/okchain/x/common/monitor" + "github.com/okex/okexchain/x/common/monitor" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" @@ -13,14 +13,14 @@ import ( "github.com/cosmos/cosmos-sdk/x/mock" "github.com/cosmos/cosmos-sdk/x/supply" "github.com/cosmos/cosmos-sdk/x/supply/exported" - "github.com/okex/okchain/x/staking/types" + "github.com/okex/okexchain/x/staking/types" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/crypto/secp256k1" - "github.com/okex/okchain/x/common" - "github.com/okex/okchain/x/dex" - "github.com/okex/okchain/x/token" + "github.com/okex/okexchain/x/common" + "github.com/okex/okexchain/x/dex" + "github.com/okex/okexchain/x/token" ) type MockApp struct { diff --git a/x/order/beginblocker.go b/x/order/beginblocker.go index 60c801b6f5..f7e4e46b43 100644 --- a/x/order/beginblocker.go +++ b/x/order/beginblocker.go @@ -3,10 +3,10 @@ package order import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/common/perf" - "github.com/okex/okchain/x/order/keeper" - "github.com/okex/okchain/x/order/types" - //"github.com/okex/okchain/x/common/version" + "github.com/okex/okexchain/x/common/perf" + "github.com/okex/okexchain/x/order/keeper" + "github.com/okex/okexchain/x/order/types" + //"github.com/okex/okexchain/x/common/version" ) // BeginBlocker runs the logic of BeginBlocker with version 0. diff --git a/x/order/client/cli/query.go b/x/order/client/cli/query.go index b344d3c946..e3a1be551c 100644 --- a/x/order/client/cli/query.go +++ b/x/order/client/cli/query.go @@ -10,8 +10,8 @@ import ( "github.com/spf13/cobra" "github.com/spf13/viper" - "github.com/okex/okchain/x/order/keeper" - "github.com/okex/okchain/x/order/types" + "github.com/okex/okexchain/x/order/keeper" + "github.com/okex/okexchain/x/order/types" ) // GetQueryCmd returns the cli query commands for this module @@ -63,7 +63,7 @@ func GetCmdDepthBook(queryRoute string, cdc *codec.Codec) *cobra.Command { Short: "Query the depth book of a trading pair", Long: strings.TrimSpace(`Query the depth book of a trading pair: -$ okchaincli query depthbook mytoken_okt +$ okexchaincli query depthbook mytoken_okt The 'product' is a trading pair in full name of the tokens: ${base-asset-symbol}_${quote-asset-symbol}, for example 'mytoken_okt'. `), @@ -152,7 +152,7 @@ func GetCmdQueryParams(queryRoute string, cdc *codec.Codec) *cobra.Command { Short: "Query the parameters of the order process", Long: strings.TrimSpace(`Query the all the parameters for the governance process: -$ okchaincli query order params +$ okexchaincli query order params `), Args: cobra.NoArgs, RunE: func(cmd *cobra.Command, args []string) error { diff --git a/x/order/client/cli/tx.go b/x/order/client/cli/tx.go index 87b1387dc3..c4b78a839b 100644 --- a/x/order/client/cli/tx.go +++ b/x/order/client/cli/tx.go @@ -10,7 +10,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/auth/client/utils" authtxb "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/okex/okchain/x/order/types" + "github.com/okex/okexchain/x/order/types" "github.com/pkg/errors" "github.com/spf13/cobra" ) diff --git a/x/order/client/rest/rest.go b/x/order/client/rest/rest.go index 5474ea7eea..41937e1500 100644 --- a/x/order/client/rest/rest.go +++ b/x/order/client/rest/rest.go @@ -11,9 +11,9 @@ import ( "github.com/cosmos/cosmos-sdk/types/rest" "github.com/gorilla/mux" - "github.com/okex/okchain/x/common" - "github.com/okex/okchain/x/order/keeper" - "github.com/okex/okchain/x/order/types" + "github.com/okex/okexchain/x/common" + "github.com/okex/okexchain/x/order/keeper" + "github.com/okex/okexchain/x/order/types" ) // RegisterRoutes - Central function to define routes that get registered by the main application diff --git a/x/order/client/rest/rest_doc.go b/x/order/client/rest/rest_doc.go index daf34f4683..8aa3bebd28 100644 --- a/x/order/client/rest/rest_doc.go +++ b/x/order/client/rest/rest_doc.go @@ -27,8 +27,8 @@ package rest import ( - "github.com/okex/okchain/x/order/keeper" - "github.com/okex/okchain/x/order/types" + "github.com/okex/okexchain/x/order/keeper" + "github.com/okex/okexchain/x/order/types" ) // OrderDetailParam : order detail param diff --git a/x/order/client/rest/rest_v2.go b/x/order/client/rest/rest_v2.go index 4942bcbe8f..7f4e729fe1 100644 --- a/x/order/client/rest/rest_v2.go +++ b/x/order/client/rest/rest_v2.go @@ -11,9 +11,9 @@ import ( "github.com/cosmos/cosmos-sdk/types/rest" "github.com/cosmos/cosmos-sdk/x/auth" "github.com/gorilla/mux" - "github.com/okex/okchain/x/common" - "github.com/okex/okchain/x/order/keeper" - ordertype "github.com/okex/okchain/x/order/types" + "github.com/okex/okexchain/x/common" + "github.com/okex/okexchain/x/order/keeper" + ordertype "github.com/okex/okexchain/x/order/types" ) // nolint diff --git a/x/order/endblocker.go b/x/order/endblocker.go index 4a23dc7380..2541ca043a 100644 --- a/x/order/endblocker.go +++ b/x/order/endblocker.go @@ -5,10 +5,10 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/common/perf" - "github.com/okex/okchain/x/order/keeper" - "github.com/okex/okchain/x/order/match" - "github.com/okex/okchain/x/order/types" + "github.com/okex/okexchain/x/common/perf" + "github.com/okex/okexchain/x/order/keeper" + "github.com/okex/okexchain/x/order/match" + "github.com/okex/okexchain/x/order/types" ) // EndBlocker called every block diff --git a/x/order/endblocker_test.go b/x/order/endblocker_test.go index 6523e7b76b..a50466f905 100644 --- a/x/order/endblocker_test.go +++ b/x/order/endblocker_test.go @@ -13,11 +13,11 @@ import ( "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" - "github.com/okex/okchain/x/common" - "github.com/okex/okchain/x/dex" - "github.com/okex/okchain/x/order/keeper" - "github.com/okex/okchain/x/order/types" - token "github.com/okex/okchain/x/token/types" + "github.com/okex/okexchain/x/common" + "github.com/okex/okexchain/x/dex" + "github.com/okex/okexchain/x/order/keeper" + "github.com/okex/okexchain/x/order/types" + token "github.com/okex/okexchain/x/token/types" ) func TestEndBlockerPeriodicMatch(t *testing.T) { diff --git a/x/order/genesis.go b/x/order/genesis.go index 3f0a10742f..5fd3da7d48 100644 --- a/x/order/genesis.go +++ b/x/order/genesis.go @@ -4,8 +4,8 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/order/keeper" - "github.com/okex/okchain/x/order/types" + "github.com/okex/okexchain/x/order/keeper" + "github.com/okex/okexchain/x/order/types" ) // GenesisState - all order state that must be provided at genesis diff --git a/x/order/genesis_test.go b/x/order/genesis_test.go index faba9dcaca..d50c5b2ed3 100644 --- a/x/order/genesis_test.go +++ b/x/order/genesis_test.go @@ -5,10 +5,10 @@ import ( "testing" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/common" - "github.com/okex/okchain/x/dex" - "github.com/okex/okchain/x/order/keeper" - "github.com/okex/okchain/x/order/types" + "github.com/okex/okexchain/x/common" + "github.com/okex/okexchain/x/dex" + "github.com/okex/okexchain/x/order/keeper" + "github.com/okex/okexchain/x/order/types" "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/types/time" ) diff --git a/x/order/handler.go b/x/order/handler.go index da233fd9c0..e18b9cd433 100644 --- a/x/order/handler.go +++ b/x/order/handler.go @@ -13,9 +13,9 @@ import ( "github.com/tendermint/tendermint/libs/log" "github.com/willf/bitset" - "github.com/okex/okchain/x/common/perf" - "github.com/okex/okchain/x/order/keeper" - "github.com/okex/okchain/x/order/types" + "github.com/okex/okexchain/x/common/perf" + "github.com/okex/okexchain/x/order/keeper" + "github.com/okex/okexchain/x/order/types" ) func CalculateGas(msg sdk.Msg, params *types.Params) (gas uint64) { diff --git a/x/order/handler_test.go b/x/order/handler_test.go index b778de5834..bef943527e 100644 --- a/x/order/handler_test.go +++ b/x/order/handler_test.go @@ -13,11 +13,11 @@ import ( "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" - "github.com/okex/okchain/x/common" - "github.com/okex/okchain/x/dex" - "github.com/okex/okchain/x/order/types" - "github.com/okex/okchain/x/token" - tokentypes "github.com/okex/okchain/x/token/types" + "github.com/okex/okexchain/x/common" + "github.com/okex/okexchain/x/dex" + "github.com/okex/okexchain/x/order/types" + "github.com/okex/okexchain/x/token" + tokentypes "github.com/okex/okexchain/x/token/types" ) func TestEventNewOrders(t *testing.T) { @@ -923,7 +923,7 @@ func TestFeesTable(t *testing.T) { } func handleOrders(t *testing.T, baseasset string, quoteasset string, orders []*types.Order, blockheight int64) sdk.DecCoins { - TestTokenPairOwner := "okchain10q0rk5qnyag7wfvvt7rtphlw589m7frsmyq4ya" + TestTokenPairOwner := "okexchain10q0rk5qnyag7wfvvt7rtphlw589m7frsku8qc9" addr, err := sdk.AccAddressFromBech32(TestTokenPairOwner) require.Nil(t, err) mapp, addrKeysSlice := getMockApp(t, len(orders)) diff --git a/x/order/keeper/disk_cache.go b/x/order/keeper/disk_cache.go index 480cbd6ae3..9014ba64aa 100644 --- a/x/order/keeper/disk_cache.go +++ b/x/order/keeper/disk_cache.go @@ -4,7 +4,7 @@ import ( "sort" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/order/types" + "github.com/okex/okexchain/x/order/types" ) // OrderIDsMap stores orderIDSlice with map. diff --git a/x/order/keeper/disk_cache_keeper.go b/x/order/keeper/disk_cache_keeper.go index bccb35acc7..cf06e5fa17 100644 --- a/x/order/keeper/disk_cache_keeper.go +++ b/x/order/keeper/disk_cache_keeper.go @@ -2,8 +2,8 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/common" - "github.com/okex/okchain/x/order/types" + "github.com/okex/okexchain/x/common" + "github.com/okex/okexchain/x/order/types" ) // =============================================== diff --git a/x/order/keeper/disk_cache_test.go b/x/order/keeper/disk_cache_test.go index 0e7861a55d..6794c0ab02 100644 --- a/x/order/keeper/disk_cache_test.go +++ b/x/order/keeper/disk_cache_test.go @@ -3,10 +3,10 @@ package keeper import ( "testing" - "github.com/okex/okchain/x/common" + "github.com/okex/okexchain/x/common" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/order/types" + "github.com/okex/okexchain/x/order/types" "github.com/stretchr/testify/require" ) diff --git a/x/order/keeper/dump_store_test.go b/x/order/keeper/dump_store_test.go index db19c80a2e..19dde1b3cb 100644 --- a/x/order/keeper/dump_store_test.go +++ b/x/order/keeper/dump_store_test.go @@ -1,8 +1,8 @@ package keeper import ( - "github.com/okex/okchain/x/dex" - "github.com/okex/okchain/x/order/types" + "github.com/okex/okexchain/x/dex" + "github.com/okex/okexchain/x/order/types" "github.com/stretchr/testify/require" "testing" diff --git a/x/order/keeper/expect_keepers.go b/x/order/keeper/expect_keepers.go index 5b031c9d38..1513033b51 100644 --- a/x/order/keeper/expect_keepers.go +++ b/x/order/keeper/expect_keepers.go @@ -4,9 +4,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/supply/exported" - dex "github.com/okex/okchain/x/dex/types" - "github.com/okex/okchain/x/order/types" - token "github.com/okex/okchain/x/token/types" + dex "github.com/okex/okexchain/x/dex/types" + "github.com/okex/okexchain/x/order/types" + token "github.com/okex/okexchain/x/token/types" ) // TokenKeeper : expected token keeper diff --git a/x/order/keeper/fee.go b/x/order/keeper/fee.go index dfa632f886..d22087ec51 100644 --- a/x/order/keeper/fee.go +++ b/x/order/keeper/fee.go @@ -7,7 +7,7 @@ import ( "strings" - "github.com/okex/okchain/x/order/types" + "github.com/okex/okexchain/x/order/types" ) const minFee = "0.00000001" diff --git a/x/order/keeper/fee_test.go b/x/order/keeper/fee_test.go index 35f5224cf2..c4a25d0adf 100644 --- a/x/order/keeper/fee_test.go +++ b/x/order/keeper/fee_test.go @@ -3,12 +3,12 @@ package keeper import ( "testing" - "github.com/okex/okchain/x/common" + "github.com/okex/okexchain/x/common" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "github.com/okex/okchain/x/order/types" + "github.com/okex/okexchain/x/order/types" "github.com/tendermint/tendermint/libs/cli/flags" ) diff --git a/x/order/keeper/invariant.go b/x/order/keeper/invariant.go index 17f7688261..c1b4f51c90 100644 --- a/x/order/keeper/invariant.go +++ b/x/order/keeper/invariant.go @@ -4,8 +4,8 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/order/types" - "github.com/okex/okchain/x/token" + "github.com/okex/okexchain/x/order/types" + "github.com/okex/okexchain/x/token" ) // RegisterInvariants registers all order invariants diff --git a/x/order/keeper/invariant_test.go b/x/order/keeper/invariant_test.go index 76e269deef..2b7096af88 100644 --- a/x/order/keeper/invariant_test.go +++ b/x/order/keeper/invariant_test.go @@ -4,11 +4,11 @@ import ( "fmt" "testing" - token "github.com/okex/okchain/x/token/types" + token "github.com/okex/okexchain/x/token/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/dex" - "github.com/okex/okchain/x/order/types" + "github.com/okex/okexchain/x/dex" + "github.com/okex/okexchain/x/order/types" "github.com/stretchr/testify/require" ) diff --git a/x/order/keeper/keeper.go b/x/order/keeper/keeper.go index c70626fd6f..838568fd6e 100644 --- a/x/order/keeper/keeper.go +++ b/x/order/keeper/keeper.go @@ -7,14 +7,14 @@ import ( "github.com/willf/bitset" - "github.com/okex/okchain/x/common/monitor" + "github.com/okex/okexchain/x/common/monitor" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/params" + "github.com/okex/okexchain/x/params" - "github.com/okex/okchain/x/common" - "github.com/okex/okchain/x/order/types" + "github.com/okex/okexchain/x/common" + "github.com/okex/okexchain/x/order/types" ) var onStartUp sync.Once diff --git a/x/order/keeper/keeper_dump.go b/x/order/keeper/keeper_dump.go index c9dca72423..77625730da 100644 --- a/x/order/keeper/keeper_dump.go +++ b/x/order/keeper/keeper_dump.go @@ -4,8 +4,8 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/common" - "github.com/okex/okchain/x/order/types" + "github.com/okex/okexchain/x/common" + "github.com/okex/okexchain/x/order/types" "github.com/tendermint/tendermint/libs/log" ) diff --git a/x/order/keeper/keeper_test.go b/x/order/keeper/keeper_test.go index 0dc4a181fe..76833093f0 100644 --- a/x/order/keeper/keeper_test.go +++ b/x/order/keeper/keeper_test.go @@ -3,14 +3,14 @@ package keeper import ( "testing" - "github.com/okex/okchain/x/common" + "github.com/okex/okexchain/x/common" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "github.com/okex/okchain/x/dex" - "github.com/okex/okchain/x/order/types" - token "github.com/okex/okchain/x/token/types" + "github.com/okex/okexchain/x/dex" + "github.com/okex/okexchain/x/order/types" + token "github.com/okex/okexchain/x/token/types" ) func TestKeeper_Cache2Disk(t *testing.T) { diff --git a/x/order/keeper/memory_cache.go b/x/order/keeper/memory_cache.go index 2f64926691..7617b09ebf 100644 --- a/x/order/keeper/memory_cache.go +++ b/x/order/keeper/memory_cache.go @@ -1,7 +1,7 @@ package keeper import ( - "github.com/okex/okchain/x/order/types" + "github.com/okex/okexchain/x/order/types" "github.com/willf/bitset" ) diff --git a/x/order/keeper/memory_cache_test.go b/x/order/keeper/memory_cache_test.go index dd8a52d729..2f81c73fef 100644 --- a/x/order/keeper/memory_cache_test.go +++ b/x/order/keeper/memory_cache_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/okex/okchain/x/order/types" + "github.com/okex/okexchain/x/order/types" "github.com/stretchr/testify/require" ) diff --git a/x/order/keeper/order.go b/x/order/keeper/order.go index d8235b0193..c5d11acd50 100644 --- a/x/order/keeper/order.go +++ b/x/order/keeper/order.go @@ -6,8 +6,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/tendermint/tendermint/libs/log" - "github.com/okex/okchain/x/order/types" - token "github.com/okex/okchain/x/token/types" + "github.com/okex/okexchain/x/order/types" + token "github.com/okex/okexchain/x/token/types" ) // TryPlaceOrder tries to charge fee & lock coins for a new order diff --git a/x/order/keeper/order_map_test.go b/x/order/keeper/order_map_test.go index 2ef000e2c1..0b0a61db17 100644 --- a/x/order/keeper/order_map_test.go +++ b/x/order/keeper/order_map_test.go @@ -6,8 +6,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "github.com/okex/okchain/x/dex" - "github.com/okex/okchain/x/order/types" + "github.com/okex/okexchain/x/dex" + "github.com/okex/okexchain/x/order/types" ) func TestOrderIDsMapInsertAndRemove(t *testing.T) { diff --git a/x/order/keeper/order_test.go b/x/order/keeper/order_test.go index ba1e636b9c..b4a605b232 100644 --- a/x/order/keeper/order_test.go +++ b/x/order/keeper/order_test.go @@ -3,15 +3,15 @@ package keeper import ( "testing" - "github.com/okex/okchain/x/dex" + "github.com/okex/okexchain/x/dex" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/auth" "github.com/stretchr/testify/require" - "github.com/okex/okchain/x/common" - "github.com/okex/okchain/x/order/types" - token "github.com/okex/okchain/x/token/types" + "github.com/okex/okexchain/x/common" + "github.com/okex/okexchain/x/order/types" + token "github.com/okex/okexchain/x/token/types" ) func TestTryPlaceOrder(t *testing.T) { diff --git a/x/order/keeper/product_lock.go b/x/order/keeper/product_lock.go index 1c55b83b66..f0fb34ed90 100644 --- a/x/order/keeper/product_lock.go +++ b/x/order/keeper/product_lock.go @@ -2,7 +2,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/order/types" + "github.com/okex/okexchain/x/order/types" ) // nolint diff --git a/x/order/keeper/product_lock_test.go b/x/order/keeper/product_lock_test.go index 70606ec971..76672a2a9d 100644 --- a/x/order/keeper/product_lock_test.go +++ b/x/order/keeper/product_lock_test.go @@ -3,8 +3,8 @@ package keeper import ( "testing" - "github.com/okex/okchain/x/dex" - "github.com/okex/okchain/x/order/types" + "github.com/okex/okexchain/x/dex" + "github.com/okex/okexchain/x/order/types" "github.com/stretchr/testify/require" ) diff --git a/x/order/keeper/querier.go b/x/order/keeper/querier.go index 4f5a4243ce..6eac9b90a5 100644 --- a/x/order/keeper/querier.go +++ b/x/order/keeper/querier.go @@ -7,8 +7,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" abci "github.com/tendermint/tendermint/abci/types" - "github.com/okex/okchain/x/common" - "github.com/okex/okchain/x/order/types" + "github.com/okex/okexchain/x/common" + "github.com/okex/okexchain/x/order/types" ) // nolint diff --git a/x/order/keeper/querier_test.go b/x/order/keeper/querier_test.go index 9bd09e4fc2..871e9a407d 100644 --- a/x/order/keeper/querier_test.go +++ b/x/order/keeper/querier_test.go @@ -7,8 +7,8 @@ import ( "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" - "github.com/okex/okchain/x/dex" - "github.com/okex/okchain/x/order/types" + "github.com/okex/okexchain/x/dex" + "github.com/okex/okexchain/x/order/types" ) func TestQueryOrder(t *testing.T) { diff --git a/x/order/keeper/test_common.go b/x/order/keeper/test_common.go index ce295df593..2aa1790986 100644 --- a/x/order/keeper/test_common.go +++ b/x/order/keeper/test_common.go @@ -6,9 +6,9 @@ import ( "testing" "time" - "github.com/okex/okchain/x/common" + "github.com/okex/okexchain/x/common" - "github.com/okex/okchain/x/common/monitor" + "github.com/okex/okexchain/x/common/monitor" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/store" @@ -16,16 +16,16 @@ import ( "github.com/cosmos/cosmos-sdk/x/auth" "github.com/cosmos/cosmos-sdk/x/bank" "github.com/cosmos/cosmos-sdk/x/supply" - "github.com/okex/okchain/x/params" + "github.com/okex/okexchain/x/params" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/crypto/ed25519" "github.com/tendermint/tendermint/libs/log" dbm "github.com/tendermint/tm-db" - "github.com/okex/okchain/x/dex" - "github.com/okex/okchain/x/order/types" - "github.com/okex/okchain/x/token" + "github.com/okex/okexchain/x/dex" + "github.com/okex/okexchain/x/order/types" + "github.com/okex/okexchain/x/token" ) var mockOrder = types.MockOrder diff --git a/x/order/legacy/v0_11/migrate.go b/x/order/legacy/v0_11/migrate.go index 5001894c23..94151785c1 100644 --- a/x/order/legacy/v0_11/migrate.go +++ b/x/order/legacy/v0_11/migrate.go @@ -1,7 +1,7 @@ package v0_11 import ( - "github.com/okex/okchain/x/order/legacy/v0_10" + "github.com/okex/okexchain/x/order/legacy/v0_10" ) func Migrate(oldGenState v0_10.GenesisState) GenesisState { diff --git a/x/order/legacy/v0_11/types.go b/x/order/legacy/v0_11/types.go index 899cf5a78e..2e7912edcc 100644 --- a/x/order/legacy/v0_11/types.go +++ b/x/order/legacy/v0_11/types.go @@ -2,7 +2,7 @@ package v0_11 import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/order/legacy/v0_10" + "github.com/okex/okexchain/x/order/legacy/v0_10" ) const ( diff --git a/x/order/match/continuousauction/impl.go b/x/order/match/continuousauction/impl.go index da957bcab3..4f1cbbba37 100644 --- a/x/order/match/continuousauction/impl.go +++ b/x/order/match/continuousauction/impl.go @@ -3,7 +3,7 @@ package continuousauction import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/order/keeper" + "github.com/okex/okexchain/x/order/keeper" ) // nolint diff --git a/x/order/match/engine.go b/x/order/match/engine.go index 5df2999499..dd84841d1d 100644 --- a/x/order/match/engine.go +++ b/x/order/match/engine.go @@ -5,9 +5,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/order/keeper" - "github.com/okex/okchain/x/order/match/continuousauction" - "github.com/okex/okchain/x/order/match/periodicauction" + "github.com/okex/okexchain/x/order/keeper" + "github.com/okex/okexchain/x/order/match/continuousauction" + "github.com/okex/okexchain/x/order/match/periodicauction" ) // nolint diff --git a/x/order/match/periodicauction/fill.go b/x/order/match/periodicauction/fill.go index 244c8ee360..a413ff2b3f 100644 --- a/x/order/match/periodicauction/fill.go +++ b/x/order/match/periodicauction/fill.go @@ -5,9 +5,9 @@ import ( "strings" sdk "github.com/cosmos/cosmos-sdk/types" - orderkeeper "github.com/okex/okchain/x/order/keeper" - "github.com/okex/okchain/x/order/types" - token "github.com/okex/okchain/x/token/types" + orderkeeper "github.com/okex/okexchain/x/order/keeper" + "github.com/okex/okexchain/x/order/types" + token "github.com/okex/okexchain/x/token/types" ) func fillBuyOrders(ctx sdk.Context, keeper orderkeeper.Keeper, product string, diff --git a/x/order/match/periodicauction/fill_test.go b/x/order/match/periodicauction/fill_test.go index 224dce43a1..e51a57f84a 100644 --- a/x/order/match/periodicauction/fill_test.go +++ b/x/order/match/periodicauction/fill_test.go @@ -6,10 +6,10 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "github.com/okex/okchain/x/common" - "github.com/okex/okchain/x/dex" - orderkeeper "github.com/okex/okchain/x/order/keeper" - "github.com/okex/okchain/x/order/types" + "github.com/okex/okexchain/x/common" + "github.com/okex/okexchain/x/dex" + orderkeeper "github.com/okex/okexchain/x/order/keeper" + "github.com/okex/okexchain/x/order/types" ) var mockOrder = types.MockOrder diff --git a/x/order/match/periodicauction/impl.go b/x/order/match/periodicauction/impl.go index ba64d6fa4b..2d1c628ed7 100644 --- a/x/order/match/periodicauction/impl.go +++ b/x/order/match/periodicauction/impl.go @@ -3,7 +3,7 @@ package periodicauction import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/order/keeper" + "github.com/okex/okexchain/x/order/keeper" ) // PaEngine is the periodic auction match engine diff --git a/x/order/match/periodicauction/impl_test.go b/x/order/match/periodicauction/impl_test.go index 9901672f33..f2a396899f 100644 --- a/x/order/match/periodicauction/impl_test.go +++ b/x/order/match/periodicauction/impl_test.go @@ -4,9 +4,9 @@ import ( "testing" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/dex" - orderkeeper "github.com/okex/okchain/x/order/keeper" - "github.com/okex/okchain/x/order/types" + "github.com/okex/okexchain/x/dex" + orderkeeper "github.com/okex/okexchain/x/order/keeper" + "github.com/okex/okexchain/x/order/types" "github.com/stretchr/testify/require" ) diff --git a/x/order/match/periodicauction/match.go b/x/order/match/periodicauction/match.go index c84c04b8c8..162a5a7235 100644 --- a/x/order/match/periodicauction/match.go +++ b/x/order/match/periodicauction/match.go @@ -7,8 +7,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/order/keeper" - "github.com/okex/okchain/x/order/types" + "github.com/okex/okexchain/x/order/keeper" + "github.com/okex/okexchain/x/order/types" ) func preMatchProcessing(book *types.DepthBook) (buyAmountSum, sellAmountSum []sdk.Dec) { diff --git a/x/order/match/periodicauction/match_test.go b/x/order/match/periodicauction/match_test.go index b15c567f2e..683099e24c 100644 --- a/x/order/match/periodicauction/match_test.go +++ b/x/order/match/periodicauction/match_test.go @@ -5,13 +5,13 @@ import ( "strconv" "testing" - "github.com/okex/okchain/x/dex" - orderkeeper "github.com/okex/okchain/x/order/keeper" + "github.com/okex/okexchain/x/dex" + orderkeeper "github.com/okex/okexchain/x/order/keeper" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "github.com/okex/okchain/x/order/types" + "github.com/okex/okexchain/x/order/types" ) type BookItemTestData struct { diff --git a/x/order/module.go b/x/order/module.go index 68cb5fa84c..2af1a1d4ca 100644 --- a/x/order/module.go +++ b/x/order/module.go @@ -12,11 +12,11 @@ import ( "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" - "github.com/okex/okchain/x/common/version" - "github.com/okex/okchain/x/order/client/cli" - "github.com/okex/okchain/x/order/client/rest" - "github.com/okex/okchain/x/order/keeper" - "github.com/okex/okchain/x/order/types" + "github.com/okex/okexchain/x/common/version" + "github.com/okex/okexchain/x/order/client/cli" + "github.com/okex/okexchain/x/order/client/rest" + "github.com/okex/okexchain/x/order/keeper" + "github.com/okex/okexchain/x/order/types" ) var ( diff --git a/x/order/module_test.go b/x/order/module_test.go index 63fb9b9403..5346c3f691 100644 --- a/x/order/module_test.go +++ b/x/order/module_test.go @@ -3,11 +3,11 @@ package order import ( "testing" - "github.com/okex/okchain/x/common/version" + "github.com/okex/okexchain/x/common/version" "github.com/cosmos/cosmos-sdk/codec" - "github.com/okex/okchain/x/order/keeper" - "github.com/okex/okchain/x/order/types" + "github.com/okex/okexchain/x/order/keeper" + "github.com/okex/okexchain/x/order/types" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" ) diff --git a/x/order/types/codec.go b/x/order/types/codec.go index aa82ffaa50..35ba5cd502 100644 --- a/x/order/types/codec.go +++ b/x/order/types/codec.go @@ -6,8 +6,8 @@ import ( // RegisterCodec registers concrete types on the Amino codec func RegisterCodec(cdc *codec.Codec) { - cdc.RegisterConcrete(MsgNewOrders{}, "okchain/order/MsgNew", nil) - cdc.RegisterConcrete(MsgCancelOrders{}, "okchain/order/MsgCancel", nil) + cdc.RegisterConcrete(MsgNewOrders{}, "okexchain/order/MsgNew", nil) + cdc.RegisterConcrete(MsgCancelOrders{}, "okexchain/order/MsgCancel", nil) } // ModuleCdc generic sealed codec to be used throughout this module diff --git a/x/order/types/const.go b/x/order/types/const.go index 0f84630802..1571e16ef6 100644 --- a/x/order/types/const.go +++ b/x/order/types/const.go @@ -2,7 +2,7 @@ package types import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/common" + "github.com/okex/okexchain/x/common" ) // nolint diff --git a/x/order/types/msgs_test.go b/x/order/types/msgs_test.go index 1fbf23db1c..b058d91efe 100644 --- a/x/order/types/msgs_test.go +++ b/x/order/types/msgs_test.go @@ -6,7 +6,7 @@ import ( "strconv" "testing" - "github.com/okex/okchain/x/common" + "github.com/okex/okexchain/x/common" "github.com/stretchr/testify/require" ) diff --git a/x/order/types/order_test.go b/x/order/types/order_test.go index e2e90e89ec..c30627a333 100644 --- a/x/order/types/order_test.go +++ b/x/order/types/order_test.go @@ -3,7 +3,7 @@ package types import ( "testing" - "github.com/okex/okchain/x/common" + "github.com/okex/okexchain/x/common" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" diff --git a/x/order/types/params.go b/x/order/types/params.go index 2e9f226c5d..6dd064659a 100644 --- a/x/order/types/params.go +++ b/x/order/types/params.go @@ -4,8 +4,8 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/common" - "github.com/okex/okchain/x/params" + "github.com/okex/okexchain/x/common" + "github.com/okex/okexchain/x/params" ) // nolint diff --git a/x/order/types/params_test.go b/x/order/types/params_test.go index a2312c9fc4..654c6f9a5e 100644 --- a/x/order/types/params_test.go +++ b/x/order/types/params_test.go @@ -3,7 +3,7 @@ package types import ( "testing" - "github.com/okex/okchain/x/common" + "github.com/okex/okexchain/x/common" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" diff --git a/x/params/alias.go b/x/params/alias.go index 0ab267511f..cd3c22ceb3 100644 --- a/x/params/alias.go +++ b/x/params/alias.go @@ -2,7 +2,7 @@ package params import ( sdkparams "github.com/cosmos/cosmos-sdk/x/params" - "github.com/okex/okchain/x/params/types" + "github.com/okex/okexchain/x/params/types" ) // const diff --git a/x/params/client/cli/query.go b/x/params/client/cli/query.go index 7bb56577fc..17f467f1cb 100644 --- a/x/params/client/cli/query.go +++ b/x/params/client/cli/query.go @@ -4,7 +4,7 @@ import ( "fmt" "strings" - "github.com/okex/okchain/x/params/types" + "github.com/okex/okexchain/x/params/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/context" @@ -33,7 +33,7 @@ func GetCmdQueryParams(queryRoute string, cdc *codec.Codec) *cobra.Command { Short: "Query parameters of params", Long: strings.TrimSpace(`Query parameters of params: -$ okchaincli query params params +$ okexchaincli query params params `), Args: cobra.NoArgs, RunE: func(_ *cobra.Command, _ []string) error { diff --git a/x/params/client/cli/tx.go b/x/params/client/cli/tx.go index 43b00a8515..b480895912 100644 --- a/x/params/client/cli/tx.go +++ b/x/params/client/cli/tx.go @@ -12,9 +12,9 @@ import ( "github.com/cosmos/cosmos-sdk/x/auth/client/utils" "github.com/spf13/cobra" - govTypes "github.com/okex/okchain/x/gov/types" - paramscutils "github.com/okex/okchain/x/params/client/utils" - "github.com/okex/okchain/x/params/types" + govTypes "github.com/okex/okexchain/x/gov/types" + paramscutils "github.com/okex/okexchain/x/params/client/utils" + "github.com/okex/okexchain/x/params/types" ) // GetCmdSubmitProposal implements a command handler for submitting a parameter change proposal transaction diff --git a/x/params/client/proposal_handler.go b/x/params/client/proposal_handler.go index 7f69e488f5..55b25866ee 100644 --- a/x/params/client/proposal_handler.go +++ b/x/params/client/proposal_handler.go @@ -1,9 +1,9 @@ package client import ( - govclient "github.com/okex/okchain/x/gov/client" - "github.com/okex/okchain/x/params/client/cli" - "github.com/okex/okchain/x/params/client/rest" + govclient "github.com/okex/okexchain/x/gov/client" + "github.com/okex/okexchain/x/params/client/cli" + "github.com/okex/okexchain/x/params/client/rest" ) // ProposalHandler is the param change proposal handler in cmsdk diff --git a/x/params/client/rest/rest.go b/x/params/client/rest/rest.go index 034141476c..ff4c646fb2 100644 --- a/x/params/client/rest/rest.go +++ b/x/params/client/rest/rest.go @@ -8,9 +8,9 @@ import ( "github.com/cosmos/cosmos-sdk/types/rest" "github.com/cosmos/cosmos-sdk/x/auth/client/utils" "github.com/cosmos/cosmos-sdk/x/params" - "github.com/okex/okchain/x/gov" - govrest "github.com/okex/okchain/x/gov/client/rest" - paramscutils "github.com/okex/okchain/x/params/client/utils" + "github.com/okex/okexchain/x/gov" + govrest "github.com/okex/okexchain/x/gov/client/rest" + paramscutils "github.com/okex/okexchain/x/params/client/utils" ) // ProposalRESTHandler returns a ProposalRESTHandler that exposes the param change REST handler with a given sub-route diff --git a/x/params/codec.go b/x/params/codec.go index ad1f752ab9..ce0401dd57 100644 --- a/x/params/codec.go +++ b/x/params/codec.go @@ -2,7 +2,7 @@ package params import ( "github.com/cosmos/cosmos-sdk/codec" - "github.com/okex/okchain/x/params/types" + "github.com/okex/okexchain/x/params/types" ) // ModuleCdc is the codec of module @@ -16,5 +16,5 @@ func init() { // RegisterCodec registers all necessary param module types with a given codec. func RegisterCodec(cdc *codec.Codec) { - cdc.RegisterConcrete(types.ParameterChangeProposal{}, "okchain/params/ParameterChangeProposal", nil) + cdc.RegisterConcrete(types.ParameterChangeProposal{}, "okexchain/params/ParameterChangeProposal", nil) } diff --git a/x/params/keeper.go b/x/params/keeper.go index fc60196c20..97c449b2f8 100644 --- a/x/params/keeper.go +++ b/x/params/keeper.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkparams "github.com/cosmos/cosmos-sdk/x/params" - "github.com/okex/okchain/x/params/types" + "github.com/okex/okexchain/x/params/types" ) // Keeper is the struct of params keeper diff --git a/x/params/module.go b/x/params/module.go index 5414dc2d0c..f61584f24c 100644 --- a/x/params/module.go +++ b/x/params/module.go @@ -4,8 +4,8 @@ import ( "encoding/json" "fmt" - "github.com/okex/okchain/x/params/client/cli" - "github.com/okex/okchain/x/params/types" + "github.com/okex/okexchain/x/params/client/cli" + "github.com/okex/okexchain/x/params/types" "github.com/gorilla/mux" "github.com/spf13/cobra" diff --git a/x/params/proposal_handler.go b/x/params/proposal_handler.go index 761a2f11e8..d58839e2b5 100644 --- a/x/params/proposal_handler.go +++ b/x/params/proposal_handler.go @@ -5,9 +5,9 @@ import ( "math" "time" - "github.com/okex/okchain/x/common" - govtypes "github.com/okex/okchain/x/gov/types" - "github.com/okex/okchain/x/params/types" + "github.com/okex/okexchain/x/common" + govtypes "github.com/okex/okexchain/x/gov/types" + "github.com/okex/okexchain/x/params/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkparams "github.com/cosmos/cosmos-sdk/x/params" diff --git a/x/params/querier.go b/x/params/querier.go index 761cfcd453..03b2b0284d 100644 --- a/x/params/querier.go +++ b/x/params/querier.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" abci "github.com/tendermint/tendermint/abci/types" - "github.com/okex/okchain/x/params/types" + "github.com/okex/okexchain/x/params/types" ) // NewQuerier returns all query handlers diff --git a/x/params/types/proposal.go b/x/params/types/proposal.go index 4b5ab999d9..2500521320 100644 --- a/x/params/types/proposal.go +++ b/x/params/types/proposal.go @@ -6,7 +6,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/params/types" - govtypes "github.com/okex/okchain/x/gov/types" + govtypes "github.com/okex/okexchain/x/gov/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkparams "github.com/cosmos/cosmos-sdk/x/params" @@ -17,7 +17,7 @@ var _ govtypes.Content = ParameterChangeProposal{} func init() { govtypes.RegisterProposalType(sdkparams.ProposalTypeChange) - govtypes.RegisterProposalTypeCodec(ParameterChangeProposal{}, "okchain/params/ParameterChangeProposal") + govtypes.RegisterProposalTypeCodec(ParameterChangeProposal{}, "okexchain/params/ParameterChangeProposal") } // ParameterChangeProposal is the struct of param change proposal diff --git a/x/staking/alias.go b/x/staking/alias.go index 21c6a9e10d..0a9be9688f 100644 --- a/x/staking/alias.go +++ b/x/staking/alias.go @@ -1,15 +1,15 @@ // nolint // autogenerated code using github.com/rigelrozanski/multitool // aliases generated for the following subdirectories: -// ALIASGEN: github.com/okex/okchain/x/staking/keeper -// ALIASGEN: github.com/okex/okchain/x/staking/types -// ALIASGEN: github.com/okex/okchain/x/staking/exported +// ALIASGEN: github.com/okex/okexchain/x/staking/keeper +// ALIASGEN: github.com/okex/okexchain/x/staking/types +// ALIASGEN: github.com/okex/okexchain/x/staking/exported package staking import ( - "github.com/okex/okchain/x/staking/exported" - "github.com/okex/okchain/x/staking/keeper" - "github.com/okex/okchain/x/staking/types" + "github.com/okex/okexchain/x/staking/exported" + "github.com/okex/okexchain/x/staking/keeper" + "github.com/okex/okexchain/x/staking/types" ) const ( diff --git a/x/staking/app_test.go b/x/staking/app_test.go index 1730a0ba29..c5750ab07d 100644 --- a/x/staking/app_test.go +++ b/x/staking/app_test.go @@ -6,8 +6,8 @@ import ( "github.com/cosmos/cosmos-sdk/x/auth/client/utils" "testing" - "github.com/okex/okchain/x/staking/keeper" - "github.com/okex/okchain/x/staking/types" + "github.com/okex/okexchain/x/staking/keeper" + "github.com/okex/okexchain/x/staking/types" "github.com/tendermint/tendermint/libs/log" "github.com/stretchr/testify/require" diff --git a/x/staking/client/cli/flags.go b/x/staking/client/cli/flags.go index 631b1197c2..6173090972 100644 --- a/x/staking/client/cli/flags.go +++ b/x/staking/client/cli/flags.go @@ -3,7 +3,7 @@ package cli import ( flag "github.com/spf13/pflag" - "github.com/okex/okchain/x/staking/types" + "github.com/okex/okexchain/x/staking/types" ) // nolint diff --git a/x/staking/client/cli/query.go b/x/staking/client/cli/query.go index 83d7161a63..4b29c4325c 100644 --- a/x/staking/client/cli/query.go +++ b/x/staking/client/cli/query.go @@ -12,7 +12,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/version" - "github.com/okex/okchain/x/staking/types" + "github.com/okex/okexchain/x/staking/types" ) // GetQueryCmd returns the cli query commands for staking module @@ -46,7 +46,7 @@ func GetCmdQueryValidator(storeName string, cdc *codec.Codec) *cobra.Command { fmt.Sprintf(`Query details about an individual validator. Example: -$ %s query staking validator okchainvaloper1alq9na49n9yycysh889rl90g9nhe58lcs50wu5 +$ %s query staking validator okexchainvaloper1alq9na49n9yycysh889rl90g9nhe58lcs50wu5 `, version.ClientName, ), @@ -183,7 +183,7 @@ func GetCmdQueryProxy(storeName string, cdc *codec.Codec) *cobra.Command { fmt.Sprintf(`Query the addresses of delegators by a specific proxy Example: -$ %s query staking proxy okchain1hw4r48aww06ldrfeuq2v438ujnl6alszzzqpph +$ %s query staking proxy okexchain1hw4r48aww06ldrfeuq2v438ujnl6alszzzqpph `, version.ClientName, ), @@ -238,7 +238,7 @@ func GetCmdQueryDelegator(storeName string, cdc *codec.Codec) *cobra.Command { fmt.Sprintf(`Query the information of delegations and all shares recently added by a delegator Example: -$ %s query staking delegator okchain1hw4r48aww06ldrfeuq2v438ujnl6alszzzqpph +$ %s query staking delegator okexchain1hw4r48aww06ldrfeuq2v438ujnl6alszzzqpph `, version.ClientName, ), @@ -351,7 +351,7 @@ func GetCmdQueryValidatorShares(queryRoute string, cdc *codec.Codec) *cobra.Comm fmt.Sprintf(`Query all shares added to a validator. Example: -$ %s query staking shares-added-to okchainvaloper1alq9na49n9yycysh889rl90g9nhe58lcs50wu5 +$ %s query staking shares-added-to okexchainvaloper1alq9na49n9yycysh889rl90g9nhe58lcs50wu5 `, version.ClientName, ), diff --git a/x/staking/client/cli/tx.go b/x/staking/client/cli/tx.go index 0218d5a31f..690f0cec90 100644 --- a/x/staking/client/cli/tx.go +++ b/x/staking/client/cli/tx.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/okex/okchain/x/common" + "github.com/okex/okexchain/x/common" "github.com/spf13/cobra" flag "github.com/spf13/pflag" @@ -19,7 +19,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/auth" "github.com/cosmos/cosmos-sdk/x/auth/client/utils" - "github.com/okex/okchain/x/staking/types" + "github.com/okex/okexchain/x/staking/types" ) // GetTxCmd returns the transaction commands for this module @@ -109,7 +109,7 @@ func GetCmdEditValidator(cdc *codec.Codec) *cobra.Command { // if !ok { // return fmt.Errorf(types.ErrMinSelfDelegationInvalid(types.DefaultCodespace).Error()) // } - // /* required by okchain */ + // /* required by okexchain */ // msb = msb.StandardizeAsc() // // newMinSelfDelegation = &msb diff --git a/x/staking/client/cli/tx_vote.go b/x/staking/client/cli/tx_vote.go index fa99025dfe..afb5e27afc 100644 --- a/x/staking/client/cli/tx_vote.go +++ b/x/staking/client/cli/tx_vote.go @@ -11,7 +11,7 @@ import ( "github.com/cosmos/cosmos-sdk/version" "github.com/cosmos/cosmos-sdk/x/auth" "github.com/cosmos/cosmos-sdk/x/auth/client/utils" - "github.com/okex/okchain/x/staking/types" + "github.com/okex/okexchain/x/staking/types" "github.com/spf13/cobra" ) @@ -20,9 +20,9 @@ func GetCmdDestroyValidator(cdc *codec.Codec) *cobra.Command { return &cobra.Command{ Use: "destroy-validator [flags]", Args: cobra.NoArgs, - Short: "deregister the validator from the OKChain and unbond the min self delegation", + Short: "deregister the validator from the OKExChain and unbond the min self delegation", Long: strings.TrimSpace( - fmt.Sprintf(`Deregister the validator from the OKChain and unbond the min self delegation. + fmt.Sprintf(`Deregister the validator from the OKExChain and unbond the min self delegation. Example: $ %s tx staking destroy-validator --from mykey @@ -115,10 +115,10 @@ func GetCmdAddShares(cdc *codec.Codec) *cobra.Command { Short: fmt.Sprintf("add shares to one or more validators by all deposited %s", sdk.DefaultBondDenom), Long: strings.TrimSpace( fmt.Sprintf("Add shares to one or more validators by all deposited %s.\n\nExample:\n$ %s tx staking add-shares "+ - "okchainvaloper1alq9na49n9yycysh889rl90g9nhe58lcs50wu5,"+ - "okchainvaloper1svzxp4ts5le2s4zugx34ajt6shz2hg42a3gl7g,"+ - "okchainvaloper10q0rk5qnyag7wfvvt7rtphlw589m7frs863s3m,"+ - "okchainvaloper1g7znsf24w4jc3xfca88pq9kmlyjdare6mph5rx --from mykey\n", + "okexchainvaloper1alq9na49n9yycysh889rl90g9nhe58lcs50wu5,"+ + "okexchainvaloper1svzxp4ts5le2s4zugx34ajt6shz2hg42a3gl7g,"+ + "okexchainvaloper10q0rk5qnyag7wfvvt7rtphlw589m7frs863s3m,"+ + "okexchainvaloper1g7znsf24w4jc3xfca88pq9kmlyjdare6mph5rx --from mykey\n", sdk.DefaultBondDenom, version.ClientName), ), RunE: func(cmd *cobra.Command, args []string) error { @@ -219,7 +219,7 @@ func GetCmdBindProxy(cdc *codec.Codec) *cobra.Command { fmt.Sprintf(`Bind proxy relationship. Example: -$ %s tx staking proxy bind okchain10q0rk5qnyag7wfvvt7rtphlw589m7frsmyq4ya --from mykey +$ %s tx staking proxy bind okexchain10q0rk5qnyag7wfvvt7rtphlw589m7frsku8qc9 --from mykey `, version.ClientName), ), diff --git a/x/staking/client/rest/query.go b/x/staking/client/rest/query.go index cc1e8f7e76..9b19e1a388 100644 --- a/x/staking/client/rest/query.go +++ b/x/staking/client/rest/query.go @@ -2,7 +2,7 @@ package rest import ( "fmt" - "github.com/okex/okchain/x/common" + "github.com/okex/okexchain/x/common" "net/http" "github.com/gorilla/mux" @@ -10,7 +10,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/context" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/rest" - "github.com/okex/okchain/x/staking/types" + "github.com/okex/okexchain/x/staking/types" ) func registerQueryRoutes(cliCtx context.CLIContext, r *mux.Router) { diff --git a/x/staking/client/rest/tx.go b/x/staking/client/rest/tx.go index 9451ba1255..15ba545fb3 100644 --- a/x/staking/client/rest/tx.go +++ b/x/staking/client/rest/tx.go @@ -11,7 +11,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/rest" "github.com/cosmos/cosmos-sdk/x/auth/client/utils" - "github.com/okex/okchain/x/staking/types" + "github.com/okex/okexchain/x/staking/types" ) func registerTxRoutes(cliCtx context.CLIContext, r *mux.Router) { diff --git a/x/staking/client/rest/utils.go b/x/staking/client/rest/utils.go index 19de793b91..3f03797c63 100644 --- a/x/staking/client/rest/utils.go +++ b/x/staking/client/rest/utils.go @@ -2,7 +2,7 @@ package rest import ( "fmt" - "github.com/okex/okchain/x/common" + "github.com/okex/okexchain/x/common" "net/http" "github.com/gorilla/mux" @@ -11,7 +11,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/rest" "github.com/cosmos/cosmos-sdk/x/auth/client/utils" - "github.com/okex/okchain/x/staking/types" + "github.com/okex/okexchain/x/staking/types" ) // contains checks if the a given query contains one of the tx types diff --git a/x/staking/common_test.go b/x/staking/common_test.go index 3bd5492e27..56d427f2f9 100644 --- a/x/staking/common_test.go +++ b/x/staking/common_test.go @@ -8,8 +8,8 @@ import ( "github.com/cosmos/cosmos-sdk/store" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/staking/keeper" - "github.com/okex/okchain/x/staking/types" + "github.com/okex/okexchain/x/staking/keeper" + "github.com/okex/okexchain/x/staking/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/tendermint/go-amino" diff --git a/x/staking/delegator_test.go b/x/staking/delegator_test.go index 754ab58af5..133c2f08ef 100644 --- a/x/staking/delegator_test.go +++ b/x/staking/delegator_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/okex/okchain/x/staking/types" + "github.com/okex/okexchain/x/staking/types" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/staking/genesis.go b/x/staking/genesis.go index 83e3ce7eb6..2cd98ab3e4 100644 --- a/x/staking/genesis.go +++ b/x/staking/genesis.go @@ -8,8 +8,8 @@ import ( tmtypes "github.com/tendermint/tendermint/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/staking/exported" - "github.com/okex/okchain/x/staking/types" + "github.com/okex/okexchain/x/staking/exported" + "github.com/okex/okexchain/x/staking/types" ) // InitGenesis sets the pool and parameters for the provided keeper diff --git a/x/staking/genesis_test.go b/x/staking/genesis_test.go index d884fbb7f5..6f6b95f997 100644 --- a/x/staking/genesis_test.go +++ b/x/staking/genesis_test.go @@ -5,13 +5,13 @@ import ( "testing" "time" - "github.com/okex/okchain/x/common" + "github.com/okex/okexchain/x/common" "github.com/cosmos/cosmos-sdk/x/supply" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/staking/exported" - "github.com/okex/okchain/x/staking/types" + "github.com/okex/okexchain/x/staking/exported" + "github.com/okex/okexchain/x/staking/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" diff --git a/x/staking/handler.go b/x/staking/handler.go index c8ad14a390..8efaf21ee6 100644 --- a/x/staking/handler.go +++ b/x/staking/handler.go @@ -6,8 +6,8 @@ import ( "github.com/tendermint/tendermint/libs/common" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/staking/keeper" - "github.com/okex/okchain/x/staking/types" + "github.com/okex/okexchain/x/staking/keeper" + "github.com/okex/okexchain/x/staking/types" abci "github.com/tendermint/tendermint/abci/types" tmtypes "github.com/tendermint/tendermint/types" ) diff --git a/x/staking/handler_shares.go b/x/staking/handler_shares.go index 1f789c84dd..290323c20b 100644 --- a/x/staking/handler_shares.go +++ b/x/staking/handler_shares.go @@ -4,8 +4,8 @@ import ( "time" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/staking/keeper" - "github.com/okex/okchain/x/staking/types" + "github.com/okex/okexchain/x/staking/keeper" + "github.com/okex/okexchain/x/staking/types" ) func handleMsgBindProxy(ctx sdk.Context, msg types.MsgBindProxy, k keeper.Keeper) sdk.Result { @@ -30,7 +30,7 @@ func handleMsgBindProxy(ctx sdk.Context, msg types.MsgBindProxy, k keeper.Keeper return types.ErrDelegatorNotAProxy(types.DefaultCodespace, msg.ProxyAddress.String()).Result() } - // double proxy is denied on okchain + // double proxy is denied on okexchain if delegator.IsProxy { return types.ErrDoubleProxy(types.DefaultCodespace, delegator.DelegatorAddress.String()).Result() } diff --git a/x/staking/handler_shares_test.go b/x/staking/handler_shares_test.go index 4e9dbc0b1b..4f431fd360 100644 --- a/x/staking/handler_shares_test.go +++ b/x/staking/handler_shares_test.go @@ -4,7 +4,7 @@ import ( "testing" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/staking/types" + "github.com/okex/okexchain/x/staking/types" "github.com/stretchr/testify/require" ) diff --git a/x/staking/handler_test.go b/x/staking/handler_test.go index 4669dd8617..f8070bff73 100644 --- a/x/staking/handler_test.go +++ b/x/staking/handler_test.go @@ -8,8 +8,8 @@ import ( "github.com/tendermint/tendermint/crypto/secp256k1" sdk "github.com/cosmos/cosmos-sdk/types" - keep "github.com/okex/okchain/x/staking/keeper" - "github.com/okex/okchain/x/staking/types" + keep "github.com/okex/okexchain/x/staking/keeper" + "github.com/okex/okexchain/x/staking/types" abci "github.com/tendermint/tendermint/abci/types" tmtypes "github.com/tendermint/tendermint/types" ) diff --git a/x/staking/keeper/alias_functions.go b/x/staking/keeper/alias_functions.go index e35d05d513..3c809d7cba 100644 --- a/x/staking/keeper/alias_functions.go +++ b/x/staking/keeper/alias_functions.go @@ -4,8 +4,8 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/staking/exported" - "github.com/okex/okchain/x/staking/types" + "github.com/okex/okexchain/x/staking/exported" + "github.com/okex/okexchain/x/staking/types" ) //_______________________________________________________________________ diff --git a/x/staking/keeper/delegation.go b/x/staking/keeper/delegation.go index fbf8053268..3ea83d8b12 100644 --- a/x/staking/keeper/delegation.go +++ b/x/staking/keeper/delegation.go @@ -4,7 +4,7 @@ import ( "time" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/staking/types" + "github.com/okex/okexchain/x/staking/types" ) // UpdateProxy updates the shares by the total delegated and self delegated tokens of a proxy diff --git a/x/staking/keeper/delegator.go b/x/staking/keeper/delegator.go index ccb9326b6d..ad955aa155 100644 --- a/x/staking/keeper/delegator.go +++ b/x/staking/keeper/delegator.go @@ -2,7 +2,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/staking/types" + "github.com/okex/okexchain/x/staking/types" ) // GetDelegator gets Delegator entity from store diff --git a/x/staking/keeper/hooks.go b/x/staking/keeper/hooks.go index eb948a9896..71358a306d 100644 --- a/x/staking/keeper/hooks.go +++ b/x/staking/keeper/hooks.go @@ -2,7 +2,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/staking/types" + "github.com/okex/okexchain/x/staking/types" ) // Implements StakingHooks interface diff --git a/x/staking/keeper/invariants.go b/x/staking/keeper/invariants.go index 655f734b0d..b55224daae 100644 --- a/x/staking/keeper/invariants.go +++ b/x/staking/keeper/invariants.go @@ -5,12 +5,12 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/staking/exported" + "github.com/okex/okexchain/x/staking/exported" - "github.com/okex/okchain/x/staking/types" + "github.com/okex/okexchain/x/staking/types" ) -// RegisterInvariantsCustom registers all staking invariants for okchain +// RegisterInvariantsCustom registers all staking invariants for okexchain func RegisterInvariantsCustom(ir sdk.InvariantRegistry, k Keeper) { ir.RegisterRoute(types.ModuleName, "module-accounts", diff --git a/x/staking/keeper/invariants_test.go b/x/staking/keeper/invariants_test.go index 69c35918f9..e3861f0369 100644 --- a/x/staking/keeper/invariants_test.go +++ b/x/staking/keeper/invariants_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/okex/okchain/x/staking/types" + "github.com/okex/okexchain/x/staking/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" diff --git a/x/staking/keeper/keeper.go b/x/staking/keeper/keeper.go index 6cfd33837d..35c05a293a 100644 --- a/x/staking/keeper/keeper.go +++ b/x/staking/keeper/keeper.go @@ -5,13 +5,13 @@ import ( "fmt" "strings" - "github.com/okex/okchain/x/staking/exported" + "github.com/okex/okexchain/x/staking/exported" "github.com/tendermint/tendermint/libs/log" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/params" - "github.com/okex/okchain/x/staking/types" + "github.com/okex/okexchain/x/staking/types" ) const aminoCacheSize = 500 diff --git a/x/staking/keeper/min_self_delegation.go b/x/staking/keeper/min_self_delegation.go index 52310a224e..0a51541e42 100644 --- a/x/staking/keeper/min_self_delegation.go +++ b/x/staking/keeper/min_self_delegation.go @@ -4,7 +4,7 @@ import ( "time" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/staking/types" + "github.com/okex/okexchain/x/staking/types" ) // WithdrawMinSelfDelegation withdraws the msd from validator diff --git a/x/staking/keeper/params.go b/x/staking/keeper/params.go index d65b31e4fb..7516c69ce3 100644 --- a/x/staking/keeper/params.go +++ b/x/staking/keeper/params.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/params" - "github.com/okex/okchain/x/staking/types" + "github.com/okex/okexchain/x/staking/types" ) // Default parameter namespace diff --git a/x/staking/keeper/pool.go b/x/staking/keeper/pool.go index 251dfcc767..a1f74e0cf2 100644 --- a/x/staking/keeper/pool.go +++ b/x/staking/keeper/pool.go @@ -3,7 +3,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/supply/exported" - "github.com/okex/okchain/x/staking/types" + "github.com/okex/okexchain/x/staking/types" ) // GetBondedPool returns the bonded tokens pool's module account diff --git a/x/staking/keeper/proxy.go b/x/staking/keeper/proxy.go index 76d20a78ad..6f4793c70c 100644 --- a/x/staking/keeper/proxy.go +++ b/x/staking/keeper/proxy.go @@ -2,7 +2,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/staking/types" + "github.com/okex/okexchain/x/staking/types" ) // ClearProxy clears the ProxyAddress on the delegator who has bound diff --git a/x/staking/keeper/proxy_test.go b/x/staking/keeper/proxy_test.go index 673dd8d926..0a7177fc5d 100644 --- a/x/staking/keeper/proxy_test.go +++ b/x/staking/keeper/proxy_test.go @@ -2,7 +2,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/staking/types" + "github.com/okex/okexchain/x/staking/types" "github.com/stretchr/testify/require" "testing" diff --git a/x/staking/keeper/querier.go b/x/staking/keeper/querier.go index 84f30676cc..532f315075 100644 --- a/x/staking/keeper/querier.go +++ b/x/staking/keeper/querier.go @@ -10,7 +10,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/staking/types" + "github.com/okex/okexchain/x/staking/types" ) // NewQuerier creates a querier for staking REST endpoints @@ -25,7 +25,7 @@ func NewQuerier(k Keeper) sdk.Querier { return queryPool(ctx, k) case types.QueryParameters: return queryParameters(ctx, k) - // required by okchain + // required by okexchain case types.QueryUnbondingDelegation: return queryUndelegation(ctx, req, k) case types.QueryValidatorAllShares: diff --git a/x/staking/keeper/querier_test.go b/x/staking/keeper/querier_test.go index e6de4f0e6f..0110d87f97 100644 --- a/x/staking/keeper/querier_test.go +++ b/x/staking/keeper/querier_test.go @@ -3,10 +3,10 @@ package keeper import ( "testing" - "github.com/okex/okchain/x/common" + "github.com/okex/okexchain/x/common" types2 "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/staking/types" + "github.com/okex/okexchain/x/staking/types" "github.com/stretchr/testify/require" "github.com/tendermint/go-amino" abci "github.com/tendermint/tendermint/abci/types" diff --git a/x/staking/keeper/shares.go b/x/staking/keeper/shares.go index 56f567eb78..997d2f360f 100644 --- a/x/staking/keeper/shares.go +++ b/x/staking/keeper/shares.go @@ -2,7 +2,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/staking/types" + "github.com/okex/okexchain/x/staking/types" ) // GetShares gets the shares entity diff --git a/x/staking/keeper/shares_test.go b/x/staking/keeper/shares_test.go index 232a30e2d5..0689880736 100644 --- a/x/staking/keeper/shares_test.go +++ b/x/staking/keeper/shares_test.go @@ -4,7 +4,7 @@ import ( "testing" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/staking/types" + "github.com/okex/okexchain/x/staking/types" "github.com/stretchr/testify/require" ) diff --git a/x/staking/keeper/test_common.go b/x/staking/keeper/test_common.go index 5cca042009..1eea82d9c8 100644 --- a/x/staking/keeper/test_common.go +++ b/x/staking/keeper/test_common.go @@ -8,7 +8,7 @@ import ( "testing" "time" - "github.com/okex/okchain/x/staking/types" + "github.com/okex/okexchain/x/staking/types" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" @@ -25,7 +25,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/bank" "github.com/cosmos/cosmos-sdk/x/params" "github.com/cosmos/cosmos-sdk/x/supply" - //distr "github.com/okex/okchain/x/distribution" + //distr "github.com/okex/okexchain/x/distribution" ) // dummy addresses used for testing diff --git a/x/staking/keeper/val_state.go b/x/staking/keeper/val_state.go index 3d14fdb47e..b357ff60b9 100644 --- a/x/staking/keeper/val_state.go +++ b/x/staking/keeper/val_state.go @@ -4,7 +4,7 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/staking/types" + "github.com/okex/okexchain/x/staking/types" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/libs/log" ) diff --git a/x/staking/keeper/val_state_change.go b/x/staking/keeper/val_state_change.go index 9cd31ecb14..dd17bcdd14 100644 --- a/x/staking/keeper/val_state_change.go +++ b/x/staking/keeper/val_state_change.go @@ -6,7 +6,7 @@ import ( "sort" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/staking/types" + "github.com/okex/okexchain/x/staking/types" abci "github.com/tendermint/tendermint/abci/types" ) diff --git a/x/staking/keeper/validator.go b/x/staking/keeper/validator.go index b8544477de..d7153ce7fd 100644 --- a/x/staking/keeper/validator.go +++ b/x/staking/keeper/validator.go @@ -6,7 +6,7 @@ import ( "time" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/staking/types" + "github.com/okex/okexchain/x/staking/types" ) // Cache the amino decoding of validators, as it can be the case that repeated slashing calls @@ -306,7 +306,7 @@ func (k Keeper) UnbondAllMatureValidatorQueue(ctx sdk.Context) { panic("unexpected validator in unbonding queue; status was not unbonding") } val = k.unbondingToUnbonded(ctx, val) - // required by okchain + // required by okexchain //if val.GetDelegatorShares().IsZero() { // k.RemoveValidator(ctx, val.OperatorAddress) //} diff --git a/x/staking/keeper/weight.go b/x/staking/keeper/weight.go index f865b0e55d..476f5dc2d1 100644 --- a/x/staking/keeper/weight.go +++ b/x/staking/keeper/weight.go @@ -5,7 +5,7 @@ import ( "math" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/staking/types" + "github.com/okex/okexchain/x/staking/types" ) const ( diff --git a/x/staking/legacy/v0_11/migrate.go b/x/staking/legacy/v0_11/migrate.go index e2bfc60d22..08a5df08e4 100644 --- a/x/staking/legacy/v0_11/migrate.go +++ b/x/staking/legacy/v0_11/migrate.go @@ -1,6 +1,6 @@ package v0_11 -import "github.com/okex/okchain/x/staking/legacy/v0_10" +import "github.com/okex/okexchain/x/staking/legacy/v0_10" func Migrate(oldGenState v0_10.GenesisState) GenesisState { params := Params{ diff --git a/x/staking/legacy/v0_11/types.go b/x/staking/legacy/v0_11/types.go index dd28de17cd..9ced0ab205 100644 --- a/x/staking/legacy/v0_11/types.go +++ b/x/staking/legacy/v0_11/types.go @@ -3,7 +3,7 @@ package v0_11 import ( "time" - "github.com/okex/okchain/x/staking/legacy/v0_10" + "github.com/okex/okexchain/x/staking/legacy/v0_10" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/staking/module.go b/x/staking/module.go index 7b99fd32b5..559bdee04c 100644 --- a/x/staking/module.go +++ b/x/staking/module.go @@ -3,7 +3,7 @@ package staking import ( "encoding/json" - "github.com/okex/okchain/x/staking/keeper" + "github.com/okex/okexchain/x/staking/keeper" "github.com/gorilla/mux" "github.com/spf13/cobra" @@ -18,9 +18,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/okex/okchain/x/staking/client/cli" - "github.com/okex/okchain/x/staking/client/rest" - "github.com/okex/okchain/x/staking/types" + "github.com/okex/okexchain/x/staking/client/cli" + "github.com/okex/okexchain/x/staking/client/rest" + "github.com/okex/okexchain/x/staking/types" ) var ( @@ -114,7 +114,7 @@ func NewAppModule(keeper Keeper, accKeeper types.AccountKeeper, // RegisterInvariants registers invariants func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) { - // required by okchain + // required by okexchain keeper.RegisterInvariantsCustom(ir, am.keeper) } diff --git a/x/staking/types/codec.go b/x/staking/types/codec.go index 861c074af9..5906ce9acf 100644 --- a/x/staking/types/codec.go +++ b/x/staking/types/codec.go @@ -6,15 +6,15 @@ import ( // RegisterCodec registers concrete types for codec func RegisterCodec(cdc *codec.Codec) { - cdc.RegisterConcrete(MsgCreateValidator{}, "okchain/staking/MsgCreateValidator", nil) - cdc.RegisterConcrete(MsgEditValidator{}, "okchain/staking/MsgEditValidator", nil) - cdc.RegisterConcrete(MsgDestroyValidator{}, "okchain/staking/MsgDestroyValidator", nil) - cdc.RegisterConcrete(MsgDeposit{}, "okchain/staking/MsgDeposit", nil) - cdc.RegisterConcrete(MsgWithdraw{}, "okchain/staking/MsgWithdraw", nil) - cdc.RegisterConcrete(MsgAddShares{}, "okchain/staking/MsgAddShares", nil) - cdc.RegisterConcrete(MsgRegProxy{}, "okchain/staking/MsgRegProxy", nil) - cdc.RegisterConcrete(MsgBindProxy{}, "okchain/staking/MsgBindProxy", nil) - cdc.RegisterConcrete(MsgUnbindProxy{}, "okchain/staking/MsgUnbindProxy", nil) + cdc.RegisterConcrete(MsgCreateValidator{}, "okexchain/staking/MsgCreateValidator", nil) + cdc.RegisterConcrete(MsgEditValidator{}, "okexchain/staking/MsgEditValidator", nil) + cdc.RegisterConcrete(MsgDestroyValidator{}, "okexchain/staking/MsgDestroyValidator", nil) + cdc.RegisterConcrete(MsgDeposit{}, "okexchain/staking/MsgDeposit", nil) + cdc.RegisterConcrete(MsgWithdraw{}, "okexchain/staking/MsgWithdraw", nil) + cdc.RegisterConcrete(MsgAddShares{}, "okexchain/staking/MsgAddShares", nil) + cdc.RegisterConcrete(MsgRegProxy{}, "okexchain/staking/MsgRegProxy", nil) + cdc.RegisterConcrete(MsgBindProxy{}, "okexchain/staking/MsgBindProxy", nil) + cdc.RegisterConcrete(MsgUnbindProxy{}, "okexchain/staking/MsgUnbindProxy", nil) } // ModuleCdc is generic sealed codec to be used throughout this module diff --git a/x/staking/types/delegator.go b/x/staking/types/delegator.go index 4a79a206bf..7fe782010b 100644 --- a/x/staking/types/delegator.go +++ b/x/staking/types/delegator.go @@ -3,7 +3,7 @@ package types import ( "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/staking/exported" + "github.com/okex/okexchain/x/staking/exported" ) var _ exported.DelegatorI = &Delegator{} diff --git a/x/staking/types/expected_keepers.go b/x/staking/types/expected_keepers.go index 29137c9787..e520791110 100644 --- a/x/staking/types/expected_keepers.go +++ b/x/staking/types/expected_keepers.go @@ -4,7 +4,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" authexported "github.com/cosmos/cosmos-sdk/x/auth/exported" supplyexported "github.com/cosmos/cosmos-sdk/x/supply/exported" - stakingexported "github.com/okex/okchain/x/staking/exported" + stakingexported "github.com/okex/okexchain/x/staking/exported" ) // AccountKeeper defines the expected account keeper (noalias) @@ -83,7 +83,7 @@ type StakingHooks interface { // Must be called when a validator begins unbonding AfterValidatorBeginUnbonding(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) - // required by okchain + // required by okexchain // Must be called when a validator is destroyed by tx AfterValidatorDestroyed(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) } diff --git a/x/staking/types/hooks.go b/x/staking/types/hooks.go index d9a56aab13..b7771753ef 100644 --- a/x/staking/types/hooks.go +++ b/x/staking/types/hooks.go @@ -5,7 +5,7 @@ import ( ) // MultiStakingHooks combines multiple staking hooks, all hook functions are run in array sequence -// TODO:need to trim the staking hooks as the okchain design +// TODO:need to trim the staking hooks as the okexchain design type MultiStakingHooks []StakingHooks // NewMultiStakingHooks creates a new object of MultiStakingHooks diff --git a/x/staking/types/keys.go b/x/staking/types/keys.go index bade6f8464..5e6ee0aa03 100644 --- a/x/staking/types/keys.go +++ b/x/staking/types/keys.go @@ -86,7 +86,7 @@ func GetValidatorQueueTimeKey(timestamp time.Time) []byte { return append(ValidatorQueueKey, bz...) } -// getValidatorPowerRank gets the power ranking of a validator by okchain's rule +// getValidatorPowerRank gets the power ranking of a validator by okexchain's rule // just according to the shares instead of tokens on a validator func getValidatorPowerRank(validator Validator) []byte { // consensus power based on the shares on a validator diff --git a/x/staking/types/validator.go b/x/staking/types/validator.go index 255da369be..7eb6e5abf1 100644 --- a/x/staking/types/validator.go +++ b/x/staking/types/validator.go @@ -13,7 +13,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/staking/exported" + "github.com/okex/okexchain/x/staking/exported" ) // nolint diff --git a/x/staking/types/validator_test.go b/x/staking/types/validator_test.go index 14e89f67fa..611e9685ed 100644 --- a/x/staking/types/validator_test.go +++ b/x/staking/types/validator_test.go @@ -129,7 +129,7 @@ func TestValidatorMarshalUnmarshalJSON(t *testing.T) { js, err := codec.Cdc.MarshalJSON(validator) require.NoError(t, err) require.NotEmpty(t, js) - require.Contains(t, string(js), "\"consensus_pubkey\":\"okchainvalconspub") + require.Contains(t, string(js), "\"consensus_pubkey\":\"okexchainvalconspub") got := &Validator{} err = codec.Cdc.UnmarshalJSON(js, got) assert.NoError(t, err) diff --git a/x/staking/validator_state_machine_test.go b/x/staking/validator_state_machine_test.go index 5b31ee7146..ed531f7335 100644 --- a/x/staking/validator_state_machine_test.go +++ b/x/staking/validator_state_machine_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/okex/okchain/x/staking/types" + "github.com/okex/okexchain/x/staking/types" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/staking/validator_test.go b/x/staking/validator_test.go index ee321d8aab..da8e20c008 100644 --- a/x/staking/validator_test.go +++ b/x/staking/validator_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/okex/okchain/x/staking/types" + "github.com/okex/okexchain/x/staking/types" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/stream/expected_keeper.go b/x/stream/expected_keeper.go index e34d430ebd..a00d122103 100644 --- a/x/stream/expected_keeper.go +++ b/x/stream/expected_keeper.go @@ -5,10 +5,10 @@ package stream import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/auth" - "github.com/okex/okchain/x/dex" - "github.com/okex/okchain/x/order" - "github.com/okex/okchain/x/stream/exported" - "github.com/okex/okchain/x/token" + "github.com/okex/okexchain/x/dex" + "github.com/okex/okexchain/x/order" + "github.com/okex/okexchain/x/stream/exported" + "github.com/okex/okexchain/x/token" ) type OrderKeeper interface { diff --git a/x/stream/exported/exported.go b/x/stream/exported/exported.go index 794e6f1716..27061bdca9 100644 --- a/x/stream/exported/exported.go +++ b/x/stream/exported/exported.go @@ -2,7 +2,7 @@ package exported import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/dex/types" + "github.com/okex/okexchain/x/dex/types" ) type StreamKeeper interface { diff --git a/x/stream/keeper_skeleton.go b/x/stream/keeper_skeleton.go index fcb8d4dc69..0cfade395e 100644 --- a/x/stream/keeper_skeleton.go +++ b/x/stream/keeper_skeleton.go @@ -7,8 +7,8 @@ import ( "github.com/cosmos/cosmos-sdk/server/config" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/auth" - "github.com/okex/okchain/x/backend" - "github.com/okex/okchain/x/common/monitor" + "github.com/okex/okexchain/x/backend" + "github.com/okex/okexchain/x/common/monitor" "github.com/tendermint/tendermint/libs/log" ) diff --git a/x/token/alias.go b/x/token/alias.go index b459ea8fd8..f721b9dbf7 100644 --- a/x/token/alias.go +++ b/x/token/alias.go @@ -1,6 +1,6 @@ package token -import "github.com/okex/okchain/x/token/types" +import "github.com/okex/okexchain/x/token/types" const ( // ModuleName is the module name constant used in many places diff --git a/x/token/beginblocker.go b/x/token/beginblocker.go index e46909d9f4..3d1fc35e94 100644 --- a/x/token/beginblocker.go +++ b/x/token/beginblocker.go @@ -2,8 +2,8 @@ package token import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/common/perf" - "github.com/okex/okchain/x/token/types" + "github.com/okex/okexchain/x/common/perf" + "github.com/okex/okexchain/x/token/types" ) // BeginBlocker is called when dapp handles with abci::BeginBlock diff --git a/x/token/client/cli/query.go b/x/token/client/cli/query.go index 9c86e8b85a..9dd9efd551 100644 --- a/x/token/client/cli/query.go +++ b/x/token/client/cli/query.go @@ -8,7 +8,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/context" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/x/auth" - "github.com/okex/okchain/x/token/types" + "github.com/okex/okexchain/x/token/types" "github.com/spf13/cobra" ) @@ -85,7 +85,7 @@ func getCmdQueryParams(queryRoute string, cdc *codec.Codec) *cobra.Command { Short: "Query the parameters of the token process", Long: strings.TrimSpace(`Query the all the parameters for the governance process: -$ okchaincli query token params +$ okexchaincli query token params `), Args: cobra.NoArgs, RunE: func(cmd *cobra.Command, args []string) error { diff --git a/x/token/client/cli/tx.go b/x/token/client/cli/tx.go index 0ab510e934..884bded614 100644 --- a/x/token/client/cli/tx.go +++ b/x/token/client/cli/tx.go @@ -13,7 +13,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/auth" authTypes "github.com/cosmos/cosmos-sdk/x/auth" "github.com/cosmos/cosmos-sdk/x/auth/client/utils" - "github.com/okex/okchain/x/token/types" + "github.com/okex/okexchain/x/token/types" "github.com/pkg/errors" "github.com/spf13/cobra" ) diff --git a/x/token/client/rest/rest.go b/x/token/client/rest/rest.go index 479a15df98..fd7df76b5c 100644 --- a/x/token/client/rest/rest.go +++ b/x/token/client/rest/rest.go @@ -4,7 +4,7 @@ import ( "fmt" "net/http" - "github.com/okex/okchain/x/token/types" + "github.com/okex/okexchain/x/token/types" "encoding/json" "strings" @@ -14,7 +14,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/context" "github.com/cosmos/cosmos-sdk/types/rest" "github.com/gorilla/mux" - "github.com/okex/okchain/x/common" + "github.com/okex/okexchain/x/common" ) // RegisterRoutes, a central function to define routes diff --git a/x/token/client/rest/rest_doc.go b/x/token/client/rest/rest_doc.go index fce9cf9dbe..34ac502266 100644 --- a/x/token/client/rest/rest_doc.go +++ b/x/token/client/rest/rest_doc.go @@ -27,7 +27,7 @@ package rest import ( - "github.com/okex/okchain/x/token/types" + "github.com/okex/okexchain/x/token/types" ) // A Products is the info of the market. diff --git a/x/token/client/rest/rest_v2.go b/x/token/client/rest/rest_v2.go index 5835867654..d523fe6de8 100644 --- a/x/token/client/rest/rest_v2.go +++ b/x/token/client/rest/rest_v2.go @@ -4,12 +4,12 @@ import ( "fmt" "net/http" - "github.com/okex/okchain/x/token/types" + "github.com/okex/okexchain/x/token/types" "github.com/cosmos/cosmos-sdk/client/context" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/gorilla/mux" - "github.com/okex/okchain/x/common" + "github.com/okex/okexchain/x/common" ) // RegisterRoutesV2, a central function to define routes diff --git a/x/token/genesis.go b/x/token/genesis.go index cbc19389df..171aa2c6f6 100644 --- a/x/token/genesis.go +++ b/x/token/genesis.go @@ -5,12 +5,12 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/common" - "github.com/okex/okchain/x/token/types" + "github.com/okex/okexchain/x/common" + "github.com/okex/okexchain/x/token/types" ) // default owner of okt -const DefaultTokenOwner = "okchain10q0rk5qnyag7wfvvt7rtphlw589m7frsmyq4ya" +const DefaultTokenOwner = "okexchain10q0rk5qnyag7wfvvt7rtphlw589m7frsku8qc9" // all state that must be provided in genesis file type GenesisState struct { diff --git a/x/token/genesis_test.go b/x/token/genesis_test.go index 4cc089efc2..4a310e6a56 100644 --- a/x/token/genesis_test.go +++ b/x/token/genesis_test.go @@ -4,7 +4,7 @@ import ( "testing" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/token/types" + "github.com/okex/okexchain/x/token/types" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" ) diff --git a/x/token/handler.go b/x/token/handler.go index 002c987aed..813aeb346e 100644 --- a/x/token/handler.go +++ b/x/token/handler.go @@ -4,9 +4,9 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/common/perf" - "github.com/okex/okchain/x/common/version" - "github.com/okex/okchain/x/token/types" + "github.com/okex/okexchain/x/common/perf" + "github.com/okex/okexchain/x/common/version" + "github.com/okex/okexchain/x/token/types" "github.com/tendermint/tendermint/libs/log" ) diff --git a/x/token/keeper.go b/x/token/keeper.go index 5d3abd90bb..ab229d4790 100644 --- a/x/token/keeper.go +++ b/x/token/keeper.go @@ -8,8 +8,8 @@ import ( "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/bank" - "github.com/okex/okchain/x/params" - "github.com/okex/okchain/x/token/types" + "github.com/okex/okexchain/x/params" + "github.com/okex/okexchain/x/token/types" "github.com/pkg/errors" "github.com/tendermint/tendermint/crypto/tmhash" ) diff --git a/x/token/keeper_test.go b/x/token/keeper_test.go index 995f9d98a5..6d8c60cb1f 100644 --- a/x/token/keeper_test.go +++ b/x/token/keeper_test.go @@ -10,8 +10,8 @@ import ( "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" - "github.com/okex/okchain/x/common" - "github.com/okex/okchain/x/token/types" + "github.com/okex/okexchain/x/common" + "github.com/okex/okexchain/x/token/types" ) func TestKeeper_GetFeeDetailList(t *testing.T) { diff --git a/x/token/legacy/v0_10/types.go b/x/token/legacy/v0_10/types.go index 1c75e898d5..2af3dc0f73 100644 --- a/x/token/legacy/v0_10/types.go +++ b/x/token/legacy/v0_10/types.go @@ -28,7 +28,7 @@ type ( WholeName string `json:"whole_name" v2:"whole_name"` // e.g. "OKT" OriginalTotalSupply sdk.Dec `json:"original_total_supply" v2:"original_total_supply"` // e.g. 1000000000.00000000 TotalSupply sdk.Dec `json:"total_supply" v2:"total_supply"` // e.g. 1000000000.00000000 - Owner sdk.AccAddress `json:"owner" v2:"owner"` // e.g. okchain1upyg3vl6vqaxqvzts69zpus2c027p7paw63s99 + Owner sdk.AccAddress `json:"owner" v2:"owner"` // e.g. okexchain1upyg3vl6vqaxqvzts69zpus2c027p7paw63s99 Mintable bool `json:"mintable" v2:"mintable"` // e.g. false } diff --git a/x/token/legacy/v0_11/migrate.go b/x/token/legacy/v0_11/migrate.go index 7ecb93a45e..1444bbdcc8 100644 --- a/x/token/legacy/v0_11/migrate.go +++ b/x/token/legacy/v0_11/migrate.go @@ -1,6 +1,6 @@ package v0_11 -import "github.com/okex/okchain/x/token/legacy/v0_10" +import "github.com/okex/okexchain/x/token/legacy/v0_10" func Migrate(oldGenState v0_10.GenesisState) GenesisState { tokens := make([]Token, len(oldGenState.Tokens)) diff --git a/x/token/legacy/v0_11/types.go b/x/token/legacy/v0_11/types.go index 8c9cf180e6..8d48727d38 100644 --- a/x/token/legacy/v0_11/types.go +++ b/x/token/legacy/v0_11/types.go @@ -2,7 +2,7 @@ package v0_11 import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/token/legacy/v0_10" + "github.com/okex/okexchain/x/token/legacy/v0_10" ) const ModuleName = "token" @@ -22,7 +22,7 @@ type ( OriginalSymbol string `json:"original_symbol" v2:"original_symbol"` // e.g. "OKT" WholeName string `json:"whole_name" v2:"whole_name"` // e.g. "OKT" OriginalTotalSupply sdk.Dec `json:"original_total_supply" v2:"original_total_supply"` // e.g. 1000000000.00000000 - Owner sdk.AccAddress `json:"owner" v2:"owner"` // e.g. okchain1upyg3vl6vqaxqvzts69zpus2c027p7paw63s99 + Owner sdk.AccAddress `json:"owner" v2:"owner"` // e.g. okexchain1upyg3vl6vqaxqvzts69zpus2c027p7paw63s99 Mintable bool `json:"mintable" v2:"mintable"` // e.g. false } ) diff --git a/x/token/module.go b/x/token/module.go index c081e229f6..fb562b3b64 100644 --- a/x/token/module.go +++ b/x/token/module.go @@ -8,8 +8,8 @@ import ( authTypes "github.com/cosmos/cosmos-sdk/x/auth/types" abci "github.com/tendermint/tendermint/abci/types" - "github.com/okex/okchain/x/common/version" - tokenTypes "github.com/okex/okchain/x/token/types" + "github.com/okex/okexchain/x/common/version" + tokenTypes "github.com/okex/okexchain/x/token/types" ) var ( diff --git a/x/token/module_basic.go b/x/token/module_basic.go index b8bad8cb67..48c6b07ca5 100644 --- a/x/token/module_basic.go +++ b/x/token/module_basic.go @@ -9,9 +9,9 @@ import ( "github.com/gorilla/mux" "github.com/spf13/cobra" - "github.com/okex/okchain/x/token/client/cli" - "github.com/okex/okchain/x/token/client/rest" - tokenTypes "github.com/okex/okchain/x/token/types" + "github.com/okex/okexchain/x/token/client/cli" + "github.com/okex/okexchain/x/token/client/rest" + tokenTypes "github.com/okex/okexchain/x/token/types" ) var ( diff --git a/x/token/module_test.go b/x/token/module_test.go index 3cdd75acea..95b0300026 100644 --- a/x/token/module_test.go +++ b/x/token/module_test.go @@ -6,8 +6,8 @@ import ( "github.com/cosmos/cosmos-sdk/codec" cliLcd "github.com/cosmos/cosmos-sdk/client/lcd" - "github.com/okex/okchain/x/common/version" - "github.com/okex/okchain/x/token/types" + "github.com/okex/okexchain/x/common/version" + "github.com/okex/okexchain/x/token/types" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" ) diff --git a/x/token/querier.go b/x/token/querier.go index b3af9043fa..46e0d48583 100644 --- a/x/token/querier.go +++ b/x/token/querier.go @@ -3,7 +3,7 @@ package token import ( "fmt" - "github.com/okex/okchain/x/token/types" + "github.com/okex/okexchain/x/token/types" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/x/token/querier_test.go b/x/token/querier_test.go index 83e36b10b3..3def707efd 100644 --- a/x/token/querier_test.go +++ b/x/token/querier_test.go @@ -3,11 +3,11 @@ package token import ( "testing" - "github.com/okex/okchain/x/token/types" + "github.com/okex/okexchain/x/token/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/mock" - "github.com/okex/okchain/x/common" + "github.com/okex/okexchain/x/common" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" ) diff --git a/x/token/querier_v2.go b/x/token/querier_v2.go index 6cf5aefac8..1afa740708 100644 --- a/x/token/querier_v2.go +++ b/x/token/querier_v2.go @@ -5,8 +5,8 @@ import ( "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/common" - "github.com/okex/okchain/x/token/types" + "github.com/okex/okexchain/x/common" + "github.com/okex/okexchain/x/token/types" abci "github.com/tendermint/tendermint/abci/types" ) diff --git a/x/token/test_common.go b/x/token/test_common.go index acf445dd22..831b3a7bff 100644 --- a/x/token/test_common.go +++ b/x/token/test_common.go @@ -9,15 +9,15 @@ import ( "github.com/cosmos/cosmos-sdk/x/auth" "github.com/cosmos/cosmos-sdk/x/bank" "github.com/cosmos/cosmos-sdk/x/supply" - "github.com/okex/okchain/x/params" - "github.com/okex/okchain/x/staking" - "github.com/okex/okchain/x/token/types" + "github.com/okex/okexchain/x/params" + "github.com/okex/okexchain/x/staking" + "github.com/okex/okexchain/x/token/types" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" dbm "github.com/tendermint/tm-db" ) -// CreateParam create okchain parm for test +// CreateParam create okexchain parm for test func CreateParam(t *testing.T, isCheckTx bool) (sdk.Context, Keeper, *sdk.KVStoreKey, []byte) { keyStaking := sdk.NewKVStoreKey(staking.StoreKey) tkeyStaking := sdk.NewTransientStoreKey(staking.TStoreKey) diff --git a/x/token/token_test.go b/x/token/token_test.go index f47d6fcc08..9d69c36879 100644 --- a/x/token/token_test.go +++ b/x/token/token_test.go @@ -15,13 +15,13 @@ import ( "github.com/cosmos/cosmos-sdk/x/mock" "github.com/cosmos/cosmos-sdk/x/supply" "github.com/cosmos/cosmos-sdk/x/supply/exported" - "github.com/okex/okchain/x/common" - "github.com/okex/okchain/x/common/version" - "github.com/okex/okchain/x/gov" - govKeeper "github.com/okex/okchain/x/gov/keeper" - "github.com/okex/okchain/x/params" - "github.com/okex/okchain/x/staking" - "github.com/okex/okchain/x/token/types" + "github.com/okex/okexchain/x/common" + "github.com/okex/okexchain/x/common/version" + "github.com/okex/okexchain/x/gov" + govKeeper "github.com/okex/okexchain/x/gov/keeper" + "github.com/okex/okexchain/x/params" + "github.com/okex/okexchain/x/staking" + "github.com/okex/okexchain/x/token/types" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/crypto/secp256k1" diff --git a/x/token/types/codec.go b/x/token/types/codec.go index d490ffaa1e..7629dda019 100644 --- a/x/token/types/codec.go +++ b/x/token/types/codec.go @@ -6,16 +6,16 @@ import ( // RegisterCodec registers concrete types on the Amino codec func RegisterCodec(cdc *codec.Codec) { - cdc.RegisterConcrete(MsgTokenIssue{}, "okchain/token/MsgIssue", nil) - cdc.RegisterConcrete(MsgTokenBurn{}, "okchain/token/MsgBurn", nil) - cdc.RegisterConcrete(MsgTokenMint{}, "okchain/token/MsgMint", nil) - cdc.RegisterConcrete(MsgMultiSend{}, "okchain/token/MsgMultiTransfer", nil) - cdc.RegisterConcrete(MsgSend{}, "okchain/token/MsgTransfer", nil) - cdc.RegisterConcrete(MsgTransferOwnership{}, "okchain/token/MsgTransferOwnership", nil) - cdc.RegisterConcrete(MsgTokenModify{}, "okchain/token/MsgModify", nil) + cdc.RegisterConcrete(MsgTokenIssue{}, "okexchain/token/MsgIssue", nil) + cdc.RegisterConcrete(MsgTokenBurn{}, "okexchain/token/MsgBurn", nil) + cdc.RegisterConcrete(MsgTokenMint{}, "okexchain/token/MsgMint", nil) + cdc.RegisterConcrete(MsgMultiSend{}, "okexchain/token/MsgMultiTransfer", nil) + cdc.RegisterConcrete(MsgSend{}, "okexchain/token/MsgTransfer", nil) + cdc.RegisterConcrete(MsgTransferOwnership{}, "okexchain/token/MsgTransferOwnership", nil) + cdc.RegisterConcrete(MsgTokenModify{}, "okexchain/token/MsgModify", nil) // for test - //cdc.RegisterConcrete(MsgTokenDestroy{}, "okchain/token/MsgDestroy", nil) + //cdc.RegisterConcrete(MsgTokenDestroy{}, "okexchain/token/MsgDestroy", nil) } // generic sealed codec to be used throughout this module diff --git a/x/token/types/msgs_test.go b/x/token/types/msgs_test.go index 7024ad19dc..5ef9f9d3eb 100644 --- a/x/token/types/msgs_test.go +++ b/x/token/types/msgs_test.go @@ -5,7 +5,7 @@ import ( "testing" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/common" + "github.com/okex/okexchain/x/common" "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/crypto/secp256k1" ) @@ -202,12 +202,12 @@ func TestNewTokenMultiSend(t *testing.T) { fromAddr := sdk.AccAddress(fromPubKey.Address()) // correct message - coinStr := `[{"to":"okchain1dfpljpe0g0206jch32fx95lyagq3z5ws2vgwx3","amount":"1` + common.NativeToken + `"}]` + coinStr := `[{"to":"okexchain1dfpljpe0g0206jch32fx95lyagq3z5ws850m6f","amount":"1` + common.NativeToken + `"}]` transfers, err := StrToTransfers(coinStr) require.Nil(t, err) // coins not positive - toAddr0, err := sdk.AccAddressFromBech32("okchain1dfpljpe0g0206jch32fx95lyagq3z5ws2vgwx3") + toAddr0, err := sdk.AccAddressFromBech32("okexchain1dfpljpe0g0206jch32fx95lyagq3z5ws850m6f") require.Nil(t, err) decCoin0 := sdk.NewDecCoinFromDec(common.NativeToken, sdk.NewDec(0)) transfers0 := []TransferUnit{ diff --git a/x/token/types/params.go b/x/token/types/params.go index 994a5a160d..8c19e716b2 100644 --- a/x/token/types/params.go +++ b/x/token/types/params.go @@ -5,8 +5,8 @@ import ( "strings" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/common" - "github.com/okex/okchain/x/params" + "github.com/okex/okexchain/x/common" + "github.com/okex/okexchain/x/params" ) const ( diff --git a/x/token/types/params_test.go b/x/token/types/params_test.go index baa86c78fc..d6929dce0a 100644 --- a/x/token/types/params_test.go +++ b/x/token/types/params_test.go @@ -3,9 +3,9 @@ package types import ( "testing" - "github.com/okex/okchain/x/common" + "github.com/okex/okexchain/x/common" - "github.com/okex/okchain/x/params" + "github.com/okex/okexchain/x/params" "github.com/stretchr/testify/require" ) diff --git a/x/token/types/token.go b/x/token/types/token.go index 3d48159149..9122475a7c 100644 --- a/x/token/types/token.go +++ b/x/token/types/token.go @@ -13,7 +13,7 @@ type Token struct { WholeName string `json:"whole_name" v2:"whole_name"` // e.g. "OKT" OriginalTotalSupply sdk.Dec `json:"original_total_supply" v2:"original_total_supply"` // e.g. 1000000000.00000000 Type int `json:"type"` //e.g. 1 common token, 2 interest token - Owner sdk.AccAddress `json:"owner" v2:"owner"` // e.g. okchain1upyg3vl6vqaxqvzts69zpus2c027p7paw63s99 + Owner sdk.AccAddress `json:"owner" v2:"owner"` // e.g. okexchain1upyg3vl6vqaxqvzts69zpus2c027p7paw63s99 Mintable bool `json:"mintable" v2:"mintable"` // e.g. false } diff --git a/x/token/types/token_test.go b/x/token/types/token_test.go index 5848be5717..1dec11476b 100644 --- a/x/token/types/token_test.go +++ b/x/token/types/token_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/okex/okchain/x/common" + "github.com/okex/okexchain/x/common" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" @@ -56,7 +56,7 @@ func TestCurrency(t *testing.T) { } func TestToken(t *testing.T) { - addr, err := sdk.AccAddressFromBech32("okchain1dfpljpe0g0206jch32fx95lyagq3z5ws2vgwx3") + addr, err := sdk.AccAddressFromBech32("okexchain1dfpljpe0g0206jch32fx95lyagq3z5ws850m6f") require.Nil(t, err) testCase := []struct { @@ -82,7 +82,7 @@ func TestToken(t *testing.T) { Type: 0, Owner: addr, Mintable: true, - }, `{"description":"okblockchain coin","symbol":"` + common.NativeToken + `","original_symbol":"` + common.NativeToken + `","whole_name":"ok coin","original_total_supply":"1000000000.00000000","type":0,"owner":"okchain1dfpljpe0g0206jch32fx95lyagq3z5ws2vgwx3","mintable":true}`}, + }, `{"description":"okblockchain coin","symbol":"` + common.NativeToken + `","original_symbol":"` + common.NativeToken + `","whole_name":"ok coin","original_total_supply":"1000000000.00000000","type":0,"owner":"okexchain1dfpljpe0g0206jch32fx95lyagq3z5ws850m6f","mintable":true}`}, } for _, tokenCase := range testCase { b, err := json.Marshal(tokenCase.token) diff --git a/x/token/types/util_test.go b/x/token/types/util_test.go index ca42989a94..ae9a701f8f 100644 --- a/x/token/types/util_test.go +++ b/x/token/types/util_test.go @@ -3,7 +3,7 @@ package types import ( "testing" - "github.com/okex/okchain/x/common" + "github.com/okex/okexchain/x/common" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/auth" @@ -25,9 +25,9 @@ func TestAmountToCoins(t *testing.T) { func TestStrToTransfers(t *testing.T) { //coinStr := `[{"to": "cosmos18ragjd23yv4ctjg3vadh43q5zf8z0hafm4qjrf", "amount": "1BNB,2BTC"}, //{"to": "cosmos18ragjd23yv4ctjg3vadh43q5zf8z0hafm4qjrf", "amount": "1OKB,2BTC"}]` - coinStr := `[{"to":"okchain1dfpljpe0g0206jch32fx95lyagq3z5ws2vgwx3","amount":"1` + common.NativeToken + `"}]` + coinStr := `[{"to":"okexchain1dfpljpe0g0206jch32fx95lyagq3z5ws850m6f","amount":"1` + common.NativeToken + `"}]` coinStrError := `[{"to":"kochain1dfpljpe0g0206jch32fx95lyagq3z5ws2vgwx3","amount":"1` + common.NativeToken + `"}]` - addr, err := sdk.AccAddressFromBech32("okchain1dfpljpe0g0206jch32fx95lyagq3z5ws2vgwx3") + addr, err := sdk.AccAddressFromBech32("okexchain1dfpljpe0g0206jch32fx95lyagq3z5ws850m6f") require.Nil(t, err) _, err = StrToTransfers(coinStrError) require.Error(t, err) @@ -43,7 +43,7 @@ func TestStrToTransfers(t *testing.T) { } require.EqualValues(t, transfer, transfers) - coinStr = `[{"to":"okchain1dfpljpe0g0206jch32fx95lyagq3z5ws2vgwx3",amount":"1"}]` + coinStr = `[{"to":"okexchain1dfpljpe0g0206jch32fx95lyagq3z5ws850m6f",amount":"1"}]` _, err = StrToTransfers(coinStr) require.Error(t, err) } diff --git a/x/upgrade/alias.go b/x/upgrade/alias.go index 2972b378ca..20d9380255 100644 --- a/x/upgrade/alias.go +++ b/x/upgrade/alias.go @@ -1,8 +1,8 @@ package upgrade import ( - "github.com/okex/okchain/x/upgrade/keeper" - "github.com/okex/okchain/x/upgrade/types" + "github.com/okex/okexchain/x/upgrade/keeper" + "github.com/okex/okexchain/x/upgrade/types" ) const ( diff --git a/x/upgrade/client/cli/query.go b/x/upgrade/client/cli/query.go index 30a78bf6a8..431576758e 100644 --- a/x/upgrade/client/cli/query.go +++ b/x/upgrade/client/cli/query.go @@ -7,9 +7,9 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/context" "github.com/cosmos/cosmos-sdk/codec" - "github.com/okex/okchain/x/common/proto" - "github.com/okex/okchain/x/upgrade/keeper" - "github.com/okex/okchain/x/upgrade/types" + "github.com/okex/okexchain/x/common/proto" + "github.com/okex/okexchain/x/upgrade/keeper" + "github.com/okex/okexchain/x/upgrade/types" "github.com/spf13/cobra" ) @@ -35,7 +35,7 @@ func GetCmdQueryUpgradeConfig(storeName string, cdc *codec.Codec) *cobra.Command Short: "query app upgrade config", Long: strings.TrimSpace(`Query details about app upgrade config: -$ okchaincli query upgrade config +$ okexchaincli query upgrade config `), Args: cobra.NoArgs, RunE: func(cmd *cobra.Command, args []string) error { @@ -61,7 +61,7 @@ func GetCmdQueryUpgradeVersion(storeName string, cdc *codec.Codec) *cobra.Comman Short: "query app upgrade version", Long: strings.TrimSpace(`Query details about current app version: -$ okchaincli query upgrade version +$ okexchaincli query upgrade version `), Args: cobra.NoArgs, RunE: func(cmd *cobra.Command, args []string) error { @@ -87,7 +87,7 @@ func GetCmdQueryUpgradeFailedVersion(storeName string, cdc *codec.Codec) *cobra. Short: "query app upgrade failed-version", Long: strings.TrimSpace(`Query details about last failed app version: -$ okchaincli query upgrade failed-version +$ okexchaincli query upgrade failed-version `), Args: cobra.NoArgs, RunE: func(cmd *cobra.Command, args []string) error { diff --git a/x/upgrade/client/cli/tx.go b/x/upgrade/client/cli/tx.go index dce9870865..fb3f3a06a8 100644 --- a/x/upgrade/client/cli/tx.go +++ b/x/upgrade/client/cli/tx.go @@ -10,12 +10,12 @@ import ( "github.com/cosmos/cosmos-sdk/version" "github.com/cosmos/cosmos-sdk/x/auth" "github.com/cosmos/cosmos-sdk/x/auth/client/utils" - "github.com/okex/okchain/x/common/proto" - "github.com/okex/okchain/x/upgrade/types" + "github.com/okex/okexchain/x/common/proto" + "github.com/okex/okexchain/x/upgrade/types" "github.com/spf13/cobra" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/gov" + "github.com/okex/okexchain/x/gov" ) // GetCmdSubmitProposal implements a command handler for submitting a dex list proposal transaction @@ -38,7 +38,7 @@ Where proposal.json contains: "description": "Update max validators", "protocol_definition": { "version": "1", - "software": "http://github.com/okex/okchain/v1", + "software": "http://github.com/okex/okexchain/v1", "height": "1000", "threshold": "0.8", } diff --git a/x/upgrade/client/proposal_handler.go b/x/upgrade/client/proposal_handler.go index 707c98ceb1..66544b58ef 100644 --- a/x/upgrade/client/proposal_handler.go +++ b/x/upgrade/client/proposal_handler.go @@ -1,9 +1,9 @@ package client import ( - govclient "github.com/okex/okchain/x/gov/client" - "github.com/okex/okchain/x/upgrade/client/cli" - "github.com/okex/okchain/x/upgrade/client/rest" + govclient "github.com/okex/okexchain/x/gov/client" + "github.com/okex/okexchain/x/upgrade/client/cli" + "github.com/okex/okexchain/x/upgrade/client/rest" ) // ProposalHandler is param change proposal handler diff --git a/x/upgrade/client/rest/rest.go b/x/upgrade/client/rest/rest.go index 3911e625e8..8eae1c61a7 100644 --- a/x/upgrade/client/rest/rest.go +++ b/x/upgrade/client/rest/rest.go @@ -2,7 +2,7 @@ package rest import ( "github.com/cosmos/cosmos-sdk/client/context" - govRest "github.com/okex/okchain/x/gov/client/rest" + govRest "github.com/okex/okexchain/x/gov/client/rest" ) func ProposalRESTHandler(context.CLIContext) govRest.ProposalRESTHandler { diff --git a/x/upgrade/doc/abci.Application.puml b/x/upgrade/doc/abci.Application.puml index 3e74bea575..9b1d08958b 100644 --- a/x/upgrade/doc/abci.Application.puml +++ b/x/upgrade/doc/abci.Application.puml @@ -91,7 +91,7 @@ class Node { prometheusSrv *http.Server } -annotation "命令行执行okchaind start" as A1 +annotation "命令行执行okexchaind start" as A1 class "func startInProcess(*Context, *codec.Codec, AppCreator,func(*lcd.RestServer)) (*node.Node, error)" as M7 << (M,orchid)>> class "func NewNode(*cfg.Config,types.PrivValidator,*p2p.NodeKey,proxy.ClientCreator,\nGenesisDocProvider,DBProvider,MetricsProvider,logger log.Logger,...Option) (*Node, error)" as M8 << (M,orchid)>> diff --git a/x/upgrade/doc/genesis.puml b/x/upgrade/doc/genesis.puml index 68646dff9b..f78eefd0ab 100644 --- a/x/upgrade/doc/genesis.puml +++ b/x/upgrade/doc/genesis.puml @@ -24,7 +24,7 @@ Callback class "func (*localClient) InitChainSync(types.RequestInitChain) (*types.ResponseInitChain, error)" as M5 << (M,orchid) >> class "func (*localClient) InitChainAsync(types.RequestInitChain) *ReqRes" as M6 << (M,orchid) >> -class "okchaind -> replay 选项" as M7 << (E,#FF7700) >> +class "okexchaind -> replay 选项" as M7 << (E,#FF7700) >> class Handshaker { stateDB dbm.DB @@ -42,7 +42,7 @@ class "func (*Handshaker) Handshake(proxy.AppConns) error" as M9 << (M,orchid) > class "func doHandshake(dbm.DB, sm.State, sm.BlockStore,*types.GenesisDoc, *types.EventBus, proxy.AppConns, log.Logger) error" as M10 << (M,orchid) >> class "func NewNode(*cfg.Config, types.PrivValidator, *p2p.NodeKey, proxy.ClientCreator, GenesisDocProvider, DBProvider, MetricsProvider, log.Logger, ...Option) (*Node, error)" as M11 << (M,orchid) >> -class "okchaind -> start 选项" as M12 << (E,#FF7700) >> +class "okexchaind -> start 选项" as M12 << (E,#FF7700) >> M1 <--* BaseApp:维护 M2 <-- M1:调用 M3 <-- M2:调用 diff --git a/x/upgrade/genesis.go b/x/upgrade/genesis.go index 46589cb4d1..f390e2f7f5 100644 --- a/x/upgrade/genesis.go +++ b/x/upgrade/genesis.go @@ -3,8 +3,8 @@ package upgrade import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/version" - "github.com/okex/okchain/x/common/proto" - "github.com/okex/okchain/x/upgrade/types" + "github.com/okex/okexchain/x/common/proto" + "github.com/okex/okexchain/x/upgrade/types" ) // InitGenesis builds the genesis version for first version @@ -20,7 +20,7 @@ func InitGenesis(ctx sdk.Context, k Keeper, data types.GenesisState) { func ExportGenesis(_ sdk.Context) types.GenesisState { return types.GenesisState{ GenesisVersion: types.NewVersionInfo( - proto.DefaultUpgradeConfig("https://github.com/okex/okchain/releases/tag/v"+version.Version), true), + proto.DefaultUpgradeConfig("https://github.com/okex/okexchain/releases/tag/v"+version.Version), true), Params: types.DefaultParams(), } } diff --git a/x/upgrade/hander_test.go b/x/upgrade/hander_test.go index ec74d30072..3be69e9898 100644 --- a/x/upgrade/hander_test.go +++ b/x/upgrade/hander_test.go @@ -3,11 +3,11 @@ package upgrade import ( "testing" - "github.com/okex/okchain/x/staking/types" + "github.com/okex/okexchain/x/staking/types" sdk "github.com/cosmos/cosmos-sdk/types" - //"github.com/okex/okchain/x/staking" - "github.com/okex/okchain/x/staking" + //"github.com/okex/okexchain/x/staking" + "github.com/okex/okexchain/x/staking" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" diff --git a/x/upgrade/handler.go b/x/upgrade/handler.go index 32d0ac0c7b..8fbf24e4c5 100644 --- a/x/upgrade/handler.go +++ b/x/upgrade/handler.go @@ -5,7 +5,7 @@ import ( "strconv" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/upgrade/types" + "github.com/okex/okexchain/x/upgrade/types" ) // EndBlocker does signal maintenance in the end of block diff --git a/x/upgrade/keeper/expected_keeper.go b/x/upgrade/keeper/expected_keeper.go index 54a8495145..1ed4bc2601 100644 --- a/x/upgrade/keeper/expected_keeper.go +++ b/x/upgrade/keeper/expected_keeper.go @@ -2,11 +2,11 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/common/proto" - "github.com/okex/okchain/x/staking/exported" + "github.com/okex/okexchain/x/common/proto" + "github.com/okex/okexchain/x/staking/exported" - //"github.com/okex/okchain/x/staking/types" - "github.com/okex/okchain/x/staking/types" + //"github.com/okex/okexchain/x/staking/types" + "github.com/okex/okexchain/x/staking/types" ) // BankKeeper shows the expected action of bank keeper in this module diff --git a/x/upgrade/keeper/keeper.go b/x/upgrade/keeper/keeper.go index c43fc4c7af..e03709711e 100644 --- a/x/upgrade/keeper/keeper.go +++ b/x/upgrade/keeper/keeper.go @@ -3,15 +3,15 @@ package keeper import ( "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/common/proto" - "github.com/okex/okchain/x/params" + "github.com/okex/okexchain/x/common/proto" + "github.com/okex/okexchain/x/params" - //"github.com/okex/okchain/x/staking/exported" - "github.com/okex/okchain/x/staking/exported" + //"github.com/okex/okexchain/x/staking/exported" + "github.com/okex/okexchain/x/staking/exported" - //stakingtypes "github.com/okex/okchain/x/staking/types" - stakingtypes "github.com/okex/okchain/x/staking/types" - "github.com/okex/okchain/x/upgrade/types" + //stakingtypes "github.com/okex/okexchain/x/staking/types" + stakingtypes "github.com/okex/okexchain/x/staking/types" + "github.com/okex/okexchain/x/upgrade/types" ) // Keeper is the keeper struct of the upgrade store diff --git a/x/upgrade/keeper/keeper_deprecated.go b/x/upgrade/keeper/keeper_deprecated.go index a758b09531..1c61b99556 100644 --- a/x/upgrade/keeper/keeper_deprecated.go +++ b/x/upgrade/keeper/keeper_deprecated.go @@ -2,8 +2,8 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/common/proto" - "github.com/okex/okchain/x/upgrade/types" + "github.com/okex/okexchain/x/common/proto" + "github.com/okex/okexchain/x/upgrade/types" ) // only for unit test diff --git a/x/upgrade/keeper/keeper_test.go b/x/upgrade/keeper/keeper_test.go index 4aa4c7513f..17d095add7 100644 --- a/x/upgrade/keeper/keeper_test.go +++ b/x/upgrade/keeper/keeper_test.go @@ -2,12 +2,12 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/common/proto" - "github.com/okex/okchain/x/staking/types" + "github.com/okex/okexchain/x/common/proto" + "github.com/okex/okexchain/x/staking/types" - //"github.com/okex/okchain/x/staking" - "github.com/okex/okchain/x/staking" - upgradetypes "github.com/okex/okchain/x/upgrade/types" + //"github.com/okex/okexchain/x/staking" + "github.com/okex/okexchain/x/staking" + upgradetypes "github.com/okex/okexchain/x/upgrade/types" "github.com/stretchr/testify/require" "testing" diff --git a/x/upgrade/keeper/proposal.go b/x/upgrade/keeper/proposal.go index e9c326149b..29d5588b08 100644 --- a/x/upgrade/keeper/proposal.go +++ b/x/upgrade/keeper/proposal.go @@ -5,11 +5,11 @@ import ( "time" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/common" - "github.com/okex/okchain/x/common/proto" - "github.com/okex/okchain/x/gov" - "github.com/okex/okchain/x/token" - "github.com/okex/okchain/x/upgrade/types" + "github.com/okex/okexchain/x/common" + "github.com/okex/okexchain/x/common/proto" + "github.com/okex/okexchain/x/gov" + "github.com/okex/okexchain/x/token" + "github.com/okex/okexchain/x/upgrade/types" ) // GetMinDeposit implements ProposalHandler interface diff --git a/x/upgrade/keeper/querier.go b/x/upgrade/keeper/querier.go index ed3d04e38f..a35a79f200 100644 --- a/x/upgrade/keeper/querier.go +++ b/x/upgrade/keeper/querier.go @@ -3,7 +3,7 @@ package keeper import ( "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/upgrade/types" + "github.com/okex/okexchain/x/upgrade/types" abci "github.com/tendermint/tendermint/abci/types" ) diff --git a/x/upgrade/keeper/test_common.go b/x/upgrade/keeper/test_common.go index e161d87914..04f62b3ab0 100644 --- a/x/upgrade/keeper/test_common.go +++ b/x/upgrade/keeper/test_common.go @@ -5,7 +5,7 @@ import ( "os" "testing" - //"github.com/okex/okchain/x/staking/util" + //"github.com/okex/okexchain/x/staking/util" "github.com/tendermint/tendermint/crypto/ed25519" dbm "github.com/tendermint/tm-db" @@ -16,12 +16,12 @@ import ( "github.com/cosmos/cosmos-sdk/x/auth" "github.com/cosmos/cosmos-sdk/x/bank" "github.com/cosmos/cosmos-sdk/x/supply" - "github.com/okex/okchain/x/common/proto" - "github.com/okex/okchain/x/params" + "github.com/okex/okexchain/x/common/proto" + "github.com/okex/okexchain/x/params" - //"github.com/okex/okchain/x/staking" - "github.com/okex/okchain/x/staking" - "github.com/okex/okchain/x/upgrade/types" + //"github.com/okex/okexchain/x/staking" + "github.com/okex/okexchain/x/staking" + "github.com/okex/okexchain/x/upgrade/types" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/crypto" diff --git a/x/upgrade/module.go b/x/upgrade/module.go index 85e727c363..8d308872d8 100644 --- a/x/upgrade/module.go +++ b/x/upgrade/module.go @@ -3,15 +3,15 @@ package upgrade import ( "encoding/json" - "github.com/okex/okchain/x/upgrade/keeper" - "github.com/okex/okchain/x/upgrade/types" + "github.com/okex/okexchain/x/upgrade/keeper" + "github.com/okex/okexchain/x/upgrade/types" "github.com/cosmos/cosmos-sdk/client/context" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" "github.com/gorilla/mux" - "github.com/okex/okchain/x/upgrade/client/cli" + "github.com/okex/okexchain/x/upgrade/client/cli" "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" ) diff --git a/x/upgrade/tally.go b/x/upgrade/tally.go index 28b51f8a04..0eb7518802 100644 --- a/x/upgrade/tally.go +++ b/x/upgrade/tally.go @@ -2,7 +2,7 @@ package upgrade import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/staking/exported" + "github.com/okex/okexchain/x/staking/exported" ) // endblock at specific block height diff --git a/x/upgrade/tally_test.go b/x/upgrade/tally_test.go index 6ee85c1175..faf0a54bb4 100644 --- a/x/upgrade/tally_test.go +++ b/x/upgrade/tally_test.go @@ -3,13 +3,13 @@ package upgrade import ( "testing" - "github.com/okex/okchain/x/staking/types" + "github.com/okex/okexchain/x/staking/types" "github.com/stretchr/testify/require" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/staking" - //"github.com/okex/okchain/x/staking" + "github.com/okex/okexchain/x/staking" + //"github.com/okex/okexchain/x/staking" ) func TestTallyPassed(t *testing.T) { diff --git a/x/upgrade/test_common.go b/x/upgrade/test_common.go index 5c2c55dd13..31c56f844f 100644 --- a/x/upgrade/test_common.go +++ b/x/upgrade/test_common.go @@ -5,11 +5,11 @@ import ( "os" "testing" - //"github.com/okex/okchain/x/staking/util" + //"github.com/okex/okexchain/x/staking/util" "github.com/tendermint/tendermint/crypto/ed25519" - "github.com/okex/okchain/x/common/proto" + "github.com/okex/okexchain/x/common/proto" "github.com/cosmos/cosmos-sdk/x/supply" @@ -25,13 +25,13 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/auth" - "github.com/okex/okchain/x/params" + "github.com/okex/okexchain/x/params" - //"github.com/okex/okchain/x/staking" - "github.com/okex/okchain/x/staking" + //"github.com/okex/okexchain/x/staking" + "github.com/okex/okexchain/x/staking" - //"github.com/okex/okchain/x/staking/types" - "github.com/okex/okchain/x/staking/types" + //"github.com/okex/okexchain/x/staking/types" + "github.com/okex/okexchain/x/staking/types" abci "github.com/tendermint/tendermint/abci/types" dbm "github.com/tendermint/tm-db" ) diff --git a/x/upgrade/types/codec.go b/x/upgrade/types/codec.go index 53ac530b8b..b2f0718d5f 100644 --- a/x/upgrade/types/codec.go +++ b/x/upgrade/types/codec.go @@ -15,5 +15,5 @@ func init() { // RegisterCodec registers concrete types on code func RegisterCodec(cdc *codec.Codec) { - cdc.RegisterConcrete(AppUpgradeProposal{}, "okchain/upgrade/AppUpgradeProposal", nil) + cdc.RegisterConcrete(AppUpgradeProposal{}, "okexchain/upgrade/AppUpgradeProposal", nil) } diff --git a/x/upgrade/types/errors.go b/x/upgrade/types/errors.go index 00b914c335..fc4568c843 100644 --- a/x/upgrade/types/errors.go +++ b/x/upgrade/types/errors.go @@ -4,7 +4,7 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" - govTypes "github.com/okex/okchain/x/gov/types" + govTypes "github.com/okex/okexchain/x/gov/types" ) // const diff --git a/x/upgrade/types/genesis.go b/x/upgrade/types/genesis.go index 2dd2aebdaa..588f953eb9 100644 --- a/x/upgrade/types/genesis.go +++ b/x/upgrade/types/genesis.go @@ -1,6 +1,6 @@ package types -import "github.com/okex/okchain/x/common/proto" +import "github.com/okex/okexchain/x/common/proto" // GenesisState contains all upgrade state that must be provided at genesis type GenesisState struct { @@ -11,7 +11,7 @@ type GenesisState struct { // DefaultGenesisState returns default raw genesis raw message func DefaultGenesisState() GenesisState { return GenesisState{ - NewVersionInfo(proto.DefaultUpgradeConfig("https://github.com/okex/okchain/releases/tag/v"), true), + NewVersionInfo(proto.DefaultUpgradeConfig("https://github.com/okex/okexchain/releases/tag/v"), true), DefaultParams(), } } diff --git a/x/upgrade/types/params.go b/x/upgrade/types/params.go index 79750ffeb3..79e7d30fa5 100644 --- a/x/upgrade/types/params.go +++ b/x/upgrade/types/params.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/okex/okchain/x/params" + "github.com/okex/okexchain/x/params" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/upgrade/types/proposal.go b/x/upgrade/types/proposal.go index 8573841279..ff9bb1ad02 100644 --- a/x/upgrade/types/proposal.go +++ b/x/upgrade/types/proposal.go @@ -4,8 +4,8 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okex/okchain/x/common/proto" - govTypes "github.com/okex/okchain/x/gov/types" + "github.com/okex/okexchain/x/common/proto" + govTypes "github.com/okex/okexchain/x/gov/types" ) // const @@ -15,7 +15,7 @@ const ( func init() { govTypes.RegisterProposalType(ProposalAppUpgrade) - govTypes.RegisterProposalTypeCodec(AppUpgradeProposal{}, "okchain/upgrade/AppUpgradeProposal") + govTypes.RegisterProposalTypeCodec(AppUpgradeProposal{}, "okexchain/upgrade/AppUpgradeProposal") } // AppUpgradeProposal implements content interface diff --git a/x/upgrade/types/types.go b/x/upgrade/types/types.go index fc8789df6c..a08d745478 100644 --- a/x/upgrade/types/types.go +++ b/x/upgrade/types/types.go @@ -3,7 +3,7 @@ package types import ( "fmt" - "github.com/okex/okchain/x/common/proto" + "github.com/okex/okexchain/x/common/proto" ) // VersionInfo is the struct of version info