From 85bee39fb64189a79211ff86c3642058bbcbddd7 Mon Sep 17 00:00:00 2001 From: zakir <80246097+zakir-code@users.noreply.github.com> Date: Fri, 6 Sep 2024 10:43:07 +0800 Subject: [PATCH] chore: prepare upgrade for v8 (#672) --- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/golang.yml | 12 +- .github/workflows/nightly-tests.yml | 2 +- .golangci.yml | 8 +- Dockerfile | 6 +- Makefile | 17 ++- README.md | 6 +- ante/pubkey.go | 2 +- app/app.go | 28 ++-- app/app_db_test.go | 4 +- app/app_test.go | 10 +- app/encoding.go | 4 +- app/encoding_test.go | 4 +- app/export_test.go | 12 +- app/genesis.go | 6 +- app/genesis_test.go | 6 +- app/keepers/keepers.go | 62 ++++---- app/keepers/keepers_test.go | 9 +- app/keepers/keys.go | 20 +-- app/modules.go | 54 +++---- app/modules_test.go | 2 +- app/upgrade.go | 4 +- app/upgrade_test.go | 8 +- app/upgrades/types.go | 2 +- app/upgrades/v7/constants.go | 26 ---- app/upgrades/v7/upgrade.go | 132 ------------------ app/upgrades/v8/constants.go | 15 ++ app/upgrades/v8/upgrade.go | 24 ++++ client/cli/debug_test.go | 2 +- client/cli/keys/output_test.go | 4 +- client/client_test.go | 36 ++--- client/grpc/grpc_client.go | 8 +- client/grpc/grpc_client_test.go | 4 +- client/jsonrpc/abci_query.go | 2 +- client/jsonrpc/json_rpc.go | 2 +- client/jsonrpc/rpc_client.go | 2 +- cmd/config.go | 2 +- cmd/config_test.go | 2 +- cmd/delegate.go | 8 +- cmd/doctor.go | 8 +- cmd/doctor_test.go | 2 +- cmd/fxcored/main.go | 4 +- cmd/keys.go | 2 +- cmd/root.go | 14 +- cmd/testnet.go | 8 +- contract/eth_validation_test.go | 4 +- cosmovisor.Dockerfile | 16 +-- cosmovisor_lite.Dockerfile | 18 ++- docs/swagger_test.go | 2 +- go.mod | 4 +- server/config/config.go | 2 +- server/config/config_cmd_test.go | 6 +- server/database_test.go | 4 +- server/grpc/auth/grpc_query.go | 2 +- server/log_filter_test.go | 2 +- server/start.go | 4 +- server/start_test.go | 6 +- tests/amino_test.go | 12 +- tests/ante_test.go | 2 +- tests/contract_test.go | 2 +- tests/crosschain_suite.go | 12 +- tests/crosschain_test.go | 14 +- tests/erc20_suite.go | 2 +- tests/erc20_test.go | 8 +- tests/evm_suite.go | 12 +- tests/evm_test.go | 8 +- tests/integration_test.go | 16 +-- tests/migrate_test.go | 6 +- tests/precompile_suite.go | 12 +- tests/precompile_test.go | 14 +- tests/staking_suite.go | 12 +- tests/staking_test.go | 10 +- tests/suite.go | 18 +-- tests/upgrade_time_calc_test.go | 2 +- testutil/helpers/helpers.go | 129 +---------------- testutil/helpers/key.go | 4 +- testutil/helpers/key_test.go | 2 +- testutil/helpers/suite.go | 4 +- testutil/helpers/testing_app.go | 4 +- testutil/helpers/tools.go | 2 +- testutil/network.go | 10 +- testutil/network/network.go | 2 +- testutil/network/util.go | 4 +- testutil/network_test.go | 8 +- types/address.go | 2 +- types/byte32_test.go | 2 +- types/target_test.go | 2 +- x/arbitrum/module.go | 8 +- x/arbitrum/types/genesis.go | 2 +- x/arbitrum/types/key.go | 2 +- x/avalanche/module.go | 8 +- x/avalanche/types/genesis.go | 2 +- x/avalanche/types/key.go | 2 +- x/bsc/module.go | 8 +- x/bsc/types/genesis.go | 2 +- x/bsc/types/key.go | 2 +- x/crosschain/client/cli/query.go | 2 +- x/crosschain/client/cli/tx.go | 2 +- x/crosschain/client/cli/tx_proposal.go | 2 +- x/crosschain/client/proposal_handler.go | 2 +- x/crosschain/keeper/abci.go | 2 +- x/crosschain/keeper/abci_test.go | 8 +- x/crosschain/keeper/attestation.go | 2 +- x/crosschain/keeper/attestation_handler.go | 2 +- x/crosschain/keeper/batch.go | 2 +- x/crosschain/keeper/batch_confirm.go | 2 +- x/crosschain/keeper/batch_fee.go | 2 +- x/crosschain/keeper/batch_test.go | 4 +- x/crosschain/keeper/bridge_account.go | 2 +- x/crosschain/keeper/bridge_call_confirm.go | 2 +- x/crosschain/keeper/bridge_call_in.go | 8 +- x/crosschain/keeper/bridge_call_in_test.go | 8 +- x/crosschain/keeper/bridge_call_out.go | 8 +- x/crosschain/keeper/bridge_call_out_test.go | 6 +- .../keeper/bridge_call_out_v1_test.go | 8 +- x/crosschain/keeper/bridge_call_refund.go | 2 +- .../keeper/bridge_call_refund_test.go | 4 +- x/crosschain/keeper/bridge_token.go | 4 +- x/crosschain/keeper/bridge_token_test.go | 4 +- x/crosschain/keeper/delegate.go | 2 +- x/crosschain/keeper/genesis.go | 2 +- x/crosschain/keeper/genesis_test.go | 8 +- x/crosschain/keeper/grpc_query.go | 4 +- x/crosschain/keeper/grpc_query_router.go | 4 +- x/crosschain/keeper/grpc_query_test.go | 4 +- x/crosschain/keeper/grpc_query_v1_test.go | 14 +- x/crosschain/keeper/hook.go | 2 +- x/crosschain/keeper/keeper.go | 2 +- x/crosschain/keeper/keeper_router.go | 2 +- x/crosschain/keeper/keeper_test.go | 30 ++-- x/crosschain/keeper/keeper_v1_test.go | 28 ++-- x/crosschain/keeper/migrations.go | 4 +- x/crosschain/keeper/msg_server.go | 6 +- x/crosschain/keeper/msg_server_router.go | 2 +- x/crosschain/keeper/msg_server_test.go | 12 +- x/crosschain/keeper/observed.go | 2 +- x/crosschain/keeper/oracle.go | 2 +- x/crosschain/keeper/oracle_set.go | 2 +- x/crosschain/keeper/oracle_set_confirm.go | 2 +- x/crosschain/keeper/oracle_set_test.go | 4 +- x/crosschain/keeper/outgoing_pending_pool.go | 6 +- .../keeper/outgoing_pending_pool_test.go | 6 +- x/crosschain/keeper/outgoing_pool.go | 6 +- x/crosschain/keeper/outgoing_pool_test.go | 8 +- x/crosschain/keeper/params.go | 2 +- x/crosschain/keeper/params_test.go | 2 +- .../keeper/pending_bridge_call_out.go | 6 +- x/crosschain/keeper/pending_execute_claim.go | 2 +- .../keeper/pending_execute_claim_test.go | 4 +- x/crosschain/keeper/proposal.go | 6 +- x/crosschain/keeper/proposal_legacy.go | 2 +- x/crosschain/keeper/proposal_legacy_test.go | 4 +- x/crosschain/keeper/send_to_fx.go | 8 +- x/crosschain/keeper/timeout_height.go | 2 +- x/crosschain/mock/expected_keepers_mocks.go | 6 +- .../precompile/add_pending_pool_rewards.go | 8 +- .../add_pending_pool_rewards_test.go | 10 +- x/crosschain/precompile/bridge_call.go | 4 +- x/crosschain/precompile/bridge_call_test.go | 8 +- x/crosschain/precompile/bridge_coin_amount.go | 10 +- .../precompile/bridge_coin_amount_test.go | 8 +- x/crosschain/precompile/cancel_bridge_call.go | 4 +- .../precompile/cancel_bridge_call_test.go | 8 +- .../precompile/cancel_send_to_external.go | 4 +- .../cancel_send_to_external_test.go | 18 +-- x/crosschain/precompile/contract.go | 6 +- x/crosschain/precompile/contract_test.go | 22 +-- x/crosschain/precompile/crosschain.go | 10 +- x/crosschain/precompile/crosschain_test.go | 26 ++-- x/crosschain/precompile/execute_claim.go | 6 +- x/crosschain/precompile/execute_claim_test.go | 6 +- x/crosschain/precompile/expected_keepers.go | 4 +- x/crosschain/precompile/fip20_crosschain.go | 8 +- .../precompile/fip20crosschain_test.go | 18 +-- .../precompile/increase_bridge_fee.go | 8 +- .../precompile/increase_bridgefee_test.go | 18 +-- x/crosschain/precompile/keeper.go | 8 +- x/crosschain/precompile/router.go | 2 +- x/crosschain/proposal_legacy.go | 4 +- x/crosschain/service.go | 2 +- x/crosschain/types/abi.go | 2 +- x/crosschain/types/abi_test.go | 2 +- x/crosschain/types/contract.go | 2 +- x/crosschain/types/eth_address.go | 2 +- x/crosschain/types/eth_signer_test.go | 2 +- x/crosschain/types/expected_keepers.go | 4 +- x/crosschain/types/external_address_test.go | 18 +-- x/crosschain/types/genesis_test.go | 2 +- x/crosschain/types/key_test.go | 4 +- x/crosschain/types/msgs_test.go | 10 +- x/crosschain/types/params.go | 2 +- x/crosschain/types/types.go | 4 +- x/crosschain/types/types_test.go | 2 +- x/erc20/client/cli/query.go | 2 +- x/erc20/client/cli/tx.go | 4 +- x/erc20/client/cli/tx_proposal.go | 2 +- x/erc20/client/proposal_handler.go | 2 +- x/erc20/keeper/evm.go | 6 +- x/erc20/keeper/evm_test.go | 2 +- x/erc20/keeper/genesis.go | 4 +- x/erc20/keeper/grpc_query.go | 4 +- x/erc20/keeper/grpc_query_test.go | 6 +- x/erc20/keeper/keeper.go | 6 +- x/erc20/keeper/keeper_test.go | 16 +-- x/erc20/keeper/mint.go | 2 +- x/erc20/keeper/mint_test.go | 4 +- x/erc20/keeper/msg_server.go | 26 ++-- x/erc20/keeper/msg_server_test.go | 12 +- x/erc20/keeper/params.go | 2 +- x/erc20/keeper/params_test.go | 2 +- x/erc20/keeper/proposals.go | 4 +- x/erc20/keeper/proposals_test.go | 12 +- x/erc20/keeper/token_pairs.go | 6 +- x/erc20/keeper/token_pairs_test.go | 6 +- x/erc20/keeper/transfer_relation.go | 2 +- x/erc20/module.go | 6 +- x/erc20/proposal.go | 4 +- x/erc20/types/erc20_data_test.go | 2 +- x/erc20/types/genesis_test.go | 2 +- x/erc20/types/msg.go | 4 +- x/erc20/types/msg_test.go | 4 +- x/erc20/types/proposal.go | 4 +- x/erc20/types/proposal_test.go | 4 +- x/erc20/types/token_pair.go | 2 +- x/erc20/types/token_pair_test.go | 2 +- x/eth/module.go | 8 +- x/eth/types/genesis.go | 2 +- x/eth/types/key.go | 2 +- x/evm/keeper/contract_code.go | 4 +- x/evm/keeper/contract_code_test.go | 4 +- x/evm/keeper/genesis.go | 2 +- x/evm/keeper/keeper.go | 6 +- x/evm/keeper/keeper_test.go | 6 +- x/evm/keeper/msg_server.go | 2 +- x/evm/keeper/msg_server_test.go | 4 +- x/evm/keeper/statedb_test.go | 2 +- x/evm/module.go | 8 +- x/evm/testutil/erc20.go | 4 +- x/evm/testutil/evm.go | 12 +- x/evm/types/codec.go | 2 +- x/evm/types/errors.go | 20 +-- x/evm/types/msg.go | 2 +- x/gov/client/cli/query.go | 2 +- x/gov/client/cli/query_test.go | 2 +- x/gov/keeper/abci.go | 2 +- x/gov/keeper/grpc_query.go | 2 +- x/gov/keeper/grpc_query_test.go | 6 +- x/gov/keeper/keeper.go | 4 +- x/gov/keeper/keeper_test.go | 16 +-- x/gov/keeper/migrations.go | 2 +- x/gov/keeper/msg_server.go | 2 +- x/gov/keeper/msg_server_test.go | 10 +- x/gov/keeper/params.go | 4 +- x/gov/keeper/params_test.go | 6 +- x/gov/keeper/tally.go | 2 +- x/gov/keeper/tally_test.go | 4 +- x/gov/migrations/v4/params.go | 2 +- x/gov/module.go | 6 +- x/gov/types/codec.go | 2 +- x/gov/types/msgs_test.go | 4 +- x/gov/types/params.go | 6 +- x/gravity/keeper/grpc_query.go | 10 +- x/gravity/keeper/msg_server.go | 8 +- x/gravity/service.go | 2 +- x/gravity/types/msgs.go | 2 +- x/ibc/applications/transfer/client/cli/tx.go | 2 +- x/ibc/applications/transfer/ibc_middleware.go | 6 +- .../transfer/ibc_middleware_test.go | 4 +- .../applications/transfer/keeper/ibc_call.go | 2 +- x/ibc/applications/transfer/keeper/keeper.go | 2 +- .../transfer/keeper/keeper_test.go | 6 +- .../transfer/keeper/msg_server.go | 2 +- .../transfer/keeper/msg_server_test.go | 4 +- x/ibc/applications/transfer/keeper/parse.go | 4 +- .../transfer/keeper/parse_test.go | 4 +- x/ibc/applications/transfer/keeper/relay.go | 6 +- .../transfer/keeper/relay_test.go | 24 ++-- x/ibc/applications/transfer/module.go | 6 +- x/ibc/applications/transfer/transfer_test.go | 6 +- .../transfer/types/expected_keepers.go | 4 +- .../applications/transfer/types/msgs_test.go | 2 +- x/ibc/applications/transfer/types/packet.go | 6 +- x/ibc/ibcrouter/ibc_middleware.go | 8 +- x/ibc/ibcrouter/ibc_middleware_test.go | 6 +- .../ibcrouter/parser/receiver_parser_test.go | 2 +- x/ibc/testing/app.go | 8 +- x/ibc/testing/chain.go | 2 +- x/layer2/module.go | 8 +- x/layer2/types/genesis.go | 2 +- x/layer2/types/key.go | 2 +- x/migrate/client/cli/query.go | 2 +- x/migrate/client/cli/tx.go | 8 +- x/migrate/keeper/bank.go | 2 +- x/migrate/keeper/bank_test.go | 4 +- x/migrate/keeper/distr_staking.go | 2 +- x/migrate/keeper/distr_staking_test.go | 12 +- x/migrate/keeper/genesis.go | 4 +- x/migrate/keeper/gov.go | 2 +- x/migrate/keeper/gov_test.go | 6 +- x/migrate/keeper/grpc_query.go | 2 +- x/migrate/keeper/grpc_query_test.go | 4 +- x/migrate/keeper/keeper.go | 2 +- x/migrate/keeper/keeper_test.go | 8 +- x/migrate/keeper/msg_server.go | 2 +- x/migrate/keeper/msg_server_test.go | 4 +- x/migrate/module.go | 6 +- x/migrate/types/msg.go | 2 +- x/migrate/types/msg_test.go | 4 +- x/optimism/module.go | 8 +- x/optimism/types/genesis.go | 2 +- x/optimism/types/key.go | 2 +- x/polygon/module.go | 8 +- x/polygon/types/genesis.go | 2 +- x/polygon/types/key.go | 2 +- x/staking/client/cli/tx.go | 2 +- x/staking/keeper/abci.go | 2 +- x/staking/keeper/abci_test.go | 8 +- x/staking/keeper/genesis.go | 2 +- x/staking/keeper/genesis_test.go | 4 +- x/staking/keeper/keeper.go | 2 +- x/staking/keeper/keeper_test.go | 8 +- x/staking/keeper/msg_server.go | 2 +- x/staking/keeper/msg_server_test.go | 6 +- x/staking/keeper/shares.go | 2 +- x/staking/keeper/shares_test.go | 2 +- x/staking/module.go | 6 +- x/staking/precompile/allowance_shares.go | 4 +- x/staking/precompile/allowance_shares_test.go | 10 +- x/staking/precompile/approve_shares.go | 6 +- x/staking/precompile/approve_shares_test.go | 10 +- x/staking/precompile/contract.go | 8 +- x/staking/precompile/contract_test.go | 12 +- x/staking/precompile/delegate.go | 8 +- x/staking/precompile/delegate_test.go | 12 +- x/staking/precompile/delegation.go | 4 +- x/staking/precompile/delegation_rewards.go | 4 +- .../precompile/delegation_rewards_test.go | 12 +- x/staking/precompile/delegation_test.go | 10 +- x/staking/precompile/keys.go | 2 +- x/staking/precompile/redelegate.go | 8 +- x/staking/precompile/redelegate_test.go | 10 +- x/staking/precompile/slashing_info.go | 4 +- x/staking/precompile/slashing_info_test.go | 10 +- x/staking/precompile/transfer_shares.go | 6 +- x/staking/precompile/transfer_shares_test.go | 8 +- x/staking/precompile/undelegate.go | 8 +- x/staking/precompile/undelegate_test.go | 10 +- x/staking/precompile/validator_list.go | 4 +- x/staking/precompile/validator_list_test.go | 10 +- x/staking/precompile/withdraw.go | 6 +- x/staking/precompile/withdraw_test.go | 12 +- x/staking/testutil/staking.go | 2 +- x/staking/testutil/staking_precompile.go | 8 +- x/staking/types/contract.go | 2 +- x/staking/types/msg_test.go | 6 +- x/tron/keeper/grpc_query_test.go | 6 +- x/tron/keeper/keeper.go | 4 +- x/tron/keeper/keeper_test.go | 12 +- x/tron/keeper/msg_server.go | 6 +- x/tron/keeper/msg_server_test.go | 6 +- x/tron/module.go | 10 +- x/tron/types/address.go | 2 +- x/tron/types/address_test.go | 2 +- x/tron/types/checkpoint.go | 4 +- x/tron/types/genesis.go | 2 +- x/tron/types/key.go | 2 +- x/tron/types/signer.go | 2 +- 367 files changed, 1136 insertions(+), 1396 deletions(-) delete mode 100644 app/upgrades/v7/constants.go delete mode 100644 app/upgrades/v7/upgrade.go create mode 100644 app/upgrades/v8/constants.go create mode 100644 app/upgrades/v8/upgrade.go diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 38693e3d0..c950beee6 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -23,7 +23,7 @@ jobs: uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version: "1.21" + go-version: "1.23" check-latest: true - name: Initialize CodeQL diff --git a/.github/workflows/golang.yml b/.github/workflows/golang.yml index 653b48d2a..c6899ffc8 100644 --- a/.github/workflows/golang.yml +++ b/.github/workflows/golang.yml @@ -34,10 +34,14 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version: 1.21 + go-version: '1.23' + - run: | + make check-no-lint + version=$(grep golangci_version= ./Makefile | awk -F '=' '{print $2}') + echo "GOLANGCI_VERSION=$version" >> $GITHUB_ENV - uses: golangci/golangci-lint-action@v6 with: - version: v1.55.2 + version: ${{ env.GOLANGCI_VERSION }} args: --timeout 10m test: @@ -46,7 +50,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version: 1.21 + go-version: '1.23' - run: make test mock: @@ -55,7 +59,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version: 1.21 + go-version: '1.23' - run: | make mocks git diff --exit-code diff --git a/.github/workflows/nightly-tests.yml b/.github/workflows/nightly-tests.yml index a3a6de7eb..a1919becf 100644 --- a/.github/workflows/nightly-tests.yml +++ b/.github/workflows/nightly-tests.yml @@ -22,5 +22,5 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version: 1.21 + go-version: '1.23' - run: make test-nightly diff --git a/.golangci.yml b/.golangci.yml index 4c649079d..33c9b83bb 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -8,9 +8,9 @@ run: tests: true # Define the Go version limit. - # Mainly related to generics support since go1.21. - # Default: use Go version from the go.mod file, fallback on the env var `GOVERSION`, fallback on 1.21 - go: '1.21' + # Mainly related to generics support since go1.23. + # Default: use Go version from the go.mod file, fallback on the env var `GOVERSION`, fallback on 1.23 + go: '1.23' linters: enable: @@ -34,6 +34,8 @@ linters-settings: min-complexity: 15 gocritic: disabled-checks: ["assignOp", "ifElseChain", "appendAssign"] + gosec: + excludes: [ "G115" ] gci: custom-order: true sections: diff --git a/Dockerfile b/Dockerfile index 72b02247c..29aeedf2e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,4 @@ -# compile fx-core -FROM golang:1.21.4-alpine3.18 as builder +FROM golang:1.23.0-alpine3.19 as builder RUN apk add --no-cache git build-base linux-headers @@ -9,8 +8,7 @@ COPY . . RUN make build -# build fx-core -FROM alpine:3.18 +FROM alpine:3.19 WORKDIR root diff --git a/Makefile b/Makefile index 22a3a8253..755fb549a 100644 --- a/Makefile +++ b/Makefile @@ -130,7 +130,7 @@ run-local: install ### Linting ### ############################################################################### -golangci_version=v1.55.2 +golangci_version=v1.60.3 lint-install: @echo "--> Installing golangci-lint $(golangci_version)" @@ -141,14 +141,17 @@ lint-install: go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(golangci_version); \ fi -lint: lint-install - echo "--> Running linter" - @golangci-lint run --build-tags=$(GO_BUILD) --out-format=tab - @if [ $$(find . -name '*.go' -type f | xargs grep 'nolint\|#nosec' | wc -l) -ne 45 ]; then \ +check-no-lint: + @if [ $$(find . -name '*.go' -type f | xargs grep 'nolint\|#nosec' | wc -l) -ne 44 ]; then \ echo "\033[91m--> increase or decrease nolint, please recheck them\033[0m"; \ - echo "\033[91m--> list nolint: \`find . -name '*.go' -type f | xargs grep 'nolint\|#nosec'\`\033[0m"; exit 1;\ + echo "\033[91m--> list nolint: \`find . -name '*.go' -type f | xargs grep 'nolint\|#nosec'\`\033[0m"; \ + exit 1;\ fi +lint: check-no-lint lint-install + @echo "--> Running linter" + @golangci-lint run --build-tags=$(GO_BUILD) --out-format=tab + format: lint-install @golangci-lint run --build-tags=$(GO_BUILD) --out-format=tab --fix @@ -248,7 +251,7 @@ contract-publish: ############################################################################### PACKAGE_NAME := $(shell go list -m) -GOLANG_CROSS_VERSION := v1.21 +GOLANG_CROSS_VERSION := v1.23 release-dry-run: docker run --rm --privileged -e CGO_ENABLED=1 \ -v /var/run/docker.sock:/var/run/docker.sock \ diff --git a/README.md b/README.md index 5114f635d..cce5e3a65 100644 --- a/README.md +++ b/README.md @@ -4,13 +4,13 @@ [![Version](https://img.shields.io/github/v/release/functionx/fx-core.svg)](https://github.com/functionx/fx-core/releases/latest) [![License](https://img.shields.io/github/license/functionx/fx-core.svg)](https://github.com/functionx/fx-core/blob/main/LICENSE) -[![API Reference](https://pkg.go.dev/badge/github.com/functionx/fx-core.svg)](https://pkg.go.dev/github.com/functionx/fx-core/v7) -[![Go Report Card](https://goreportcard.com/badge/github.com/functionx/fx-core/v7)](https://goreportcard.com/report/github.com/functionx/fx-core/v7) +[![API Reference](https://pkg.go.dev/badge/github.com/functionx/fx-core.svg)](https://pkg.go.dev/github.com/functionx/fx-core/v8) +[![Go Report Card](https://goreportcard.com/badge/github.com/functionx/fx-core/v8)](https://goreportcard.com/report/github.com/functionx/fx-core/v8) [![Go Tests/Lint](https://github.com/FunctionX/fx-core/actions/workflows/golang.yml/badge.svg)](https://github.com/FunctionX/fx-core/actions/workflows/golang.yml) [![CodeQL](https://github.com/FunctionX/fx-core/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/FunctionX/fx-core/actions/workflows/codeql-analysis.yml) [![Solidity](https://github.com/FunctionX/fx-core/actions/workflows/solidity.yml/badge.svg)](https://github.com/FunctionX/fx-core/actions/workflows/solidity.yml) -**Note**: Requires [Go 1.21+](https://go.dev/dl) +**Note**: Requires [Go 1.23+](https://go.dev/dl) ## Releases diff --git a/ante/pubkey.go b/ante/pubkey.go index 3776f440d..beb44b029 100644 --- a/ante/pubkey.go +++ b/ante/pubkey.go @@ -8,7 +8,7 @@ import ( "github.com/ethereum/go-ethereum/common" evmtypes "github.com/evmos/ethermint/x/evm/types" - fxstakingtypes "github.com/functionx/fx-core/v7/x/staking/types" + fxstakingtypes "github.com/functionx/fx-core/v8/x/staking/types" ) type PubKeyDecorator struct { diff --git a/app/app.go b/app/app.go index 6811a7f20..53d782a54 100644 --- a/app/app.go +++ b/app/app.go @@ -41,20 +41,20 @@ import ( "github.com/rakyll/statik/fs" "github.com/spf13/cast" - fxante "github.com/functionx/fx-core/v7/ante" - "github.com/functionx/fx-core/v7/app/keepers" - _ "github.com/functionx/fx-core/v7/docs/statik" - fxcfg "github.com/functionx/fx-core/v7/server/config" - fxauth "github.com/functionx/fx-core/v7/server/grpc/auth" - gaspricev1 "github.com/functionx/fx-core/v7/server/grpc/gasprice/legacy/v1" - gaspricev2 "github.com/functionx/fx-core/v7/server/grpc/gasprice/legacy/v2" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/crosschain" - "github.com/functionx/fx-core/v7/x/crosschain/keeper" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" - "github.com/functionx/fx-core/v7/x/gravity" - gravitykeeper "github.com/functionx/fx-core/v7/x/gravity/keeper" - gravitytypes "github.com/functionx/fx-core/v7/x/gravity/types" + fxante "github.com/functionx/fx-core/v8/ante" + "github.com/functionx/fx-core/v8/app/keepers" + _ "github.com/functionx/fx-core/v8/docs/statik" + fxcfg "github.com/functionx/fx-core/v8/server/config" + fxauth "github.com/functionx/fx-core/v8/server/grpc/auth" + gaspricev1 "github.com/functionx/fx-core/v8/server/grpc/gasprice/legacy/v1" + gaspricev2 "github.com/functionx/fx-core/v8/server/grpc/gasprice/legacy/v2" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/crosschain" + "github.com/functionx/fx-core/v8/x/crosschain/keeper" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/gravity" + gravitykeeper "github.com/functionx/fx-core/v8/x/gravity/keeper" + gravitytypes "github.com/functionx/fx-core/v8/x/gravity/types" ) var _ servertypes.Application = (*App)(nil) diff --git a/app/app_db_test.go b/app/app_db_test.go index 6b83014cb..95996e3bb 100644 --- a/app/app_db_test.go +++ b/app/app_db_test.go @@ -5,8 +5,8 @@ import ( "github.com/stretchr/testify/require" - "github.com/functionx/fx-core/v7/testutil/helpers" - fxtypes "github.com/functionx/fx-core/v7/types" + "github.com/functionx/fx-core/v8/testutil/helpers" + fxtypes "github.com/functionx/fx-core/v8/types" ) func TestAppDB(t *testing.T) { diff --git a/app/app_test.go b/app/app_test.go index 2799067c4..0a45a0bfd 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/stretchr/testify/assert" - "github.com/functionx/fx-core/v7/app" - fxtypes "github.com/functionx/fx-core/v7/types" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" - govlegacy "github.com/functionx/fx-core/v7/x/gov/legacy" - gravitytypes "github.com/functionx/fx-core/v7/x/gravity/types" + "github.com/functionx/fx-core/v8/app" + fxtypes "github.com/functionx/fx-core/v8/types" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" + govlegacy "github.com/functionx/fx-core/v8/x/gov/legacy" + gravitytypes "github.com/functionx/fx-core/v8/x/gravity/types" ) func Test_MsgServiceRouter(t *testing.T) { diff --git a/app/encoding.go b/app/encoding.go index cdbd25d20..98fd6732a 100644 --- a/app/encoding.go +++ b/app/encoding.go @@ -13,8 +13,8 @@ import ( "github.com/evmos/ethermint/crypto/ethsecp256k1" etherminttypes "github.com/evmos/ethermint/types" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" - gravitytypes "github.com/functionx/fx-core/v7/x/gravity/types" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" + gravitytypes "github.com/functionx/fx-core/v8/x/gravity/types" ) // EncodingConfig specifies the concrete encoding types to use for a given app. diff --git a/app/encoding_test.go b/app/encoding_test.go index 8375a10ad..b237468b6 100644 --- a/app/encoding_test.go +++ b/app/encoding_test.go @@ -8,8 +8,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/assert" - "github.com/functionx/fx-core/v7/app" - "github.com/functionx/fx-core/v7/testutil/helpers" + "github.com/functionx/fx-core/v8/app" + "github.com/functionx/fx-core/v8/testutil/helpers" ) func TestMakeEncodingConfig_RegisterInterfaces(t *testing.T) { diff --git a/app/export_test.go b/app/export_test.go index 71f995cad..6a303c264 100644 --- a/app/export_test.go +++ b/app/export_test.go @@ -34,12 +34,12 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/stretchr/testify/require" - "github.com/functionx/fx-core/v7/app" - fxcfg "github.com/functionx/fx-core/v7/server/config" - "github.com/functionx/fx-core/v7/testutil/helpers" - "github.com/functionx/fx-core/v7/testutil/network" - fxtypes "github.com/functionx/fx-core/v7/types" - fxstakingtypes "github.com/functionx/fx-core/v7/x/staking/types" + "github.com/functionx/fx-core/v8/app" + fxcfg "github.com/functionx/fx-core/v8/server/config" + "github.com/functionx/fx-core/v8/testutil/helpers" + "github.com/functionx/fx-core/v8/testutil/network" + fxtypes "github.com/functionx/fx-core/v8/types" + fxstakingtypes "github.com/functionx/fx-core/v8/x/staking/types" ) func Test_ExportGenesisAndRunNode(t *testing.T) { diff --git a/app/genesis.go b/app/genesis.go index 5f959bf03..cd9721358 100644 --- a/app/genesis.go +++ b/app/genesis.go @@ -25,9 +25,9 @@ import ( evmtypes "github.com/evmos/ethermint/x/evm/types" feemarkettypes "github.com/evmos/ethermint/x/feemarket/types" - fxtypes "github.com/functionx/fx-core/v7/types" - ethtypes "github.com/functionx/fx-core/v7/x/eth/types" - fxstakingtypes "github.com/functionx/fx-core/v7/x/staking/types" + fxtypes "github.com/functionx/fx-core/v8/types" + ethtypes "github.com/functionx/fx-core/v8/x/eth/types" + fxstakingtypes "github.com/functionx/fx-core/v8/x/staking/types" ) const ( diff --git a/app/genesis_test.go b/app/genesis_test.go index 44fb06287..72db5b83b 100644 --- a/app/genesis_test.go +++ b/app/genesis_test.go @@ -3,9 +3,9 @@ package app_test import ( "testing" - "github.com/functionx/fx-core/v7/app" - "github.com/functionx/fx-core/v7/testutil/helpers" - fxtypes "github.com/functionx/fx-core/v7/types" + "github.com/functionx/fx-core/v8/app" + "github.com/functionx/fx-core/v8/testutil/helpers" + fxtypes "github.com/functionx/fx-core/v8/types" ) func TestNewDefaultGenesisByDenom(t *testing.T) { diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index d84c6931b..81fdf9ec5 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -58,37 +58,37 @@ import ( feemarkettypes "github.com/evmos/ethermint/x/feemarket/types" "github.com/spf13/cast" - fxtypes "github.com/functionx/fx-core/v7/types" - arbitrumtypes "github.com/functionx/fx-core/v7/x/arbitrum/types" - fxauthzkeeper "github.com/functionx/fx-core/v7/x/authz/keeper" - avalanchetypes "github.com/functionx/fx-core/v7/x/avalanche/types" - bsctypes "github.com/functionx/fx-core/v7/x/bsc/types" - "github.com/functionx/fx-core/v7/x/crosschain" - crosschainkeeper "github.com/functionx/fx-core/v7/x/crosschain/keeper" - crosschainprecompile "github.com/functionx/fx-core/v7/x/crosschain/precompile" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" - "github.com/functionx/fx-core/v7/x/erc20" - erc20keeper "github.com/functionx/fx-core/v7/x/erc20/keeper" - erc20types "github.com/functionx/fx-core/v7/x/erc20/types" - ethtypes "github.com/functionx/fx-core/v7/x/eth/types" - fxevmkeeper "github.com/functionx/fx-core/v7/x/evm/keeper" - fxgovkeeper "github.com/functionx/fx-core/v7/x/gov/keeper" - fxgovtypes "github.com/functionx/fx-core/v7/x/gov/types" - gravitytypes "github.com/functionx/fx-core/v7/x/gravity/types" - fxtransfer "github.com/functionx/fx-core/v7/x/ibc/applications/transfer" - fxtransferkeeper "github.com/functionx/fx-core/v7/x/ibc/applications/transfer/keeper" - fxibctransfertypes "github.com/functionx/fx-core/v7/x/ibc/applications/transfer/types" - "github.com/functionx/fx-core/v7/x/ibc/ibcrouter" - layer2types "github.com/functionx/fx-core/v7/x/layer2/types" - migratekeeper "github.com/functionx/fx-core/v7/x/migrate/keeper" - migratetypes "github.com/functionx/fx-core/v7/x/migrate/types" - optimismtypes "github.com/functionx/fx-core/v7/x/optimism/types" - polygontypes "github.com/functionx/fx-core/v7/x/polygon/types" - fxslashingkeeper "github.com/functionx/fx-core/v7/x/slashing/keeper" - fxstakingkeeper "github.com/functionx/fx-core/v7/x/staking/keeper" - stakingprecompile "github.com/functionx/fx-core/v7/x/staking/precompile" - tronkeeper "github.com/functionx/fx-core/v7/x/tron/keeper" - trontypes "github.com/functionx/fx-core/v7/x/tron/types" + fxtypes "github.com/functionx/fx-core/v8/types" + arbitrumtypes "github.com/functionx/fx-core/v8/x/arbitrum/types" + fxauthzkeeper "github.com/functionx/fx-core/v8/x/authz/keeper" + avalanchetypes "github.com/functionx/fx-core/v8/x/avalanche/types" + bsctypes "github.com/functionx/fx-core/v8/x/bsc/types" + "github.com/functionx/fx-core/v8/x/crosschain" + crosschainkeeper "github.com/functionx/fx-core/v8/x/crosschain/keeper" + crosschainprecompile "github.com/functionx/fx-core/v8/x/crosschain/precompile" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/erc20" + erc20keeper "github.com/functionx/fx-core/v8/x/erc20/keeper" + erc20types "github.com/functionx/fx-core/v8/x/erc20/types" + ethtypes "github.com/functionx/fx-core/v8/x/eth/types" + fxevmkeeper "github.com/functionx/fx-core/v8/x/evm/keeper" + fxgovkeeper "github.com/functionx/fx-core/v8/x/gov/keeper" + fxgovtypes "github.com/functionx/fx-core/v8/x/gov/types" + gravitytypes "github.com/functionx/fx-core/v8/x/gravity/types" + fxtransfer "github.com/functionx/fx-core/v8/x/ibc/applications/transfer" + fxtransferkeeper "github.com/functionx/fx-core/v8/x/ibc/applications/transfer/keeper" + fxibctransfertypes "github.com/functionx/fx-core/v8/x/ibc/applications/transfer/types" + "github.com/functionx/fx-core/v8/x/ibc/ibcrouter" + layer2types "github.com/functionx/fx-core/v8/x/layer2/types" + migratekeeper "github.com/functionx/fx-core/v8/x/migrate/keeper" + migratetypes "github.com/functionx/fx-core/v8/x/migrate/types" + optimismtypes "github.com/functionx/fx-core/v8/x/optimism/types" + polygontypes "github.com/functionx/fx-core/v8/x/polygon/types" + fxslashingkeeper "github.com/functionx/fx-core/v8/x/slashing/keeper" + fxstakingkeeper "github.com/functionx/fx-core/v8/x/staking/keeper" + stakingprecompile "github.com/functionx/fx-core/v8/x/staking/precompile" + tronkeeper "github.com/functionx/fx-core/v8/x/tron/keeper" + trontypes "github.com/functionx/fx-core/v8/x/tron/types" ) type CrossChainKeepers struct { diff --git a/app/keepers/keepers_test.go b/app/keepers/keepers_test.go index 2c7b5f795..a6671a7c0 100644 --- a/app/keepers/keepers_test.go +++ b/app/keepers/keepers_test.go @@ -9,9 +9,9 @@ import ( "github.com/cosmos/cosmos-sdk/baseapp" "github.com/stretchr/testify/assert" - "github.com/functionx/fx-core/v7/app" - "github.com/functionx/fx-core/v7/app/keepers" - fxtypes "github.com/functionx/fx-core/v7/types" + "github.com/functionx/fx-core/v8/app" + "github.com/functionx/fx-core/v8/app/keepers" + fxtypes "github.com/functionx/fx-core/v8/types" ) func TestNewAppKeeper(t *testing.T) { @@ -69,8 +69,7 @@ func checkStructField(t *testing.T, valueOf reflect.Value, name string) { assert.Falsef(t, valueOfField.IsNil(), "%s-%s-%s", valueOf.Type().PkgPath(), typeOfField.Name, name) } - switch valueOfField.Kind() { - case reflect.Pointer, reflect.Interface: + if valueOfField.Kind() == reflect.Pointer || valueOfField.Kind() == reflect.Interface { if typeOfField.Name == "QueryServer" || (name == "EvidenceKeeper" && typeOfField.Name == "router") { return diff --git a/app/keepers/keys.go b/app/keepers/keys.go index f94b05205..641ac77a3 100644 --- a/app/keepers/keys.go +++ b/app/keepers/keys.go @@ -23,16 +23,16 @@ import ( evmtypes "github.com/evmos/ethermint/x/evm/types" feemarkettypes "github.com/evmos/ethermint/x/feemarket/types" - arbitrumtypes "github.com/functionx/fx-core/v7/x/arbitrum/types" - avalanchetypes "github.com/functionx/fx-core/v7/x/avalanche/types" - bsctypes "github.com/functionx/fx-core/v7/x/bsc/types" - erc20types "github.com/functionx/fx-core/v7/x/erc20/types" - ethtypes "github.com/functionx/fx-core/v7/x/eth/types" - layer2types "github.com/functionx/fx-core/v7/x/layer2/types" - migratetypes "github.com/functionx/fx-core/v7/x/migrate/types" - optimismtypes "github.com/functionx/fx-core/v7/x/optimism/types" - polygontypes "github.com/functionx/fx-core/v7/x/polygon/types" - trontypes "github.com/functionx/fx-core/v7/x/tron/types" + arbitrumtypes "github.com/functionx/fx-core/v8/x/arbitrum/types" + avalanchetypes "github.com/functionx/fx-core/v8/x/avalanche/types" + bsctypes "github.com/functionx/fx-core/v8/x/bsc/types" + erc20types "github.com/functionx/fx-core/v8/x/erc20/types" + ethtypes "github.com/functionx/fx-core/v8/x/eth/types" + layer2types "github.com/functionx/fx-core/v8/x/layer2/types" + migratetypes "github.com/functionx/fx-core/v8/x/migrate/types" + optimismtypes "github.com/functionx/fx-core/v8/x/optimism/types" + polygontypes "github.com/functionx/fx-core/v8/x/polygon/types" + trontypes "github.com/functionx/fx-core/v8/x/tron/types" ) func (appKeepers *AppKeepers) generateKeys() { diff --git a/app/modules.go b/app/modules.go index 098ae1016..fc07aa0e8 100644 --- a/app/modules.go +++ b/app/modules.go @@ -47,33 +47,33 @@ import ( "github.com/evmos/ethermint/x/feemarket" feemarkettypes "github.com/evmos/ethermint/x/feemarket/types" - "github.com/functionx/fx-core/v7/x/arbitrum" - arbitrumtypes "github.com/functionx/fx-core/v7/x/arbitrum/types" - "github.com/functionx/fx-core/v7/x/avalanche" - avalanchetypes "github.com/functionx/fx-core/v7/x/avalanche/types" - "github.com/functionx/fx-core/v7/x/bsc" - bsctypes "github.com/functionx/fx-core/v7/x/bsc/types" - crosschainclient "github.com/functionx/fx-core/v7/x/crosschain/client" - "github.com/functionx/fx-core/v7/x/erc20" - erc20client "github.com/functionx/fx-core/v7/x/erc20/client" - erc20types "github.com/functionx/fx-core/v7/x/erc20/types" - "github.com/functionx/fx-core/v7/x/eth" - ethtypes "github.com/functionx/fx-core/v7/x/eth/types" - fxevm "github.com/functionx/fx-core/v7/x/evm" - fxgov "github.com/functionx/fx-core/v7/x/gov" - fxibctransfer "github.com/functionx/fx-core/v7/x/ibc/applications/transfer" - fxibctransfertypes "github.com/functionx/fx-core/v7/x/ibc/applications/transfer/types" - "github.com/functionx/fx-core/v7/x/layer2" - layer2types "github.com/functionx/fx-core/v7/x/layer2/types" - "github.com/functionx/fx-core/v7/x/migrate" - migratetypes "github.com/functionx/fx-core/v7/x/migrate/types" - "github.com/functionx/fx-core/v7/x/optimism" - optimismtypes "github.com/functionx/fx-core/v7/x/optimism/types" - "github.com/functionx/fx-core/v7/x/polygon" - polygontypes "github.com/functionx/fx-core/v7/x/polygon/types" - fxstaking "github.com/functionx/fx-core/v7/x/staking" - "github.com/functionx/fx-core/v7/x/tron" - trontypes "github.com/functionx/fx-core/v7/x/tron/types" + "github.com/functionx/fx-core/v8/x/arbitrum" + arbitrumtypes "github.com/functionx/fx-core/v8/x/arbitrum/types" + "github.com/functionx/fx-core/v8/x/avalanche" + avalanchetypes "github.com/functionx/fx-core/v8/x/avalanche/types" + "github.com/functionx/fx-core/v8/x/bsc" + bsctypes "github.com/functionx/fx-core/v8/x/bsc/types" + crosschainclient "github.com/functionx/fx-core/v8/x/crosschain/client" + "github.com/functionx/fx-core/v8/x/erc20" + erc20client "github.com/functionx/fx-core/v8/x/erc20/client" + erc20types "github.com/functionx/fx-core/v8/x/erc20/types" + "github.com/functionx/fx-core/v8/x/eth" + ethtypes "github.com/functionx/fx-core/v8/x/eth/types" + fxevm "github.com/functionx/fx-core/v8/x/evm" + fxgov "github.com/functionx/fx-core/v8/x/gov" + fxibctransfer "github.com/functionx/fx-core/v8/x/ibc/applications/transfer" + fxibctransfertypes "github.com/functionx/fx-core/v8/x/ibc/applications/transfer/types" + "github.com/functionx/fx-core/v8/x/layer2" + layer2types "github.com/functionx/fx-core/v8/x/layer2/types" + "github.com/functionx/fx-core/v8/x/migrate" + migratetypes "github.com/functionx/fx-core/v8/x/migrate/types" + "github.com/functionx/fx-core/v8/x/optimism" + optimismtypes "github.com/functionx/fx-core/v8/x/optimism/types" + "github.com/functionx/fx-core/v8/x/polygon" + polygontypes "github.com/functionx/fx-core/v8/x/polygon/types" + fxstaking "github.com/functionx/fx-core/v8/x/staking" + "github.com/functionx/fx-core/v8/x/tron" + trontypes "github.com/functionx/fx-core/v8/x/tron/types" ) // module account permissions diff --git a/app/modules_test.go b/app/modules_test.go index 494b92d7c..1727e0c0d 100644 --- a/app/modules_test.go +++ b/app/modules_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/functionx/fx-core/v7/testutil/helpers" + "github.com/functionx/fx-core/v8/testutil/helpers" ) func TestOnOrderBeginBlockers(t *testing.T) { diff --git a/app/upgrade.go b/app/upgrade.go index b47be0953..6882e1753 100644 --- a/app/upgrade.go +++ b/app/upgrade.go @@ -5,8 +5,8 @@ import ( upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - "github.com/functionx/fx-core/v7/app/upgrades" - nextversion "github.com/functionx/fx-core/v7/app/upgrades/v7" + "github.com/functionx/fx-core/v8/app/upgrades" + nextversion "github.com/functionx/fx-core/v8/app/upgrades/v8" ) func (app *App) GetUpgrade() upgrades.Upgrade { diff --git a/app/upgrade_test.go b/app/upgrade_test.go index 1239f06e2..eb700199d 100644 --- a/app/upgrade_test.go +++ b/app/upgrade_test.go @@ -21,10 +21,10 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/functionx/fx-core/v7/app" - nextversion "github.com/functionx/fx-core/v7/app/upgrades/v7" - "github.com/functionx/fx-core/v7/testutil/helpers" - fxtypes "github.com/functionx/fx-core/v7/types" + "github.com/functionx/fx-core/v8/app" + nextversion "github.com/functionx/fx-core/v8/app/upgrades/v8" + "github.com/functionx/fx-core/v8/testutil/helpers" + fxtypes "github.com/functionx/fx-core/v8/types" ) func Test_UpgradeAndMigrate(t *testing.T) { diff --git a/app/upgrades/types.go b/app/upgrades/types.go index 475e8dfe7..b447658a5 100644 --- a/app/upgrades/types.go +++ b/app/upgrades/types.go @@ -6,7 +6,7 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - "github.com/functionx/fx-core/v7/app/keepers" + "github.com/functionx/fx-core/v8/app/keepers" ) // Upgrade defines a struct containing necessary fields that a SoftwareUpgradeProposal diff --git a/app/upgrades/v7/constants.go b/app/upgrades/v7/constants.go deleted file mode 100644 index 1044dfcd4..000000000 --- a/app/upgrades/v7/constants.go +++ /dev/null @@ -1,26 +0,0 @@ -package v7 - -import ( - storetypes "github.com/cosmos/cosmos-sdk/store/types" - consensustypes "github.com/cosmos/cosmos-sdk/x/consensus/types" - crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types" - - "github.com/functionx/fx-core/v7/app/upgrades" - fxtypes "github.com/functionx/fx-core/v7/types" -) - -var Upgrade = upgrades.Upgrade{ - UpgradeName: "v7.5.x", - CreateUpgradeHandler: CreateUpgradeHandler, - StoreUpgrades: func() *storetypes.StoreUpgrades { - if fxtypes.ChainId() == fxtypes.TestnetChainId { - return &storetypes.StoreUpgrades{} - } - return &storetypes.StoreUpgrades{ - Added: []string{ - crisistypes.ModuleName, - consensustypes.ModuleName, - }, - } - }, -} diff --git a/app/upgrades/v7/upgrade.go b/app/upgrades/v7/upgrade.go deleted file mode 100644 index 86abaf90f..000000000 --- a/app/upgrades/v7/upgrade.go +++ /dev/null @@ -1,132 +0,0 @@ -package v7 - -import ( - "time" - - "github.com/cosmos/cosmos-sdk/baseapp" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/module" - sdktx "github.com/cosmos/cosmos-sdk/types/tx" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - - "github.com/functionx/fx-core/v7/app/keepers" - "github.com/functionx/fx-core/v7/contract" - fxtypes "github.com/functionx/fx-core/v7/types" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" - fxevmkeeper "github.com/functionx/fx-core/v7/x/evm/keeper" - fxgovkeeper "github.com/functionx/fx-core/v7/x/gov/keeper" -) - -func CreateUpgradeHandler(mm *module.Manager, configurator module.Configurator, app *keepers.AppKeepers) upgradetypes.UpgradeHandler { - return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { - // Testnet skip - if ctx.ChainID() == fxtypes.TestnetChainId { - return fromVM, nil - } - // Migrate Tendermint consensus parameters from x/params module to a dedicated x/consensus module. - baseAppLegacySS, found := app.ParamsKeeper.GetSubspace(baseapp.Paramspace) - if !found { - panic("baseapp subspace not found") - } - baseapp.MigrateParams(ctx, baseAppLegacySS, &app.ConsensusParamsKeeper) - - cacheCtx, commit := ctx.CacheContext() - - ctx.Logger().Info("start to run migrations...", "module", "upgrade", "plan", plan.Name) - toVM, err := mm.RunMigrations(cacheCtx, configurator, fromVM) - if err != nil { - return fromVM, err - } - - UpdateWFXLogicCode(cacheCtx, app.EvmKeeper) - UpdateFIP20LogicCode(cacheCtx, app.EvmKeeper) - crosschainBridgeCallFrom := authtypes.NewModuleAddress(crosschaintypes.ModuleName) - if account := app.AccountKeeper.GetAccount(ctx, crosschainBridgeCallFrom); account == nil { - app.AccountKeeper.SetAccount(ctx, app.AccountKeeper.NewAccountWithAddress(ctx, crosschainBridgeCallFrom)) - } - - MigrateCommunityPoolSpendProposals(cacheCtx, app.GovKeeper) - - commit() - ctx.Logger().Info("upgrade complete", "module", "upgrade") - return toVM, nil - } -} - -func UpdateWFXLogicCode(ctx sdk.Context, keeper *fxevmkeeper.Keeper) { - wfx := contract.GetWFX() - if err := keeper.UpdateContractCode(ctx, wfx.Address, wfx.Code); err != nil { - ctx.Logger().Error("update WFX contract", "module", "upgrade", "err", err.Error()) - } else { - ctx.Logger().Info("update WFX contract", "module", "upgrade", "codeHash", wfx.CodeHash()) - } -} - -func UpdateFIP20LogicCode(ctx sdk.Context, keeper *fxevmkeeper.Keeper) { - fip20 := contract.GetFIP20() - if err := keeper.UpdateContractCode(ctx, fip20.Address, fip20.Code); err != nil { - ctx.Logger().Error("update FIP20 contract", "module", "upgrade", "err", err.Error()) - } else { - ctx.Logger().Info("update FIP20 contract", "module", "upgrade", "codeHash", fip20.CodeHash()) - } -} - -func MigrateCommunityPoolSpendProposals(ctx sdk.Context, keeper *fxgovkeeper.Keeper) { - // migrate inactive CommunityPoolSpendProposal - maxEndTime := time.Hour * 24 * 14 - keeper.IterateInactiveProposalsQueue(ctx, ctx.BlockHeader().Time.Add(maxEndTime), func(proposal v1.Proposal) (stop bool) { - ConvertCommunityPoolSpendProposal(ctx, keeper, proposal) - return false - }) - - // migrate active CommunityPoolSpendProposal - keeper.IterateActiveProposalsQueue(ctx, ctx.BlockHeader().Time.Add(maxEndTime), func(proposal v1.Proposal) (stop bool) { - ConvertCommunityPoolSpendProposal(ctx, keeper, proposal) - return false - }) -} - -func ConvertCommunityPoolSpendProposal(ctx sdk.Context, keeper *fxgovkeeper.Keeper, proposal v1.Proposal) { - msgs, err := proposal.GetMsgs() - if err != nil { - panic(err) - } - haveSpendMsg := false - newMsgs := make([]sdk.Msg, 0, len(msgs)) - for _, msg := range msgs { - legacyMsg, ok := msg.(*v1.MsgExecLegacyContent) - if !ok { - newMsgs = append(newMsgs, msg) - continue - } - content, err := v1.LegacyContentFromMessage(legacyMsg) - if err != nil { - panic(err) - } - cpsp, ok := content.(*distrtypes.CommunityPoolSpendProposal) // nolint:staticcheck - if !ok { - newMsgs = append(newMsgs, msg) - continue - } - haveSpendMsg = true - spendMsg := &distrtypes.MsgCommunityPoolSpend{ - Authority: keeper.GetAuthority(), - Recipient: cpsp.Recipient, - Amount: cpsp.Amount, - } - newMsgs = append(newMsgs, spendMsg) - } - if !haveSpendMsg { - return - } - ctx.Logger().Info("migrate community pool spend proposal,", "id", proposal.Id) - anyMsgs, err := sdktx.SetMsgs(newMsgs) - if err != nil { - panic(err) - } - proposal.Messages = anyMsgs - keeper.SetProposal(ctx, proposal) -} diff --git a/app/upgrades/v8/constants.go b/app/upgrades/v8/constants.go new file mode 100644 index 000000000..ca87075bc --- /dev/null +++ b/app/upgrades/v8/constants.go @@ -0,0 +1,15 @@ +package v8 + +import ( + storetypes "github.com/cosmos/cosmos-sdk/store/types" + + "github.com/functionx/fx-core/v8/app/upgrades" +) + +var Upgrade = upgrades.Upgrade{ + UpgradeName: "v8.0.x", + CreateUpgradeHandler: CreateUpgradeHandler, + StoreUpgrades: func() *storetypes.StoreUpgrades { + return &storetypes.StoreUpgrades{} + }, +} diff --git a/app/upgrades/v8/upgrade.go b/app/upgrades/v8/upgrade.go new file mode 100644 index 000000000..7964eac10 --- /dev/null +++ b/app/upgrades/v8/upgrade.go @@ -0,0 +1,24 @@ +package v8 + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" + upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" + + "github.com/functionx/fx-core/v8/app/keepers" +) + +func CreateUpgradeHandler(mm *module.Manager, configurator module.Configurator, app *keepers.AppKeepers) upgradetypes.UpgradeHandler { + return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + cacheCtx, commit := ctx.CacheContext() + + ctx.Logger().Info("start to run migrations...", "module", "upgrade", "plan", plan.Name) + toVM, err := mm.RunMigrations(cacheCtx, configurator, fromVM) + if err != nil { + return fromVM, err + } + commit() + ctx.Logger().Info("upgrade complete", "module", "upgrade") + return toVM, nil + } +} diff --git a/client/cli/debug_test.go b/client/cli/debug_test.go index a04f3c79e..95f6733f2 100644 --- a/client/cli/debug_test.go +++ b/client/cli/debug_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/functionx/fx-core/v7/client/cli" + "github.com/functionx/fx-core/v8/client/cli" ) func TestToStringCmd(t *testing.T) { diff --git a/client/cli/keys/output_test.go b/client/cli/keys/output_test.go index ced4cb228..3deee1b65 100644 --- a/client/cli/keys/output_test.go +++ b/client/cli/keys/output_test.go @@ -8,8 +8,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/assert" - "github.com/functionx/fx-core/v7/app" - "github.com/functionx/fx-core/v7/client/cli/keys" + "github.com/functionx/fx-core/v8/app" + "github.com/functionx/fx-core/v8/client/cli/keys" ) func TestNewKeyOutput(t *testing.T) { diff --git a/client/client_test.go b/client/client_test.go index 716168186..2a6d88cbf 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -26,15 +26,15 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" - "github.com/functionx/fx-core/v7/app" - "github.com/functionx/fx-core/v7/client" - "github.com/functionx/fx-core/v7/client/grpc" - "github.com/functionx/fx-core/v7/client/jsonrpc" - fxauth "github.com/functionx/fx-core/v7/server/grpc/auth" - "github.com/functionx/fx-core/v7/testutil" - "github.com/functionx/fx-core/v7/testutil/helpers" - "github.com/functionx/fx-core/v7/testutil/network" - fxtypes "github.com/functionx/fx-core/v7/types" + "github.com/functionx/fx-core/v8/app" + "github.com/functionx/fx-core/v8/client" + "github.com/functionx/fx-core/v8/client/grpc" + "github.com/functionx/fx-core/v8/client/jsonrpc" + fxauth "github.com/functionx/fx-core/v8/server/grpc/auth" + "github.com/functionx/fx-core/v8/testutil" + "github.com/functionx/fx-core/v8/testutil/helpers" + "github.com/functionx/fx-core/v8/testutil/network" + fxtypes "github.com/functionx/fx-core/v8/types" ) type rpcTestClient interface { @@ -606,19 +606,19 @@ func (suite *rpcTestSuite) TestTmClient() { func (suite *rpcTestSuite) TestClient_WithBlockHeight() { key := suite.GetPrivKeyByIndex(hd.Secp256k1Type, 1) clients := suite.GetClients() - for _, client := range clients { - balances, err := client.QueryBalances(sdk.AccAddress(key.PubKey().Address().Bytes()).String()) + for _, cli := range clients { + balances, err := cli.QueryBalances(sdk.AccAddress(key.PubKey().Address().Bytes()).String()) suite.NoError(err) suite.True(balances.IsAllPositive()) - if rpc, ok := client.(*jsonrpc.NodeRPC); ok { - client = rpc.WithBlockHeight(1) + if rpc, ok := cli.(*jsonrpc.NodeRPC); ok { + cli = rpc.WithBlockHeight(1) } - if rpc, ok := client.(*grpc.Client); ok { - client = rpc.WithBlockHeight(1) + if rpc, ok := cli.(*grpc.Client); ok { + cli = rpc.WithBlockHeight(1) } - balances, err = client.QueryBalances(sdk.AccAddress(key.PubKey().Address().Bytes()).String()) + balances, err = cli.QueryBalances(sdk.AccAddress(key.PubKey().Address().Bytes()).String()) suite.NoError(err) suite.False(balances.IsAllPositive()) } @@ -626,8 +626,8 @@ func (suite *rpcTestSuite) TestClient_WithBlockHeight() { func (suite *rpcTestSuite) TestGRPCClient_ConvertAddress() { validator := suite.GetFirstValidator() - client := fxauth.NewQueryClient(validator.ClientCtx) - res, err := client.ConvertAddress(context.Background(), &fxauth.ConvertAddressRequest{ + cli := fxauth.NewQueryClient(validator.ClientCtx) + res, err := cli.ConvertAddress(context.Background(), &fxauth.ConvertAddressRequest{ Address: validator.Address.String(), Prefix: sdk.GetConfig().GetBech32ValidatorAddrPrefix(), }) diff --git a/client/grpc/grpc_client.go b/client/grpc/grpc_client.go index fdf706ae6..7e11cc3fc 100644 --- a/client/grpc/grpc_client.go +++ b/client/grpc/grpc_client.go @@ -35,10 +35,10 @@ import ( "google.golang.org/grpc/credentials/insecure" "google.golang.org/grpc/metadata" - "github.com/functionx/fx-core/v7/client" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" - erc20types "github.com/functionx/fx-core/v7/x/erc20/types" - migratetypes "github.com/functionx/fx-core/v7/x/migrate/types" + "github.com/functionx/fx-core/v8/client" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" + erc20types "github.com/functionx/fx-core/v8/x/erc20/types" + migratetypes "github.com/functionx/fx-core/v8/x/migrate/types" ) type Client struct { diff --git a/client/grpc/grpc_client_test.go b/client/grpc/grpc_client_test.go index 7303b3232..26f9985c3 100644 --- a/client/grpc/grpc_client_test.go +++ b/client/grpc/grpc_client_test.go @@ -7,8 +7,8 @@ import ( "github.com/evmos/ethermint/crypto/ethsecp256k1" "github.com/stretchr/testify/assert" - "github.com/functionx/fx-core/v7/client/grpc" - "github.com/functionx/fx-core/v7/testutil/helpers" + "github.com/functionx/fx-core/v8/client/grpc" + "github.com/functionx/fx-core/v8/testutil/helpers" ) func TestClient_QueryBalances(t *testing.T) { diff --git a/client/jsonrpc/abci_query.go b/client/jsonrpc/abci_query.go index 6d60d7330..d99ec7142 100644 --- a/client/jsonrpc/abci_query.go +++ b/client/jsonrpc/abci_query.go @@ -13,7 +13,7 @@ import ( "github.com/cosmos/gogoproto/proto" "github.com/pkg/errors" - "github.com/functionx/fx-core/v7/client" + "github.com/functionx/fx-core/v8/client" ) func (c *NodeRPC) GetModuleAccounts() ([]authtypes.AccountI, error) { diff --git a/client/jsonrpc/json_rpc.go b/client/jsonrpc/json_rpc.go index f3d14f8d0..c7fa192fb 100644 --- a/client/jsonrpc/json_rpc.go +++ b/client/jsonrpc/json_rpc.go @@ -20,7 +20,7 @@ import ( "github.com/cosmos/gogoproto/proto" "github.com/pkg/errors" - "github.com/functionx/fx-core/v7/client" + "github.com/functionx/fx-core/v8/client" ) type jsonRPCCaller interface { diff --git a/client/jsonrpc/rpc_client.go b/client/jsonrpc/rpc_client.go index ad7d3c725..8319661f4 100644 --- a/client/jsonrpc/rpc_client.go +++ b/client/jsonrpc/rpc_client.go @@ -230,7 +230,7 @@ func (ws *WSClient) Call(ctx context.Context, method string, params map[string]i resp := <-respChan if resp.Error != nil { - return fmt.Errorf(resp.Error.String()) + return errors.New(resp.Error.String()) } return tmjson.Unmarshal(resp.Result, result) diff --git a/cmd/config.go b/cmd/config.go index 03d25dfbd..99dccdee2 100644 --- a/cmd/config.go +++ b/cmd/config.go @@ -10,7 +10,7 @@ import ( "github.com/cosmos/cosmos-sdk/server/config" "github.com/spf13/cobra" - fxcfg "github.com/functionx/fx-core/v7/server/config" + fxcfg "github.com/functionx/fx-core/v8/server/config" ) const ( diff --git a/cmd/config_test.go b/cmd/config_test.go index bd7936e33..c68ce5072 100644 --- a/cmd/config_test.go +++ b/cmd/config_test.go @@ -16,7 +16,7 @@ import ( "github.com/spf13/viper" "github.com/stretchr/testify/assert" - fxcfg "github.com/functionx/fx-core/v7/server/config" + fxcfg "github.com/functionx/fx-core/v8/server/config" ) func Test_updateCfgCmd(t *testing.T) { diff --git a/cmd/delegate.go b/cmd/delegate.go index e29e20c54..4441f5bb1 100644 --- a/cmd/delegate.go +++ b/cmd/delegate.go @@ -24,10 +24,10 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - "github.com/functionx/fx-core/v7/app" - "github.com/functionx/fx-core/v7/contract" - "github.com/functionx/fx-core/v7/server" - fxtypes "github.com/functionx/fx-core/v7/types" + "github.com/functionx/fx-core/v8/app" + "github.com/functionx/fx-core/v8/contract" + "github.com/functionx/fx-core/v8/server" + fxtypes "github.com/functionx/fx-core/v8/types" ) type output struct { diff --git a/cmd/doctor.go b/cmd/doctor.go index 048f82195..56701d59f 100644 --- a/cmd/doctor.go +++ b/cmd/doctor.go @@ -30,10 +30,10 @@ import ( "github.com/spf13/cobra" "github.com/spf13/viper" - "github.com/functionx/fx-core/v7/client/grpc" - "github.com/functionx/fx-core/v7/server" - fxcfg "github.com/functionx/fx-core/v7/server/config" - fxtypes "github.com/functionx/fx-core/v7/types" + "github.com/functionx/fx-core/v8/client/grpc" + "github.com/functionx/fx-core/v8/server" + fxcfg "github.com/functionx/fx-core/v8/server/config" + fxtypes "github.com/functionx/fx-core/v8/types" ) const SPACE = " " diff --git a/cmd/doctor_test.go b/cmd/doctor_test.go index 549c068d4..60ac6eea4 100644 --- a/cmd/doctor_test.go +++ b/cmd/doctor_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/assert" - fxtypes "github.com/functionx/fx-core/v7/types" + fxtypes "github.com/functionx/fx-core/v8/types" ) func Test_doctorCmd(t *testing.T) { diff --git a/cmd/fxcored/main.go b/cmd/fxcored/main.go index 0be7016fc..8f58a7b51 100644 --- a/cmd/fxcored/main.go +++ b/cmd/fxcored/main.go @@ -7,8 +7,8 @@ import ( "github.com/cosmos/cosmos-sdk/server" svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" - "github.com/functionx/fx-core/v7/cmd" - fxtypes "github.com/functionx/fx-core/v7/types" + "github.com/functionx/fx-core/v8/cmd" + fxtypes "github.com/functionx/fx-core/v8/types" ) func main() { diff --git a/cmd/keys.go b/cmd/keys.go index a1409f887..b7a2e5597 100644 --- a/cmd/keys.go +++ b/cmd/keys.go @@ -6,7 +6,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/keys" "github.com/spf13/cobra" - fxkeys "github.com/functionx/fx-core/v7/client/cli/keys" + fxkeys "github.com/functionx/fx-core/v8/client/cli/keys" ) // Commands registers a sub-tree of commands to interact with diff --git a/cmd/root.go b/cmd/root.go index d57d96b9c..5f3921933 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -34,13 +34,13 @@ import ( "github.com/spf13/cast" "github.com/spf13/cobra" - "github.com/functionx/fx-core/v7/app" - fxcli "github.com/functionx/fx-core/v7/client/cli" - fxserver "github.com/functionx/fx-core/v7/server" - fxcfg "github.com/functionx/fx-core/v7/server/config" - fxtypes "github.com/functionx/fx-core/v7/types" - crosschaincli "github.com/functionx/fx-core/v7/x/crosschain/client/cli" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/app" + fxcli "github.com/functionx/fx-core/v8/client/cli" + fxserver "github.com/functionx/fx-core/v8/server" + fxcfg "github.com/functionx/fx-core/v8/server/config" + fxtypes "github.com/functionx/fx-core/v8/types" + crosschaincli "github.com/functionx/fx-core/v8/x/crosschain/client/cli" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" ) // NewRootCmd creates a new root command for simd. It is called once in the diff --git a/cmd/testnet.go b/cmd/testnet.go index 663b5d9e1..676b1d045 100644 --- a/cmd/testnet.go +++ b/cmd/testnet.go @@ -14,10 +14,10 @@ import ( "github.com/cosmos/cosmos-sdk/server/config" "github.com/spf13/cobra" - "github.com/functionx/fx-core/v7/app" - "github.com/functionx/fx-core/v7/testutil" - "github.com/functionx/fx-core/v7/testutil/network" - fxtypes "github.com/functionx/fx-core/v7/types" + "github.com/functionx/fx-core/v8/app" + "github.com/functionx/fx-core/v8/testutil" + "github.com/functionx/fx-core/v8/testutil/network" + fxtypes "github.com/functionx/fx-core/v8/types" ) const ( diff --git a/contract/eth_validation_test.go b/contract/eth_validation_test.go index b36f70449..528d01a84 100644 --- a/contract/eth_validation_test.go +++ b/contract/eth_validation_test.go @@ -7,8 +7,8 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" - "github.com/functionx/fx-core/v7/contract" - "github.com/functionx/fx-core/v7/testutil/helpers" + "github.com/functionx/fx-core/v8/contract" + "github.com/functionx/fx-core/v8/testutil/helpers" ) func TestIsEmptyHash(t *testing.T) { diff --git a/cosmovisor.Dockerfile b/cosmovisor.Dockerfile index d6a714a16..8177c1bd3 100644 --- a/cosmovisor.Dockerfile +++ b/cosmovisor.Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.21.4-alpine3.18 as builder +FROM golang:1.23.0-alpine3.19 as builder RUN apk add --no-cache git build-base linux-headers @@ -10,10 +10,9 @@ COPY . . RUN make build -FROM ghcr.io/functionx/fx-core:6.1.0 as fxv6 -FROM ghcr.io/functionx/fxcorevisor:7.4.0-rc6 as fxv7_4 +FROM ghcr.io/functionx/fxcorevisor:7.5.0 as fxv7_5 -FROM alpine:3.18 +FROM alpine:3.19 WORKDIR /root @@ -29,13 +28,12 @@ ENV DAEMON_PREUPGRADE_MAX_RETRIES=3 ENV COSMOVISOR_DISABLE_LOGS=false ENV COSMOVISOR_COLOR_LOGS=true -COPY --from=fxv7_4 /root/.fxcore/cosmovisor/genesis /root/.fxcore/cosmovisor/genesis -COPY --from=fxv7_4 /root/.fxcore/cosmovisor/upgrades /root/.fxcore/cosmovisor/upgrades -COPY --from=fxv6 /usr/bin/fxcored /root/.fxcore/cosmovisor/upgrades/v6.0.x/bin/fxcored +ENV PATH="/root/.fxcore/cosmovisor/current/bin:${PATH}" + +COPY --from=fxv7_5 /root/.fxcore/cosmovisor /root/.fxcore/cosmovisor COPY --from=builder /go/bin/cosmovisor /usr/bin/cosmovisor -COPY --from=builder /app/build/bin/fxcored /usr/bin/fxcored -COPY --from=builder /app/build/bin/fxcored /root/.fxcore/cosmovisor/upgrades/v7.5.x/bin/fxcored +COPY --from=builder /app/build/bin/fxcored /root/.fxcore/cosmovisor/upgrades/v8.0.x/bin/fxcored RUN cosmovisor init /root/.fxcore/cosmovisor/genesis/bin/fxcored diff --git a/cosmovisor_lite.Dockerfile b/cosmovisor_lite.Dockerfile index fe546bf81..e3f4f1ac4 100644 --- a/cosmovisor_lite.Dockerfile +++ b/cosmovisor_lite.Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.21.4-alpine3.18 as builder +FROM golang:1.23.0-alpine3.19 as builder RUN apk add --no-cache git build-base linux-headers @@ -10,10 +10,9 @@ COPY . . RUN make build -FROM ghcr.io/functionx/fx-core:6.1.0 as fxv6 -FROM ghcr.io/functionx/fxcorevisor-lite:7.4.0-rc6 as fxv7_4 +FROM ghcr.io/functionx/fx-core:7.5.0 as fxv7_5 -FROM alpine:3.18 +FROM alpine:3.19 WORKDIR /root @@ -29,15 +28,14 @@ ENV DAEMON_PREUPGRADE_MAX_RETRIES=3 ENV COSMOVISOR_DISABLE_LOGS=false ENV COSMOVISOR_COLOR_LOGS=true -COPY --from=fxv7_4 /root/.fxcore/cosmovisor/genesis /root/.fxcore/cosmovisor/genesis -COPY --from=fxv7_4 /root/.fxcore/cosmovisor/upgrades /root/.fxcore/cosmovisor/upgrades -COPY --from=fxv6 /usr/bin/fxcored /root/.fxcore/cosmovisor/upgrades/v6.0.x/bin/fxcored +ENV PATH="/root/.fxcore/cosmovisor/current/bin:${PATH}" + +COPY --from=fxv7_5 /usr/bin/fxcored /root/.fxcore/cosmovisor/genesis/bin/fxcored COPY --from=builder /go/bin/cosmovisor /usr/bin/cosmovisor -COPY --from=builder /app/build/bin/fxcored /usr/bin/fxcored -COPY --from=builder /app/build/bin/fxcored /root/.fxcore/cosmovisor/upgrades/v7.5.x/bin/fxcored +COPY --from=builder /app/build/bin/fxcored /root/.fxcore/cosmovisor/upgrades/v8.0.x/bin/fxcored -RUN cosmovisor init /root/.fxcore/cosmovisor/upgrades/v6.0.x/bin/fxcored +RUN cosmovisor init /root/.fxcore/cosmovisor/genesis/bin/fxcored EXPOSE 26656/tcp 26657/tcp 26660/tcp 9090/tcp 1317/tcp 8545/tcp 8546/tcp diff --git a/docs/swagger_test.go b/docs/swagger_test.go index c77d0e95a..b7d34209e 100644 --- a/docs/swagger_test.go +++ b/docs/swagger_test.go @@ -15,7 +15,7 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/stretchr/testify/assert" - "github.com/functionx/fx-core/v7/testutil/helpers" + "github.com/functionx/fx-core/v8/testutil/helpers" ) func TestSwaggerConfig(t *testing.T) { diff --git a/go.mod b/go.mod index 34755e140..c2b93feab 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ -module github.com/functionx/fx-core/v7 +module github.com/functionx/fx-core/v8 -go 1.21 +go 1.23 require ( cosmossdk.io/api v0.3.1 diff --git a/server/config/config.go b/server/config/config.go index 7aed9a3f3..d1eb2acb0 100644 --- a/server/config/config.go +++ b/server/config/config.go @@ -10,7 +10,7 @@ import ( errortypes "github.com/cosmos/cosmos-sdk/types/errors" ethermintconfig "github.com/evmos/ethermint/server/config" - "github.com/functionx/fx-core/v7/contract" + "github.com/functionx/fx-core/v8/contract" ) // BypassMinFee defines custom that will bypass minimum fee checks during CheckTx. diff --git a/server/config/config_cmd_test.go b/server/config/config_cmd_test.go index ed06f43d6..16634e06c 100644 --- a/server/config/config_cmd_test.go +++ b/server/config/config_cmd_test.go @@ -9,9 +9,9 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/stretchr/testify/assert" - "github.com/functionx/fx-core/v7/server/config" - "github.com/functionx/fx-core/v7/testutil/helpers" - fxtypes "github.com/functionx/fx-core/v7/types" + "github.com/functionx/fx-core/v8/server/config" + "github.com/functionx/fx-core/v8/testutil/helpers" + fxtypes "github.com/functionx/fx-core/v8/types" ) func Test_Output(t *testing.T) { diff --git a/server/database_test.go b/server/database_test.go index 0f54bb2b1..b7b48feb2 100644 --- a/server/database_test.go +++ b/server/database_test.go @@ -11,8 +11,8 @@ import ( tmtime "github.com/cometbft/cometbft/types/time" "github.com/stretchr/testify/suite" - "github.com/functionx/fx-core/v7/app" - "github.com/functionx/fx-core/v7/server" + "github.com/functionx/fx-core/v8/app" + "github.com/functionx/fx-core/v8/server" ) type DatabaseTestSuite struct { diff --git a/server/grpc/auth/grpc_query.go b/server/grpc/auth/grpc_query.go index b5a684938..4ffaa0075 100644 --- a/server/grpc/auth/grpc_query.go +++ b/server/grpc/auth/grpc_query.go @@ -10,7 +10,7 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - fxtypes "github.com/functionx/fx-core/v7/types" + fxtypes "github.com/functionx/fx-core/v8/types" ) var _ QueryServer = Querier{} diff --git a/server/log_filter_test.go b/server/log_filter_test.go index 23b85ae03..1d7a365f5 100644 --- a/server/log_filter_test.go +++ b/server/log_filter_test.go @@ -8,7 +8,7 @@ import ( "github.com/rs/zerolog" "github.com/stretchr/testify/assert" - fxserver "github.com/functionx/fx-core/v7/server" + fxserver "github.com/functionx/fx-core/v8/server" ) func TestFxZeroLogWrapper(t *testing.T) { diff --git a/server/start.go b/server/start.go index d4ab4184b..b1e20142f 100644 --- a/server/start.go +++ b/server/start.go @@ -22,7 +22,7 @@ import ( "github.com/rs/zerolog" "github.com/spf13/cobra" - fxtypes "github.com/functionx/fx-core/v7/types" + fxtypes "github.com/functionx/fx-core/v8/types" ) // StartCmd runs the service passed in, either stand-alone or in-process with @@ -125,7 +125,7 @@ func checkMainnetAndBlock(genesisDoc *tmtypes.GenesisDoc, genesisHash string, co " please use the v6.x.x version to synchronize the block or download the latest snapshot") } // TODO: The line of code below must be removed before the release. - // return errors.New("invalid version: The current version is not released, please use the corresponding version") + return errors.New("invalid version: The current version is not released, please use the corresponding version") } return nil } diff --git a/server/start_test.go b/server/start_test.go index 0d6327ba0..3e4616153 100644 --- a/server/start_test.go +++ b/server/start_test.go @@ -21,9 +21,9 @@ import ( "github.com/spf13/cobra" "github.com/stretchr/testify/require" - "github.com/functionx/fx-core/v7/app" - fxserver "github.com/functionx/fx-core/v7/server" - fxcfg "github.com/functionx/fx-core/v7/server/config" + "github.com/functionx/fx-core/v8/app" + fxserver "github.com/functionx/fx-core/v8/server" + fxcfg "github.com/functionx/fx-core/v8/server/config" ) var errCancelledInPreRun = errors.New("cancelled in prerun") diff --git a/tests/amino_test.go b/tests/amino_test.go index 7a58e85de..66aeb37cd 100644 --- a/tests/amino_test.go +++ b/tests/amino_test.go @@ -18,12 +18,12 @@ import ( clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" "github.com/stretchr/testify/assert" - "github.com/functionx/fx-core/v7/app" - fxtypes "github.com/functionx/fx-core/v7/types" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" - erc20types "github.com/functionx/fx-core/v7/x/erc20/types" - fxgovtypes "github.com/functionx/fx-core/v7/x/gov/types" - ibctransfertypes "github.com/functionx/fx-core/v7/x/ibc/applications/transfer/types" + "github.com/functionx/fx-core/v8/app" + fxtypes "github.com/functionx/fx-core/v8/types" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" + erc20types "github.com/functionx/fx-core/v8/x/erc20/types" + fxgovtypes "github.com/functionx/fx-core/v8/x/gov/types" + ibctransfertypes "github.com/functionx/fx-core/v8/x/ibc/applications/transfer/types" ) func TestAminoEncode(t *testing.T) { diff --git a/tests/ante_test.go b/tests/ante_test.go index 1ab2681aa..c9615e867 100644 --- a/tests/ante_test.go +++ b/tests/ante_test.go @@ -6,7 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" distributiontypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - "github.com/functionx/fx-core/v7/testutil/helpers" + "github.com/functionx/fx-core/v8/testutil/helpers" ) func (suite *IntegrationTest) ByPassFeeTest() { diff --git a/tests/contract_test.go b/tests/contract_test.go index 5a932b273..224ef449a 100644 --- a/tests/contract_test.go +++ b/tests/contract_test.go @@ -9,7 +9,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" - "github.com/functionx/fx-core/v7/contract" + "github.com/functionx/fx-core/v8/contract" ) func TestFIP20Code(t *testing.T) { diff --git a/tests/crosschain_suite.go b/tests/crosschain_suite.go index f7b71b404..0233dd883 100644 --- a/tests/crosschain_suite.go +++ b/tests/crosschain_suite.go @@ -17,12 +17,12 @@ import ( ethtypes "github.com/ethereum/go-ethereum/core/types" ethcrypto "github.com/ethereum/go-ethereum/crypto" - "github.com/functionx/fx-core/v7/client" - "github.com/functionx/fx-core/v7/testutil/helpers" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/crosschain/precompile" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" - trontypes "github.com/functionx/fx-core/v7/x/tron/types" + "github.com/functionx/fx-core/v8/client" + "github.com/functionx/fx-core/v8/testutil/helpers" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/crosschain/precompile" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" + trontypes "github.com/functionx/fx-core/v8/x/tron/types" ) type CrosschainTestSuite struct { diff --git a/tests/crosschain_test.go b/tests/crosschain_test.go index bc726d465..675f33ecb 100644 --- a/tests/crosschain_test.go +++ b/tests/crosschain_test.go @@ -13,13 +13,13 @@ import ( banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" - "github.com/functionx/fx-core/v7/testutil/helpers" - fxtypes "github.com/functionx/fx-core/v7/types" - bsctypes "github.com/functionx/fx-core/v7/x/bsc/types" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" - erc20types "github.com/functionx/fx-core/v7/x/erc20/types" - ethtypes "github.com/functionx/fx-core/v7/x/eth/types" - trontypes "github.com/functionx/fx-core/v7/x/tron/types" + "github.com/functionx/fx-core/v8/testutil/helpers" + fxtypes "github.com/functionx/fx-core/v8/types" + bsctypes "github.com/functionx/fx-core/v8/x/bsc/types" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" + erc20types "github.com/functionx/fx-core/v8/x/erc20/types" + ethtypes "github.com/functionx/fx-core/v8/x/eth/types" + trontypes "github.com/functionx/fx-core/v8/x/tron/types" ) func (suite *IntegrationTest) CrossChainTest() { diff --git a/tests/erc20_suite.go b/tests/erc20_suite.go index d44255a9f..da768613d 100644 --- a/tests/erc20_suite.go +++ b/tests/erc20_suite.go @@ -10,7 +10,7 @@ import ( govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/ethereum/go-ethereum/common" - erc20types "github.com/functionx/fx-core/v7/x/erc20/types" + erc20types "github.com/functionx/fx-core/v8/x/erc20/types" ) type Erc20TestSuite struct { diff --git a/tests/erc20_test.go b/tests/erc20_test.go index b7a96b2cd..e25029a60 100644 --- a/tests/erc20_test.go +++ b/tests/erc20_test.go @@ -11,10 +11,10 @@ import ( banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/ethereum/go-ethereum/common" - "github.com/functionx/fx-core/v7/testutil/helpers" - fxtypes "github.com/functionx/fx-core/v7/types" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" - erc20types "github.com/functionx/fx-core/v7/x/erc20/types" + "github.com/functionx/fx-core/v8/testutil/helpers" + fxtypes "github.com/functionx/fx-core/v8/types" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" + erc20types "github.com/functionx/fx-core/v8/x/erc20/types" ) func (suite *IntegrationTest) ERC20TokenOriginTest() { diff --git a/tests/evm_suite.go b/tests/evm_suite.go index e581d0521..a42d9add8 100644 --- a/tests/evm_suite.go +++ b/tests/evm_suite.go @@ -16,12 +16,12 @@ import ( "github.com/ethereum/go-ethereum/ethclient" evmtypes "github.com/evmos/ethermint/x/evm/types" - "github.com/functionx/fx-core/v7/client" - "github.com/functionx/fx-core/v7/contract" - testscontract "github.com/functionx/fx-core/v7/tests/contract" - "github.com/functionx/fx-core/v7/testutil/helpers" - fxtypes "github.com/functionx/fx-core/v7/types" - erc20types "github.com/functionx/fx-core/v7/x/erc20/types" + "github.com/functionx/fx-core/v8/client" + "github.com/functionx/fx-core/v8/contract" + testscontract "github.com/functionx/fx-core/v8/tests/contract" + "github.com/functionx/fx-core/v8/testutil/helpers" + fxtypes "github.com/functionx/fx-core/v8/types" + erc20types "github.com/functionx/fx-core/v8/x/erc20/types" ) type EvmTestSuite struct { diff --git a/tests/evm_test.go b/tests/evm_test.go index 4217d77ee..ff0cb6a7f 100644 --- a/tests/evm_test.go +++ b/tests/evm_test.go @@ -17,10 +17,10 @@ import ( "github.com/ethereum/go-ethereum/crypto" evmtypes "github.com/evmos/ethermint/x/evm/types" - "github.com/functionx/fx-core/v7/client" - "github.com/functionx/fx-core/v7/contract" - "github.com/functionx/fx-core/v7/testutil/helpers" - fxevmtypes "github.com/functionx/fx-core/v7/x/evm/types" + "github.com/functionx/fx-core/v8/client" + "github.com/functionx/fx-core/v8/contract" + "github.com/functionx/fx-core/v8/testutil/helpers" + fxevmtypes "github.com/functionx/fx-core/v8/x/evm/types" ) func (suite *IntegrationTest) WFXTest() { diff --git a/tests/integration_test.go b/tests/integration_test.go index 1fc15dfd9..dea5448ea 100644 --- a/tests/integration_test.go +++ b/tests/integration_test.go @@ -8,14 +8,14 @@ import ( "github.com/stretchr/testify/suite" - arbitrumtypes "github.com/functionx/fx-core/v7/x/arbitrum/types" - avalanchetypes "github.com/functionx/fx-core/v7/x/avalanche/types" - bsctypes "github.com/functionx/fx-core/v7/x/bsc/types" - ethtypes "github.com/functionx/fx-core/v7/x/eth/types" - layer2types "github.com/functionx/fx-core/v7/x/layer2/types" - optimismtypes "github.com/functionx/fx-core/v7/x/optimism/types" - polygontypes "github.com/functionx/fx-core/v7/x/polygon/types" - trontypes "github.com/functionx/fx-core/v7/x/tron/types" + arbitrumtypes "github.com/functionx/fx-core/v8/x/arbitrum/types" + avalanchetypes "github.com/functionx/fx-core/v8/x/avalanche/types" + bsctypes "github.com/functionx/fx-core/v8/x/bsc/types" + ethtypes "github.com/functionx/fx-core/v8/x/eth/types" + layer2types "github.com/functionx/fx-core/v8/x/layer2/types" + optimismtypes "github.com/functionx/fx-core/v8/x/optimism/types" + polygontypes "github.com/functionx/fx-core/v8/x/polygon/types" + trontypes "github.com/functionx/fx-core/v8/x/tron/types" ) type IntegrationTest struct { diff --git a/tests/migrate_test.go b/tests/migrate_test.go index 61083d97a..3acfafdca 100644 --- a/tests/migrate_test.go +++ b/tests/migrate_test.go @@ -16,9 +16,9 @@ import ( hd2 "github.com/evmos/ethermint/crypto/hd" "github.com/stretchr/testify/require" - "github.com/functionx/fx-core/v7/testutil/helpers" - fxtypes "github.com/functionx/fx-core/v7/types" - migratetypes "github.com/functionx/fx-core/v7/x/migrate/types" + "github.com/functionx/fx-core/v8/testutil/helpers" + fxtypes "github.com/functionx/fx-core/v8/types" + migratetypes "github.com/functionx/fx-core/v8/x/migrate/types" ) func (suite *IntegrationTest) migrateAccount(fromPrivateKey, toPrivateKey cryptotypes.PrivKey) { diff --git a/tests/precompile_suite.go b/tests/precompile_suite.go index ce96ecd3f..df6c9394d 100644 --- a/tests/precompile_suite.go +++ b/tests/precompile_suite.go @@ -10,12 +10,12 @@ import ( "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" - "github.com/functionx/fx-core/v7/client" - "github.com/functionx/fx-core/v7/contract" - "github.com/functionx/fx-core/v7/testutil/helpers" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/crosschain/precompile" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/client" + "github.com/functionx/fx-core/v8/contract" + "github.com/functionx/fx-core/v8/testutil/helpers" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/crosschain/precompile" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" ) type PrecompileTestSuite struct { diff --git a/tests/precompile_test.go b/tests/precompile_test.go index cf34eb94d..f04e5926a 100644 --- a/tests/precompile_test.go +++ b/tests/precompile_test.go @@ -6,13 +6,13 @@ import ( sdkmath "cosmossdk.io/math" "github.com/ethereum/go-ethereum/common" - "github.com/functionx/fx-core/v7/testutil/helpers" - fxtypes "github.com/functionx/fx-core/v7/types" - bsctypes "github.com/functionx/fx-core/v7/x/bsc/types" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" - erc20types "github.com/functionx/fx-core/v7/x/erc20/types" - ethtypes "github.com/functionx/fx-core/v7/x/eth/types" - trontypes "github.com/functionx/fx-core/v7/x/tron/types" + "github.com/functionx/fx-core/v8/testutil/helpers" + fxtypes "github.com/functionx/fx-core/v8/types" + bsctypes "github.com/functionx/fx-core/v8/x/bsc/types" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" + erc20types "github.com/functionx/fx-core/v8/x/erc20/types" + ethtypes "github.com/functionx/fx-core/v8/x/eth/types" + trontypes "github.com/functionx/fx-core/v8/x/tron/types" ) func (suite *IntegrationTest) PrecompileTransferCrossChainTest() { diff --git a/tests/staking_suite.go b/tests/staking_suite.go index 34b574ec2..74731f5a3 100644 --- a/tests/staking_suite.go +++ b/tests/staking_suite.go @@ -18,12 +18,12 @@ import ( ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" - "github.com/functionx/fx-core/v7/client" - "github.com/functionx/fx-core/v7/contract" - testscontract "github.com/functionx/fx-core/v7/tests/contract" - "github.com/functionx/fx-core/v7/testutil/helpers" - stakingprecompile "github.com/functionx/fx-core/v7/x/staking/precompile" - fxstakingtypes "github.com/functionx/fx-core/v7/x/staking/types" + "github.com/functionx/fx-core/v8/client" + "github.com/functionx/fx-core/v8/contract" + testscontract "github.com/functionx/fx-core/v8/tests/contract" + "github.com/functionx/fx-core/v8/testutil/helpers" + stakingprecompile "github.com/functionx/fx-core/v8/x/staking/precompile" + fxstakingtypes "github.com/functionx/fx-core/v8/x/staking/types" ) type StakingSuite struct { diff --git a/tests/staking_test.go b/tests/staking_test.go index 96c36fed4..80fee1fff 100644 --- a/tests/staking_test.go +++ b/tests/staking_test.go @@ -17,11 +17,11 @@ import ( "github.com/ethereum/go-ethereum/common" "google.golang.org/grpc/metadata" - "github.com/functionx/fx-core/v7/app" - "github.com/functionx/fx-core/v7/testutil/helpers" - fxtypes "github.com/functionx/fx-core/v7/types" - stakingprecompile "github.com/functionx/fx-core/v7/x/staking/precompile" - fxstakingtypes "github.com/functionx/fx-core/v7/x/staking/types" + "github.com/functionx/fx-core/v8/app" + "github.com/functionx/fx-core/v8/testutil/helpers" + fxtypes "github.com/functionx/fx-core/v8/types" + stakingprecompile "github.com/functionx/fx-core/v8/x/staking/precompile" + fxstakingtypes "github.com/functionx/fx-core/v8/x/staking/types" ) func (suite *IntegrationTest) StakingTest() { diff --git a/tests/suite.go b/tests/suite.go index 9382f2cda..7695f35a2 100644 --- a/tests/suite.go +++ b/tests/suite.go @@ -25,15 +25,15 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/stretchr/testify/suite" - "github.com/functionx/fx-core/v7/app" - "github.com/functionx/fx-core/v7/client/grpc" - "github.com/functionx/fx-core/v7/client/jsonrpc" - "github.com/functionx/fx-core/v7/testutil" - "github.com/functionx/fx-core/v7/testutil/helpers" - "github.com/functionx/fx-core/v7/testutil/network" - fxtypes "github.com/functionx/fx-core/v7/types" - bsctypes "github.com/functionx/fx-core/v7/x/bsc/types" - ethtypes "github.com/functionx/fx-core/v7/x/eth/types" + "github.com/functionx/fx-core/v8/app" + "github.com/functionx/fx-core/v8/client/grpc" + "github.com/functionx/fx-core/v8/client/jsonrpc" + "github.com/functionx/fx-core/v8/testutil" + "github.com/functionx/fx-core/v8/testutil/helpers" + "github.com/functionx/fx-core/v8/testutil/network" + fxtypes "github.com/functionx/fx-core/v8/types" + bsctypes "github.com/functionx/fx-core/v8/x/bsc/types" + ethtypes "github.com/functionx/fx-core/v8/x/eth/types" ) type TestSuite struct { diff --git a/tests/upgrade_time_calc_test.go b/tests/upgrade_time_calc_test.go index c2c5b6717..417633f99 100644 --- a/tests/upgrade_time_calc_test.go +++ b/tests/upgrade_time_calc_test.go @@ -12,7 +12,7 @@ import ( jsonrpcclient "github.com/cometbft/cometbft/rpc/jsonrpc/client" "github.com/stretchr/testify/require" - "github.com/functionx/fx-core/v7/testutil/helpers" + "github.com/functionx/fx-core/v8/testutil/helpers" ) func TestCalculateUpgradeHeight(t *testing.T) { diff --git a/testutil/helpers/helpers.go b/testutil/helpers/helpers.go index 2b097412c..be629b788 100644 --- a/testutil/helpers/helpers.go +++ b/testutil/helpers/helpers.go @@ -15,31 +15,24 @@ import ( abci "github.com/cometbft/cometbft/abci/types" tmed25519 "github.com/cometbft/cometbft/crypto/ed25519" "github.com/cometbft/cometbft/libs/log" - tmrand "github.com/cometbft/cometbft/libs/rand" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" tmtypes "github.com/cometbft/cometbft/types" "github.com/cosmos/cosmos-sdk/baseapp" - "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/codec/legacy" codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/tx/signing" - authsign "github.com/cosmos/cosmos-sdk/x/auth/signing" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - etherminttypes "github.com/evmos/ethermint/types" "github.com/stretchr/testify/require" - "github.com/functionx/fx-core/v7/app" - fxtypes "github.com/functionx/fx-core/v7/types" - fxstakingtypes "github.com/functionx/fx-core/v7/x/staking/types" + "github.com/functionx/fx-core/v8/app" + fxtypes "github.com/functionx/fx-core/v8/types" + fxstakingtypes "github.com/functionx/fx-core/v8/x/staking/types" ) func Setup(isCheckTx bool, isShowLog bool) *app.App { @@ -290,122 +283,6 @@ func TestAddr(addr string, bech string) (sdk.AccAddress, error) { return res, nil } -// SignCheckDeliver checks a generated signed transaction and simulates a -// block commitment with the given transaction. A test assertion is made using -// the parameter 'expPass' against the result. A corresponding result is -// returned. -func SignCheckDeliver(t *testing.T, txCfg client.TxConfig, app *baseapp.BaseApp, header tmproto.Header, - msgs []sdk.Msg, expSimPass, expPass bool, priv ...cryptotypes.PrivKey, -) (sdk.GasInfo, *sdk.Result, error) { - accNums, accSeqs := make([]uint64, 0, len(priv)), make([]uint64, 0, len(priv)) - for _, key := range priv { - response := app.Query(abci.RequestQuery{ - Data: legacy.Cdc.MustMarshalJSON(authtypes.QueryAccountRequest{ - Address: sdk.AccAddress(key.PubKey().Address()).String(), - }), - Path: "/custom/auth/account", - Height: 0, - }) - var account authtypes.AccountI - if err := legacy.Cdc.UnmarshalJSON(response.Value, &account); err != nil { - account = new(etherminttypes.EthAccount) - if err1 := legacy.Cdc.UnmarshalJSON(response.Value, account); err1 != nil { - panic(fmt.Errorf("%s: %s", err.Error(), err1.Error())) - } - } - accNums = append(accNums, account.GetAccountNumber()) - accSeqs = append(accSeqs, account.GetSequence()) - } - - gasPrice := sdk.NewCoin(fxtypes.DefaultDenom, sdkmath.NewInt(4).MulRaw(1e12)) - tx, err := GenTx(txCfg, msgs, gasPrice, 10000000, header.ChainID, accNums, accSeqs, priv...) - require.NoError(t, err) - txBytes, err := txCfg.TxEncoder()(tx) - require.Nil(t, err) - - // Must simulate now as CheckTx doesn't run Msgs anymore - _, res, err := app.Simulate(txBytes) - if expSimPass { - require.NoError(t, err) - require.NotNil(t, res) - } else { - require.Error(t, err) - require.Nil(t, res) - } - - // Simulate a sending a transaction and committing a block - app.BeginBlock(abci.RequestBeginBlock{Header: header}) - gInfo, res, err := app.SimDeliver(txCfg.TxEncoder(), tx) - if expPass { - require.NoError(t, err) - require.NotNil(t, res) - } else { - require.Error(t, err) - require.Nil(t, res) - } - - app.EndBlock(abci.RequestEndBlock{}) - app.Commit() - - return gInfo, res, err -} - -// GenTx generates a signed mock transaction. -func GenTx(gen client.TxConfig, msgs []sdk.Msg, gasPrice sdk.Coin, gas uint64, chainID string, accNums, accSeqs []uint64, priv ...cryptotypes.PrivKey) (sdk.Tx, error) { - sigs := make([]signing.SignatureV2, len(priv)) - - signMode := gen.SignModeHandler().DefaultMode() - - // 1st round: set SignatureV2 with empty signatures, to set correct - // signer infos. - for i, p := range priv { - sigs[i] = signing.SignatureV2{ - PubKey: p.PubKey(), - Data: &signing.SingleSignatureData{ - SignMode: signMode, - }, - Sequence: accSeqs[i], - } - } - - tx := gen.NewTxBuilder() - err := tx.SetMsgs(msgs...) - if err != nil { - return nil, err - } - err = tx.SetSignatures(sigs...) - if err != nil { - return nil, err - } - tx.SetMemo(tmrand.Str(100)) - tx.SetFeeAmount(sdk.NewCoins(sdk.NewCoin(gasPrice.Denom, gasPrice.Amount.MulRaw(int64(gas))))) - tx.SetGasLimit(gas) - - // 2nd round: once all signer infos are set, every signer can sign. - for i, p := range priv { - signerData := authsign.SignerData{ - ChainID: chainID, - AccountNumber: accNums[i], - Sequence: accSeqs[i], - } - signBytes, err := gen.SignModeHandler().GetSignBytes(signMode, signerData, tx.GetTx()) - if err != nil { - panic(err) - } - sig, err := p.Sign(signBytes) - if err != nil { - panic(err) - } - sigs[i].Data.(*signing.SingleSignatureData).Signature = sig - err = tx.SetSignatures(sigs...) - if err != nil { - panic(err) - } - } - - return tx.GetTx(), nil -} - func MintBlock(myApp *app.App, ctx sdk.Context, block ...int64) sdk.Context { nextHeight := ctx.BlockHeight() + 1 if len(block) > 0 { diff --git a/testutil/helpers/key.go b/testutil/helpers/key.go index afe06baa1..1e816bb5c 100644 --- a/testutil/helpers/key.go +++ b/testutil/helpers/key.go @@ -18,8 +18,8 @@ import ( "github.com/evmos/ethermint/crypto/ethsecp256k1" hd2 "github.com/evmos/ethermint/crypto/hd" - "github.com/functionx/fx-core/v7/x/crosschain/types" - trontypes "github.com/functionx/fx-core/v7/x/tron/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" + trontypes "github.com/functionx/fx-core/v8/x/tron/types" ) func NewMnemonic() string { diff --git a/testutil/helpers/key_test.go b/testutil/helpers/key_test.go index a2e796b95..c7a1d788f 100644 --- a/testutil/helpers/key_test.go +++ b/testutil/helpers/key_test.go @@ -7,7 +7,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "github.com/functionx/fx-core/v7/testutil/helpers" + "github.com/functionx/fx-core/v8/testutil/helpers" ) func TestPrivKeyFromMnemonic(t *testing.T) { diff --git a/testutil/helpers/suite.go b/testutil/helpers/suite.go index fef017468..db6527269 100644 --- a/testutil/helpers/suite.go +++ b/testutil/helpers/suite.go @@ -6,8 +6,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/suite" - "github.com/functionx/fx-core/v7/app" - fxtypes "github.com/functionx/fx-core/v7/types" + "github.com/functionx/fx-core/v8/app" + fxtypes "github.com/functionx/fx-core/v8/types" ) type BaseSuite struct { diff --git a/testutil/helpers/testing_app.go b/testutil/helpers/testing_app.go index 5b20bbf1b..f113aadd7 100644 --- a/testutil/helpers/testing_app.go +++ b/testutil/helpers/testing_app.go @@ -13,8 +13,8 @@ import ( ibctesting "github.com/cosmos/ibc-go/v7/testing" ibctestingtypes "github.com/cosmos/ibc-go/v7/testing/types" - "github.com/functionx/fx-core/v7/app" - fxtypes "github.com/functionx/fx-core/v7/types" + "github.com/functionx/fx-core/v8/app" + fxtypes "github.com/functionx/fx-core/v8/types" ) type TestingApp struct { diff --git a/testutil/helpers/tools.go b/testutil/helpers/tools.go index 834ccb205..78a87767a 100644 --- a/testutil/helpers/tools.go +++ b/testutil/helpers/tools.go @@ -13,7 +13,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/assert" - fxtypes "github.com/functionx/fx-core/v7/types" + fxtypes "github.com/functionx/fx-core/v8/types" ) func IsLocalTest() bool { diff --git a/testutil/network.go b/testutil/network.go index 77f8be414..bd46c0b9b 100644 --- a/testutil/network.go +++ b/testutil/network.go @@ -32,11 +32,11 @@ import ( hd2 "github.com/evmos/ethermint/crypto/hd" evmtypes "github.com/evmos/ethermint/x/evm/types" - "github.com/functionx/fx-core/v7/app" - fxcfg "github.com/functionx/fx-core/v7/server/config" - "github.com/functionx/fx-core/v7/testutil/network" - fxtypes "github.com/functionx/fx-core/v7/types" - ethtypes "github.com/functionx/fx-core/v7/x/eth/types" + "github.com/functionx/fx-core/v8/app" + fxcfg "github.com/functionx/fx-core/v8/server/config" + "github.com/functionx/fx-core/v8/testutil/network" + fxtypes "github.com/functionx/fx-core/v8/types" + ethtypes "github.com/functionx/fx-core/v8/x/eth/types" ) // DefaultNetworkConfig returns a sane default configuration suitable for nearly all diff --git a/testutil/network/network.go b/testutil/network/network.go index abb5c76d2..b45980de8 100644 --- a/testutil/network/network.go +++ b/testutil/network/network.go @@ -40,7 +40,7 @@ import ( "github.com/spf13/cobra" "google.golang.org/grpc" - fxcfg "github.com/functionx/fx-core/v7/server/config" + fxcfg "github.com/functionx/fx-core/v8/server/config" ) // package-wide network lock to only allow one test network at a time diff --git a/testutil/network/util.go b/testutil/network/util.go index 5422dd702..496819853 100644 --- a/testutil/network/util.go +++ b/testutil/network/util.go @@ -26,8 +26,8 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" - "github.com/functionx/fx-core/v7/app" - fxtypes "github.com/functionx/fx-core/v7/types" + "github.com/functionx/fx-core/v8/app" + fxtypes "github.com/functionx/fx-core/v8/types" ) // StartInProcess creates and starts an in-process local test network. diff --git a/testutil/network_test.go b/testutil/network_test.go index 4dbc595e0..86e7243ac 100644 --- a/testutil/network_test.go +++ b/testutil/network_test.go @@ -11,10 +11,10 @@ import ( hd2 "github.com/evmos/ethermint/crypto/hd" "github.com/stretchr/testify/suite" - "github.com/functionx/fx-core/v7/app" - "github.com/functionx/fx-core/v7/testutil" - "github.com/functionx/fx-core/v7/testutil/helpers" - "github.com/functionx/fx-core/v7/testutil/network" + "github.com/functionx/fx-core/v8/app" + "github.com/functionx/fx-core/v8/testutil" + "github.com/functionx/fx-core/v8/testutil/helpers" + "github.com/functionx/fx-core/v8/testutil/network" ) type IntegrationTestSuite struct { diff --git a/types/address.go b/types/address.go index d142bc245..6b40c9613 100644 --- a/types/address.go +++ b/types/address.go @@ -7,7 +7,7 @@ import ( "github.com/cosmos/cosmos-sdk/types/bech32" "github.com/ethereum/go-ethereum/common" - "github.com/functionx/fx-core/v7/contract" + "github.com/functionx/fx-core/v8/contract" ) func ParseAddress(addr string) (accAddr sdk.AccAddress, isEvmAddr bool, err error) { diff --git a/types/byte32_test.go b/types/byte32_test.go index cddc98bb4..e2a79d149 100644 --- a/types/byte32_test.go +++ b/types/byte32_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/require" - fxtypes "github.com/functionx/fx-core/v7/types" + fxtypes "github.com/functionx/fx-core/v8/types" ) func TestStrToByte32(t *testing.T) { diff --git a/types/target_test.go b/types/target_test.go index c023bf202..c1d67ffa6 100644 --- a/types/target_test.go +++ b/types/target_test.go @@ -9,7 +9,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - fxtypes "github.com/functionx/fx-core/v7/types" + fxtypes "github.com/functionx/fx-core/v8/types" ) func TestParseTargetIBC(t *testing.T) { diff --git a/x/arbitrum/module.go b/x/arbitrum/module.go index c9a75b6ca..3a36a4aa1 100644 --- a/x/arbitrum/module.go +++ b/x/arbitrum/module.go @@ -13,10 +13,10 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - "github.com/functionx/fx-core/v7/x/arbitrum/types" - crosschaincli "github.com/functionx/fx-core/v7/x/crosschain/client/cli" - crosschainkeeper "github.com/functionx/fx-core/v7/x/crosschain/keeper" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/arbitrum/types" + crosschaincli "github.com/functionx/fx-core/v8/x/crosschain/client/cli" + crosschainkeeper "github.com/functionx/fx-core/v8/x/crosschain/keeper" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" ) // type check to ensure the interface is properly implemented diff --git a/x/arbitrum/types/genesis.go b/x/arbitrum/types/genesis.go index 13fa7605a..779f868bb 100644 --- a/x/arbitrum/types/genesis.go +++ b/x/arbitrum/types/genesis.go @@ -1,7 +1,7 @@ package types import ( - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" ) func DefaultGenesisState() *crosschaintypes.GenesisState { diff --git a/x/arbitrum/types/key.go b/x/arbitrum/types/key.go index b7b4bb076..500c627e8 100644 --- a/x/arbitrum/types/key.go +++ b/x/arbitrum/types/key.go @@ -1,6 +1,6 @@ package types -import crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" +import crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" const ( // ModuleName is the name of the module diff --git a/x/avalanche/module.go b/x/avalanche/module.go index 57a65915e..9774e9f52 100644 --- a/x/avalanche/module.go +++ b/x/avalanche/module.go @@ -13,10 +13,10 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - "github.com/functionx/fx-core/v7/x/avalanche/types" - crosschaincli "github.com/functionx/fx-core/v7/x/crosschain/client/cli" - crosschainkeeper "github.com/functionx/fx-core/v7/x/crosschain/keeper" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/avalanche/types" + crosschaincli "github.com/functionx/fx-core/v8/x/crosschain/client/cli" + crosschainkeeper "github.com/functionx/fx-core/v8/x/crosschain/keeper" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" ) // type check to ensure the interface is properly implemented diff --git a/x/avalanche/types/genesis.go b/x/avalanche/types/genesis.go index b247797d0..357f97db2 100644 --- a/x/avalanche/types/genesis.go +++ b/x/avalanche/types/genesis.go @@ -1,7 +1,7 @@ package types import ( - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" ) func DefaultGenesisState() *crosschaintypes.GenesisState { diff --git a/x/avalanche/types/key.go b/x/avalanche/types/key.go index 051ad1ace..16212d81d 100644 --- a/x/avalanche/types/key.go +++ b/x/avalanche/types/key.go @@ -1,6 +1,6 @@ package types -import crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" +import crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" const ( // ModuleName is the name of the module diff --git a/x/bsc/module.go b/x/bsc/module.go index dc3dc1300..7869ad703 100644 --- a/x/bsc/module.go +++ b/x/bsc/module.go @@ -13,10 +13,10 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - "github.com/functionx/fx-core/v7/x/bsc/types" - crosschaincli "github.com/functionx/fx-core/v7/x/crosschain/client/cli" - crosschainkeeper "github.com/functionx/fx-core/v7/x/crosschain/keeper" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/bsc/types" + crosschaincli "github.com/functionx/fx-core/v8/x/crosschain/client/cli" + crosschainkeeper "github.com/functionx/fx-core/v8/x/crosschain/keeper" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" ) // type check to ensure the interface is properly implemented diff --git a/x/bsc/types/genesis.go b/x/bsc/types/genesis.go index ba05732e8..234282ff8 100644 --- a/x/bsc/types/genesis.go +++ b/x/bsc/types/genesis.go @@ -1,7 +1,7 @@ package types import ( - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" ) func DefaultGenesisState() *crosschaintypes.GenesisState { diff --git a/x/bsc/types/key.go b/x/bsc/types/key.go index 2007a0f18..e1195949e 100644 --- a/x/bsc/types/key.go +++ b/x/bsc/types/key.go @@ -1,6 +1,6 @@ package types -import crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" +import crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" const ( // ModuleName is the name of the module diff --git a/x/crosschain/client/cli/query.go b/x/crosschain/client/cli/query.go index 36d38e8d7..3c82c5dfc 100644 --- a/x/crosschain/client/cli/query.go +++ b/x/crosschain/client/cli/query.go @@ -14,7 +14,7 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/spf13/cobra" - "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) func GetQueryCmd(moduleName string, subNames ...string) *cobra.Command { diff --git a/x/crosschain/client/cli/tx.go b/x/crosschain/client/cli/tx.go index c68cf9e21..b8aa42c24 100644 --- a/x/crosschain/client/cli/tx.go +++ b/x/crosschain/client/cli/tx.go @@ -19,7 +19,7 @@ import ( ethcrypto "github.com/ethereum/go-ethereum/crypto" "github.com/spf13/cobra" - "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) func GetTxCmd(moduleName string, subNames ...string) *cobra.Command { diff --git a/x/crosschain/client/cli/tx_proposal.go b/x/crosschain/client/cli/tx_proposal.go index 1a2ba1672..99859c63f 100644 --- a/x/crosschain/client/cli/tx_proposal.go +++ b/x/crosschain/client/cli/tx_proposal.go @@ -11,7 +11,7 @@ import ( govv1betal "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/spf13/cobra" - "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) func CmdUpdateChainOraclesProposal(chainName string) *cobra.Command { diff --git a/x/crosschain/client/proposal_handler.go b/x/crosschain/client/proposal_handler.go index 1e8906846..50ea7f8ca 100644 --- a/x/crosschain/client/proposal_handler.go +++ b/x/crosschain/client/proposal_handler.go @@ -4,7 +4,7 @@ import ( govclient "github.com/cosmos/cosmos-sdk/x/gov/client" "github.com/spf13/cobra" - "github.com/functionx/fx-core/v7/x/crosschain/client/cli" + "github.com/functionx/fx-core/v8/x/crosschain/client/cli" ) var LegacyUpdateChainOraclesProposalHandler = govclient.NewProposalHandler(NewLegacyUpdateChainOraclesProposalCmd) diff --git a/x/crosschain/keeper/abci.go b/x/crosschain/keeper/abci.go index ea43c98ec..bf2d0a5f1 100644 --- a/x/crosschain/keeper/abci.go +++ b/x/crosschain/keeper/abci.go @@ -6,7 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) // EndBlocker is called at the end of every block diff --git a/x/crosschain/keeper/abci_test.go b/x/crosschain/keeper/abci_test.go index a508d93b4..312ab5512 100644 --- a/x/crosschain/keeper/abci_test.go +++ b/x/crosschain/keeper/abci_test.go @@ -10,10 +10,10 @@ import ( authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - "github.com/functionx/fx-core/v7/testutil/helpers" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/crosschain" - "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/testutil/helpers" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/crosschain" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) func (suite *KeeperTestSuite) TestABCIEndBlockDepositClaim() { diff --git a/x/crosschain/keeper/attestation.go b/x/crosschain/keeper/attestation.go index 61d3e488d..e07ced263 100644 --- a/x/crosschain/keeper/attestation.go +++ b/x/crosschain/keeper/attestation.go @@ -9,7 +9,7 @@ import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) func (k Keeper) Attest(ctx sdk.Context, oracleAddr sdk.AccAddress, claim types.ExternalClaim) (*types.Attestation, error) { diff --git a/x/crosschain/keeper/attestation_handler.go b/x/crosschain/keeper/attestation_handler.go index cdb3695c9..6d45d91d1 100644 --- a/x/crosschain/keeper/attestation_handler.go +++ b/x/crosschain/keeper/attestation_handler.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" errortypes "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) // AttestationHandler Handle is the entry point for Attestation processing. diff --git a/x/crosschain/keeper/batch.go b/x/crosschain/keeper/batch.go index 31d4d58b6..b5857efff 100644 --- a/x/crosschain/keeper/batch.go +++ b/x/crosschain/keeper/batch.go @@ -8,7 +8,7 @@ import ( sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) // BuildOutgoingTxBatch starts the following process chain: diff --git a/x/crosschain/keeper/batch_confirm.go b/x/crosschain/keeper/batch_confirm.go index 4aef03c19..cb113e57d 100644 --- a/x/crosschain/keeper/batch_confirm.go +++ b/x/crosschain/keeper/batch_confirm.go @@ -3,7 +3,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) // --- BATCH CONFIRMS --- // diff --git a/x/crosschain/keeper/batch_fee.go b/x/crosschain/keeper/batch_fee.go index cde25cc2b..d5796512f 100644 --- a/x/crosschain/keeper/batch_fee.go +++ b/x/crosschain/keeper/batch_fee.go @@ -8,7 +8,7 @@ import ( sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) // GetBatchFeesByTokenType gets the fee the next batch of a given token type would diff --git a/x/crosschain/keeper/batch_test.go b/x/crosschain/keeper/batch_test.go index 5acea46d0..f8bd4ce68 100644 --- a/x/crosschain/keeper/batch_test.go +++ b/x/crosschain/keeper/batch_test.go @@ -6,8 +6,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/crypto" - "github.com/functionx/fx-core/v7/testutil/helpers" - "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/testutil/helpers" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) func (suite *KeeperTestSuite) TestLastPendingBatchRequestByAddr() { diff --git a/x/crosschain/keeper/bridge_account.go b/x/crosschain/keeper/bridge_account.go index eeb9922ca..602884a23 100644 --- a/x/crosschain/keeper/bridge_account.go +++ b/x/crosschain/keeper/bridge_account.go @@ -3,7 +3,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) func (k Keeper) CreateBridgeAccount(ctx sdk.Context, address string) { diff --git a/x/crosschain/keeper/bridge_call_confirm.go b/x/crosschain/keeper/bridge_call_confirm.go index c6a1821e9..fe1f1ac95 100644 --- a/x/crosschain/keeper/bridge_call_confirm.go +++ b/x/crosschain/keeper/bridge_call_confirm.go @@ -3,7 +3,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) func (k Keeper) HasBridgeCallConfirm(ctx sdk.Context, nonce uint64, oracleAddr sdk.AccAddress) bool { diff --git a/x/crosschain/keeper/bridge_call_in.go b/x/crosschain/keeper/bridge_call_in.go index e88764972..d4c56dfbf 100644 --- a/x/crosschain/keeper/bridge_call_in.go +++ b/x/crosschain/keeper/bridge_call_in.go @@ -14,10 +14,10 @@ import ( authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/ethereum/go-ethereum/common" - fxtelemetry "github.com/functionx/fx-core/v7/telemetry" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/crosschain/types" - erc20types "github.com/functionx/fx-core/v7/x/erc20/types" + fxtelemetry "github.com/functionx/fx-core/v8/telemetry" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" + erc20types "github.com/functionx/fx-core/v8/x/erc20/types" ) func (k Keeper) BridgeCallHandler(ctx sdk.Context, msg *types.MsgBridgeCallClaim) error { diff --git a/x/crosschain/keeper/bridge_call_in_test.go b/x/crosschain/keeper/bridge_call_in_test.go index fca4169f0..c2d9732a2 100644 --- a/x/crosschain/keeper/bridge_call_in_test.go +++ b/x/crosschain/keeper/bridge_call_in_test.go @@ -10,10 +10,10 @@ import ( "github.com/ethereum/go-ethereum/common" "go.uber.org/mock/gomock" - "github.com/functionx/fx-core/v7/testutil/helpers" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/crosschain/types" - erc20types "github.com/functionx/fx-core/v7/x/erc20/types" + "github.com/functionx/fx-core/v8/testutil/helpers" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" + erc20types "github.com/functionx/fx-core/v8/x/erc20/types" ) func (s *KeeperMockSuite) TestBridgeCallHandler() { diff --git a/x/crosschain/keeper/bridge_call_out.go b/x/crosschain/keeper/bridge_call_out.go index 256470c2f..5e227e5ae 100644 --- a/x/crosschain/keeper/bridge_call_out.go +++ b/x/crosschain/keeper/bridge_call_out.go @@ -13,10 +13,10 @@ import ( gogotypes "github.com/cosmos/gogoproto/types" "github.com/ethereum/go-ethereum/common" - fxtelemetry "github.com/functionx/fx-core/v7/telemetry" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/crosschain/types" - erc20types "github.com/functionx/fx-core/v7/x/erc20/types" + fxtelemetry "github.com/functionx/fx-core/v8/telemetry" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" + erc20types "github.com/functionx/fx-core/v8/x/erc20/types" ) func (k Keeper) BridgeCallCoinsToERC20Token(ctx sdk.Context, sender sdk.AccAddress, coins sdk.Coins) ([]types.ERC20Token, sdk.Coins, error) { diff --git a/x/crosschain/keeper/bridge_call_out_test.go b/x/crosschain/keeper/bridge_call_out_test.go index 08d56c026..0db9e0ea0 100644 --- a/x/crosschain/keeper/bridge_call_out_test.go +++ b/x/crosschain/keeper/bridge_call_out_test.go @@ -8,9 +8,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "go.uber.org/mock/gomock" - "github.com/functionx/fx-core/v7/testutil/helpers" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/testutil/helpers" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) func (s *KeeperMockSuite) TestKeeper_BridgeCallResultHandler() { diff --git a/x/crosschain/keeper/bridge_call_out_v1_test.go b/x/crosschain/keeper/bridge_call_out_v1_test.go index 592a52061..2ce6780da 100644 --- a/x/crosschain/keeper/bridge_call_out_v1_test.go +++ b/x/crosschain/keeper/bridge_call_out_v1_test.go @@ -9,10 +9,10 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" - "github.com/functionx/fx-core/v7/contract" - "github.com/functionx/fx-core/v7/testutil/helpers" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/contract" + "github.com/functionx/fx-core/v8/testutil/helpers" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) func (suite *KeeperTestSuite) TestKeeper_BridgeCallRefund() { diff --git a/x/crosschain/keeper/bridge_call_refund.go b/x/crosschain/keeper/bridge_call_refund.go index e1c46b34b..abb4f8c4b 100644 --- a/x/crosschain/keeper/bridge_call_refund.go +++ b/x/crosschain/keeper/bridge_call_refund.go @@ -3,7 +3,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) func (k Keeper) HandleOutgoingBridgeCallRefund(ctx sdk.Context, data *types.OutgoingBridgeCall) sdk.Coins { diff --git a/x/crosschain/keeper/bridge_call_refund_test.go b/x/crosschain/keeper/bridge_call_refund_test.go index 23ca26d65..28893284a 100644 --- a/x/crosschain/keeper/bridge_call_refund_test.go +++ b/x/crosschain/keeper/bridge_call_refund_test.go @@ -3,8 +3,8 @@ package keeper_test import ( sdkmath "cosmossdk.io/math" - "github.com/functionx/fx-core/v7/testutil/helpers" - "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/testutil/helpers" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) func (s *KeeperMockSuite) TestKeeper_HandleOutgoingBridgeCallRefund() { diff --git a/x/crosschain/keeper/bridge_token.go b/x/crosschain/keeper/bridge_token.go index a623f55fb..a60e04f5b 100644 --- a/x/crosschain/keeper/bridge_token.go +++ b/x/crosschain/keeper/bridge_token.go @@ -3,8 +3,8 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/crosschain/types" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) func (k Keeper) AddBridgeTokenExecuted(ctx sdk.Context, claim *types.MsgBridgeTokenClaim) error { diff --git a/x/crosschain/keeper/bridge_token_test.go b/x/crosschain/keeper/bridge_token_test.go index 4b32489e8..78f4c3241 100644 --- a/x/crosschain/keeper/bridge_token_test.go +++ b/x/crosschain/keeper/bridge_token_test.go @@ -1,8 +1,8 @@ package keeper_test import ( - "github.com/functionx/fx-core/v7/testutil/helpers" - "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/testutil/helpers" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) func (suite *KeeperTestSuite) TestKeeper_BridgeToken() { diff --git a/x/crosschain/keeper/delegate.go b/x/crosschain/keeper/delegate.go index 570557537..c1eb3787a 100644 --- a/x/crosschain/keeper/delegate.go +++ b/x/crosschain/keeper/delegate.go @@ -6,7 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) func (k Keeper) GetOracleDelegateToken(ctx sdk.Context, delegateAddr sdk.AccAddress, valAddr sdk.ValAddress) (sdkmath.Int, error) { diff --git a/x/crosschain/keeper/genesis.go b/x/crosschain/keeper/genesis.go index 3e04518b8..20e9b00f6 100644 --- a/x/crosschain/keeper/genesis.go +++ b/x/crosschain/keeper/genesis.go @@ -4,7 +4,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" autytypes "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) // InitGenesis import module genesis diff --git a/x/crosschain/keeper/genesis_test.go b/x/crosschain/keeper/genesis_test.go index 036608d7e..c3c8700da 100644 --- a/x/crosschain/keeper/genesis_test.go +++ b/x/crosschain/keeper/genesis_test.go @@ -7,10 +7,10 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/crypto" - "github.com/functionx/fx-core/v7/testutil/helpers" - "github.com/functionx/fx-core/v7/x/crosschain/keeper" - "github.com/functionx/fx-core/v7/x/crosschain/types" - ethtypes "github.com/functionx/fx-core/v7/x/eth/types" + "github.com/functionx/fx-core/v8/testutil/helpers" + "github.com/functionx/fx-core/v8/x/crosschain/keeper" + "github.com/functionx/fx-core/v8/x/crosschain/types" + ethtypes "github.com/functionx/fx-core/v8/x/eth/types" ) // Tests that batches and transactions are preserved during chain restart diff --git a/x/crosschain/keeper/grpc_query.go b/x/crosschain/keeper/grpc_query.go index 524ac3d4d..1c4a520aa 100644 --- a/x/crosschain/keeper/grpc_query.go +++ b/x/crosschain/keeper/grpc_query.go @@ -15,8 +15,8 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/crosschain/types" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) var _ types.QueryServer = QueryServer{} diff --git a/x/crosschain/keeper/grpc_query_router.go b/x/crosschain/keeper/grpc_query_router.go index d83a9f0f5..ddeaad923 100644 --- a/x/crosschain/keeper/grpc_query_router.go +++ b/x/crosschain/keeper/grpc_query_router.go @@ -6,8 +6,8 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "github.com/functionx/fx-core/v7/x/crosschain/types" - ethtypes "github.com/functionx/fx-core/v7/x/eth/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" + ethtypes "github.com/functionx/fx-core/v8/x/eth/types" ) var _ types.QueryServer = RouterKeeper{} diff --git a/x/crosschain/keeper/grpc_query_test.go b/x/crosschain/keeper/grpc_query_test.go index dda09e91c..53ae78bea 100644 --- a/x/crosschain/keeper/grpc_query_test.go +++ b/x/crosschain/keeper/grpc_query_test.go @@ -5,8 +5,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/query" - "github.com/functionx/fx-core/v7/testutil/helpers" - "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/testutil/helpers" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) func (s *KeeperMockSuite) TestQueryServer_BridgeCalls() { diff --git a/x/crosschain/keeper/grpc_query_v1_test.go b/x/crosschain/keeper/grpc_query_v1_test.go index 6fc15acca..2a6e5c60d 100644 --- a/x/crosschain/keeper/grpc_query_v1_test.go +++ b/x/crosschain/keeper/grpc_query_v1_test.go @@ -22,13 +22,13 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "github.com/functionx/fx-core/v7/app" - "github.com/functionx/fx-core/v7/testutil/helpers" - fxtypes "github.com/functionx/fx-core/v7/types" - bsctypes "github.com/functionx/fx-core/v7/x/bsc/types" - "github.com/functionx/fx-core/v7/x/crosschain/keeper" - "github.com/functionx/fx-core/v7/x/crosschain/types" - ethtypes "github.com/functionx/fx-core/v7/x/eth/types" + "github.com/functionx/fx-core/v8/app" + "github.com/functionx/fx-core/v8/testutil/helpers" + fxtypes "github.com/functionx/fx-core/v8/types" + bsctypes "github.com/functionx/fx-core/v8/x/bsc/types" + "github.com/functionx/fx-core/v8/x/crosschain/keeper" + "github.com/functionx/fx-core/v8/x/crosschain/types" + ethtypes "github.com/functionx/fx-core/v8/x/eth/types" ) type CrossChainGrpcTestSuite struct { diff --git a/x/crosschain/keeper/hook.go b/x/crosschain/keeper/hook.go index 14f1da6fa..de19c2dd7 100644 --- a/x/crosschain/keeper/hook.go +++ b/x/crosschain/keeper/hook.go @@ -5,7 +5,7 @@ import ( errortypes "github.com/cosmos/cosmos-sdk/types/errors" "github.com/ethereum/go-ethereum/common" - "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) // TransferAfter diff --git a/x/crosschain/keeper/keeper.go b/x/crosschain/keeper/keeper.go index 4c8a4945b..ce60f8630 100644 --- a/x/crosschain/keeper/keeper.go +++ b/x/crosschain/keeper/keeper.go @@ -13,7 +13,7 @@ import ( autytypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/ethereum/go-ethereum/common" - "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) // Keeper maintains the link to storage and exposes getter/setter methods for the various parts of the state machine diff --git a/x/crosschain/keeper/keeper_router.go b/x/crosschain/keeper/keeper_router.go index bbc397ac0..fd9fc93f3 100644 --- a/x/crosschain/keeper/keeper_router.go +++ b/x/crosschain/keeper/keeper_router.go @@ -6,7 +6,7 @@ import ( "github.com/cometbft/cometbft/libs/log" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) // RouterKeeper maintains the link to storage and exposes getter/setter methods for the various parts of the state machine diff --git a/x/crosschain/keeper/keeper_test.go b/x/crosschain/keeper/keeper_test.go index 375a43e74..9df15cdc8 100644 --- a/x/crosschain/keeper/keeper_test.go +++ b/x/crosschain/keeper/keeper_test.go @@ -13,21 +13,21 @@ import ( "github.com/stretchr/testify/suite" "go.uber.org/mock/gomock" - "github.com/functionx/fx-core/v7/app" - "github.com/functionx/fx-core/v7/testutil" - "github.com/functionx/fx-core/v7/testutil/helpers" - fxtypes "github.com/functionx/fx-core/v7/types" - arbitrumtypes "github.com/functionx/fx-core/v7/x/arbitrum/types" - avalanchetypes "github.com/functionx/fx-core/v7/x/avalanche/types" - bsctypes "github.com/functionx/fx-core/v7/x/bsc/types" - crosschainkeeper "github.com/functionx/fx-core/v7/x/crosschain/keeper" - "github.com/functionx/fx-core/v7/x/crosschain/mock" - "github.com/functionx/fx-core/v7/x/crosschain/types" - ethtypes "github.com/functionx/fx-core/v7/x/eth/types" - layer2types "github.com/functionx/fx-core/v7/x/layer2/types" - optimismtypes "github.com/functionx/fx-core/v7/x/optimism/types" - polygontypes "github.com/functionx/fx-core/v7/x/polygon/types" - trontypes "github.com/functionx/fx-core/v7/x/tron/types" + "github.com/functionx/fx-core/v8/app" + "github.com/functionx/fx-core/v8/testutil" + "github.com/functionx/fx-core/v8/testutil/helpers" + fxtypes "github.com/functionx/fx-core/v8/types" + arbitrumtypes "github.com/functionx/fx-core/v8/x/arbitrum/types" + avalanchetypes "github.com/functionx/fx-core/v8/x/avalanche/types" + bsctypes "github.com/functionx/fx-core/v8/x/bsc/types" + crosschainkeeper "github.com/functionx/fx-core/v8/x/crosschain/keeper" + "github.com/functionx/fx-core/v8/x/crosschain/mock" + "github.com/functionx/fx-core/v8/x/crosschain/types" + ethtypes "github.com/functionx/fx-core/v8/x/eth/types" + layer2types "github.com/functionx/fx-core/v8/x/layer2/types" + optimismtypes "github.com/functionx/fx-core/v8/x/optimism/types" + polygontypes "github.com/functionx/fx-core/v8/x/polygon/types" + trontypes "github.com/functionx/fx-core/v8/x/tron/types" ) type KeeperMockSuite struct { diff --git a/x/crosschain/keeper/keeper_v1_test.go b/x/crosschain/keeper/keeper_v1_test.go index a1b647922..c204814d8 100644 --- a/x/crosschain/keeper/keeper_v1_test.go +++ b/x/crosschain/keeper/keeper_v1_test.go @@ -14,20 +14,20 @@ import ( tronaddress "github.com/fbsobreira/gotron-sdk/pkg/address" "github.com/stretchr/testify/suite" - "github.com/functionx/fx-core/v7/app" - "github.com/functionx/fx-core/v7/testutil/helpers" - fxtypes "github.com/functionx/fx-core/v7/types" - arbitrumtypes "github.com/functionx/fx-core/v7/x/arbitrum/types" - avalanchetypes "github.com/functionx/fx-core/v7/x/avalanche/types" - bsctypes "github.com/functionx/fx-core/v7/x/bsc/types" - "github.com/functionx/fx-core/v7/x/crosschain/keeper" - "github.com/functionx/fx-core/v7/x/crosschain/types" - ethtypes "github.com/functionx/fx-core/v7/x/eth/types" - layer2types "github.com/functionx/fx-core/v7/x/layer2/types" - optimismtypes "github.com/functionx/fx-core/v7/x/optimism/types" - polygontypes "github.com/functionx/fx-core/v7/x/polygon/types" - tronkeeper "github.com/functionx/fx-core/v7/x/tron/keeper" - trontypes "github.com/functionx/fx-core/v7/x/tron/types" + "github.com/functionx/fx-core/v8/app" + "github.com/functionx/fx-core/v8/testutil/helpers" + fxtypes "github.com/functionx/fx-core/v8/types" + arbitrumtypes "github.com/functionx/fx-core/v8/x/arbitrum/types" + avalanchetypes "github.com/functionx/fx-core/v8/x/avalanche/types" + bsctypes "github.com/functionx/fx-core/v8/x/bsc/types" + "github.com/functionx/fx-core/v8/x/crosschain/keeper" + "github.com/functionx/fx-core/v8/x/crosschain/types" + ethtypes "github.com/functionx/fx-core/v8/x/eth/types" + layer2types "github.com/functionx/fx-core/v8/x/layer2/types" + optimismtypes "github.com/functionx/fx-core/v8/x/optimism/types" + polygontypes "github.com/functionx/fx-core/v8/x/polygon/types" + tronkeeper "github.com/functionx/fx-core/v8/x/tron/keeper" + trontypes "github.com/functionx/fx-core/v8/x/tron/types" ) type KeeperTestSuite struct { diff --git a/x/crosschain/keeper/migrations.go b/x/crosschain/keeper/migrations.go index 65d3fcce2..e75401cf1 100644 --- a/x/crosschain/keeper/migrations.go +++ b/x/crosschain/keeper/migrations.go @@ -3,8 +3,8 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/crosschain/types" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) type Migrator struct { diff --git a/x/crosschain/keeper/msg_server.go b/x/crosschain/keeper/msg_server.go index f85f60acf..af9b8fd49 100644 --- a/x/crosschain/keeper/msg_server.go +++ b/x/crosschain/keeper/msg_server.go @@ -14,9 +14,9 @@ import ( govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/crosschain/types" - erc20types "github.com/functionx/fx-core/v7/x/erc20/types" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" + erc20types "github.com/functionx/fx-core/v8/x/erc20/types" ) var _ types.MsgServer = MsgServer{} diff --git a/x/crosschain/keeper/msg_server_router.go b/x/crosschain/keeper/msg_server_router.go index dac4eab83..82b77e400 100644 --- a/x/crosschain/keeper/msg_server_router.go +++ b/x/crosschain/keeper/msg_server_router.go @@ -7,7 +7,7 @@ import ( errorsmod "cosmossdk.io/errors" errortypes "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) type msgServer struct { diff --git a/x/crosschain/keeper/msg_server_test.go b/x/crosschain/keeper/msg_server_test.go index 9e9a86b16..efe1ad286 100644 --- a/x/crosschain/keeper/msg_server_test.go +++ b/x/crosschain/keeper/msg_server_test.go @@ -20,12 +20,12 @@ import ( govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/ethereum/go-ethereum/crypto" - "github.com/functionx/fx-core/v7/testutil/helpers" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/crosschain/types" - erc20types "github.com/functionx/fx-core/v7/x/erc20/types" - ethtypes "github.com/functionx/fx-core/v7/x/eth/types" - trontypes "github.com/functionx/fx-core/v7/x/tron/types" + "github.com/functionx/fx-core/v8/testutil/helpers" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" + erc20types "github.com/functionx/fx-core/v8/x/erc20/types" + ethtypes "github.com/functionx/fx-core/v8/x/eth/types" + trontypes "github.com/functionx/fx-core/v8/x/tron/types" ) func (suite *KeeperTestSuite) TestMsgBondedOracle() { diff --git a/x/crosschain/keeper/observed.go b/x/crosschain/keeper/observed.go index 7048cecdb..251ef6857 100644 --- a/x/crosschain/keeper/observed.go +++ b/x/crosschain/keeper/observed.go @@ -3,7 +3,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) // --- OBSERVED EVENT NONCE --- // diff --git a/x/crosschain/keeper/oracle.go b/x/crosschain/keeper/oracle.go index 4a8358c8b..3ec5ae804 100644 --- a/x/crosschain/keeper/oracle.go +++ b/x/crosschain/keeper/oracle.go @@ -6,7 +6,7 @@ import ( "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) // --- PROPOSAL ORACLE --- // diff --git a/x/crosschain/keeper/oracle_set.go b/x/crosschain/keeper/oracle_set.go index d4ba59dae..e55331723 100644 --- a/x/crosschain/keeper/oracle_set.go +++ b/x/crosschain/keeper/oracle_set.go @@ -8,7 +8,7 @@ import ( sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) func (k Keeper) UpdateOracleSetExecuted(ctx sdk.Context, claim *types.MsgOracleSetUpdatedClaim) error { diff --git a/x/crosschain/keeper/oracle_set_confirm.go b/x/crosschain/keeper/oracle_set_confirm.go index de7a4d7f5..1dfc4738d 100644 --- a/x/crosschain/keeper/oracle_set_confirm.go +++ b/x/crosschain/keeper/oracle_set_confirm.go @@ -3,7 +3,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) // --- ORACLE SET CONFIRMS --- // diff --git a/x/crosschain/keeper/oracle_set_test.go b/x/crosschain/keeper/oracle_set_test.go index c6e827750..b0e21e498 100644 --- a/x/crosschain/keeper/oracle_set_test.go +++ b/x/crosschain/keeper/oracle_set_test.go @@ -8,8 +8,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/crypto" - "github.com/functionx/fx-core/v7/testutil/helpers" - "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/testutil/helpers" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) func (suite *KeeperTestSuite) TestLastPendingOracleSetRequestByAddr() { diff --git a/x/crosschain/keeper/outgoing_pending_pool.go b/x/crosschain/keeper/outgoing_pending_pool.go index 8ced20146..fa4574d9c 100644 --- a/x/crosschain/keeper/outgoing_pending_pool.go +++ b/x/crosschain/keeper/outgoing_pending_pool.go @@ -6,9 +6,9 @@ import ( errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/crosschain/types" - erc20types "github.com/functionx/fx-core/v7/x/erc20/types" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" + erc20types "github.com/functionx/fx-core/v8/x/erc20/types" ) func (k Keeper) AddToOutgoingPendingPool(ctx sdk.Context, sender sdk.AccAddress, receiver string, amount sdk.Coin, fee sdk.Coin) (uint64, error) { diff --git a/x/crosschain/keeper/outgoing_pending_pool_test.go b/x/crosschain/keeper/outgoing_pending_pool_test.go index e748154f4..acbc3ea98 100644 --- a/x/crosschain/keeper/outgoing_pending_pool_test.go +++ b/x/crosschain/keeper/outgoing_pending_pool_test.go @@ -5,9 +5,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "go.uber.org/mock/gomock" - "github.com/functionx/fx-core/v7/testutil/helpers" - "github.com/functionx/fx-core/v7/x/crosschain/types" - erc20types "github.com/functionx/fx-core/v7/x/erc20/types" + "github.com/functionx/fx-core/v8/testutil/helpers" + "github.com/functionx/fx-core/v8/x/crosschain/types" + erc20types "github.com/functionx/fx-core/v8/x/erc20/types" ) func (s *KeeperMockSuite) TestSendToExternal() { diff --git a/x/crosschain/keeper/outgoing_pool.go b/x/crosschain/keeper/outgoing_pool.go index 12a4ac758..39119f4b9 100644 --- a/x/crosschain/keeper/outgoing_pool.go +++ b/x/crosschain/keeper/outgoing_pool.go @@ -9,9 +9,9 @@ import ( "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" - fxtelemetry "github.com/functionx/fx-core/v7/telemetry" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/crosschain/types" + fxtelemetry "github.com/functionx/fx-core/v8/telemetry" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) func (k Keeper) AddToOutgoingPool(ctx sdk.Context, sender sdk.AccAddress, receiver string, amount sdk.Coin, fee sdk.Coin) (uint64, error) { diff --git a/x/crosschain/keeper/outgoing_pool_test.go b/x/crosschain/keeper/outgoing_pool_test.go index 235b0dbb6..ccb60d509 100644 --- a/x/crosschain/keeper/outgoing_pool_test.go +++ b/x/crosschain/keeper/outgoing_pool_test.go @@ -5,10 +5,10 @@ import ( tmrand "github.com/cometbft/cometbft/libs/rand" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/functionx/fx-core/v7/testutil/helpers" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/crosschain/types" - ethtypes "github.com/functionx/fx-core/v7/x/eth/types" + "github.com/functionx/fx-core/v8/testutil/helpers" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" + ethtypes "github.com/functionx/fx-core/v8/x/eth/types" ) func (suite *KeeperTestSuite) TestKeeper_OutgoingPool() { diff --git a/x/crosschain/keeper/params.go b/x/crosschain/keeper/params.go index 51d98ec4c..f3a42a302 100644 --- a/x/crosschain/keeper/params.go +++ b/x/crosschain/keeper/params.go @@ -3,7 +3,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) // GetParams returns the parameters from the store diff --git a/x/crosschain/keeper/params_test.go b/x/crosschain/keeper/params_test.go index de966e054..a9182f70f 100644 --- a/x/crosschain/keeper/params_test.go +++ b/x/crosschain/keeper/params_test.go @@ -4,7 +4,7 @@ import ( sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) func (suite *KeeperTestSuite) TestParams() { diff --git a/x/crosschain/keeper/pending_bridge_call_out.go b/x/crosschain/keeper/pending_bridge_call_out.go index 55c998aa9..334d18ae3 100644 --- a/x/crosschain/keeper/pending_bridge_call_out.go +++ b/x/crosschain/keeper/pending_bridge_call_out.go @@ -8,9 +8,9 @@ import ( gogotypes "github.com/cosmos/gogoproto/types" "github.com/ethereum/go-ethereum/common" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/crosschain/types" - erc20types "github.com/functionx/fx-core/v7/x/erc20/types" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" + erc20types "github.com/functionx/fx-core/v8/x/erc20/types" ) func (k Keeper) AddPendingOutgoingBridgeCall(ctx sdk.Context, sender, refundAddr common.Address, tokens []types.ERC20Token, to common.Address, data, memo []byte, eventNonce uint64, notLiquidCoins sdk.Coins) (uint64, error) { diff --git a/x/crosschain/keeper/pending_execute_claim.go b/x/crosschain/keeper/pending_execute_claim.go index ab0fead10..0a9f789d7 100644 --- a/x/crosschain/keeper/pending_execute_claim.go +++ b/x/crosschain/keeper/pending_execute_claim.go @@ -3,7 +3,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) func (k Keeper) SavePendingExecuteClaim(ctx sdk.Context, claim types.ExternalClaim) { diff --git a/x/crosschain/keeper/pending_execute_claim_test.go b/x/crosschain/keeper/pending_execute_claim_test.go index b5811f9ab..341551613 100644 --- a/x/crosschain/keeper/pending_execute_claim_test.go +++ b/x/crosschain/keeper/pending_execute_claim_test.go @@ -4,8 +4,8 @@ import ( "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/functionx/fx-core/v7/testutil/helpers" - "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/testutil/helpers" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) func (s *KeeperMockSuite) TestKeeper_SavePendingExecuteClaim() { diff --git a/x/crosschain/keeper/proposal.go b/x/crosschain/keeper/proposal.go index b6ebbc840..43ef70e3b 100644 --- a/x/crosschain/keeper/proposal.go +++ b/x/crosschain/keeper/proposal.go @@ -1,20 +1,18 @@ package keeper import ( - "fmt" - errorsmod "cosmossdk.io/errors" sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) func (k Keeper) UpdateProposalOracles(ctx sdk.Context, oracles []string) error { if len(oracles) > types.MaxOracleSize { return errorsmod.Wrapf(types.ErrInvalid, - fmt.Sprintf("oracle length must be less than or equal: %d", types.MaxOracleSize)) + "oracle length must be less than or equal: %d", types.MaxOracleSize) } newOracleMap := make(map[string]bool, len(oracles)) diff --git a/x/crosschain/keeper/proposal_legacy.go b/x/crosschain/keeper/proposal_legacy.go index 9ee267561..0d10693be 100644 --- a/x/crosschain/keeper/proposal_legacy.go +++ b/x/crosschain/keeper/proposal_legacy.go @@ -3,7 +3,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) // Deprecated diff --git a/x/crosschain/keeper/proposal_legacy_test.go b/x/crosschain/keeper/proposal_legacy_test.go index 5209ff9a4..858b831a4 100644 --- a/x/crosschain/keeper/proposal_legacy_test.go +++ b/x/crosschain/keeper/proposal_legacy_test.go @@ -3,8 +3,8 @@ package keeper_test import ( tmrand "github.com/cometbft/cometbft/libs/rand" - "github.com/functionx/fx-core/v7/testutil/helpers" - "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/testutil/helpers" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) func (suite *KeeperTestSuite) TestUpdateCrossChainOraclesProposal() { diff --git a/x/crosschain/keeper/send_to_fx.go b/x/crosschain/keeper/send_to_fx.go index 280ff0729..218affd46 100644 --- a/x/crosschain/keeper/send_to_fx.go +++ b/x/crosschain/keeper/send_to_fx.go @@ -16,10 +16,10 @@ import ( ibcclienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" "github.com/ethereum/go-ethereum/common" - "github.com/functionx/fx-core/v7/contract" - fxtelemetry "github.com/functionx/fx-core/v7/telemetry" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/contract" + fxtelemetry "github.com/functionx/fx-core/v8/telemetry" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) func (k Keeper) SendToFxExecuted(ctx sdk.Context, claim *types.MsgSendToFxClaim) error { diff --git a/x/crosschain/keeper/timeout_height.go b/x/crosschain/keeper/timeout_height.go index 0b82d665c..f90cd3fe3 100644 --- a/x/crosschain/keeper/timeout_height.go +++ b/x/crosschain/keeper/timeout_height.go @@ -3,7 +3,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) // CalExternalTimeoutHeight This gets the timeout height in External blocks. diff --git a/x/crosschain/mock/expected_keepers_mocks.go b/x/crosschain/mock/expected_keepers_mocks.go index f78169dce..2d7f431f4 100644 --- a/x/crosschain/mock/expected_keepers_mocks.go +++ b/x/crosschain/mock/expected_keepers_mocks.go @@ -23,9 +23,9 @@ import ( types5 "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" common "github.com/ethereum/go-ethereum/common" types6 "github.com/evmos/ethermint/x/evm/types" - types7 "github.com/functionx/fx-core/v7/types" - types8 "github.com/functionx/fx-core/v7/x/crosschain/types" - types9 "github.com/functionx/fx-core/v7/x/erc20/types" + types7 "github.com/functionx/fx-core/v8/types" + types8 "github.com/functionx/fx-core/v8/x/crosschain/types" + types9 "github.com/functionx/fx-core/v8/x/erc20/types" gomock "go.uber.org/mock/gomock" ) diff --git a/x/crosschain/precompile/add_pending_pool_rewards.go b/x/crosschain/precompile/add_pending_pool_rewards.go index 96d149921..36d09b81c 100644 --- a/x/crosschain/precompile/add_pending_pool_rewards.go +++ b/x/crosschain/precompile/add_pending_pool_rewards.go @@ -11,10 +11,10 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/vm" - fxcontract "github.com/functionx/fx-core/v7/contract" - fxtypes "github.com/functionx/fx-core/v7/types" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" - evmtypes "github.com/functionx/fx-core/v7/x/evm/types" + fxcontract "github.com/functionx/fx-core/v8/contract" + fxtypes "github.com/functionx/fx-core/v8/types" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" + evmtypes "github.com/functionx/fx-core/v8/x/evm/types" ) type AddPendingPoolRewardsMethod struct { diff --git a/x/crosschain/precompile/add_pending_pool_rewards_test.go b/x/crosschain/precompile/add_pending_pool_rewards_test.go index 29c3c98bc..8b9a03dad 100644 --- a/x/crosschain/precompile/add_pending_pool_rewards_test.go +++ b/x/crosschain/precompile/add_pending_pool_rewards_test.go @@ -13,11 +13,11 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" - "github.com/functionx/fx-core/v7/testutil/helpers" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/crosschain/precompile" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" - "github.com/functionx/fx-core/v7/x/erc20/types" + "github.com/functionx/fx-core/v8/testutil/helpers" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/crosschain/precompile" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/erc20/types" ) func TestAddPendingPoolRewardsABI(t *testing.T) { diff --git a/x/crosschain/precompile/bridge_call.go b/x/crosschain/precompile/bridge_call.go index 85f7c9bf4..aa25f94f2 100644 --- a/x/crosschain/precompile/bridge_call.go +++ b/x/crosschain/precompile/bridge_call.go @@ -9,8 +9,8 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/vm" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" - evmtypes "github.com/functionx/fx-core/v7/x/evm/types" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" + evmtypes "github.com/functionx/fx-core/v8/x/evm/types" ) type BridgeCallMethod struct { diff --git a/x/crosschain/precompile/bridge_call_test.go b/x/crosschain/precompile/bridge_call_test.go index e495a0998..27df89abc 100644 --- a/x/crosschain/precompile/bridge_call_test.go +++ b/x/crosschain/precompile/bridge_call_test.go @@ -9,10 +9,10 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/functionx/fx-core/v7/contract" - "github.com/functionx/fx-core/v7/testutil/helpers" - "github.com/functionx/fx-core/v7/x/crosschain/precompile" - "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/contract" + "github.com/functionx/fx-core/v8/testutil/helpers" + "github.com/functionx/fx-core/v8/x/crosschain/precompile" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) func TestBridgeCallABI(t *testing.T) { diff --git a/x/crosschain/precompile/bridge_coin_amount.go b/x/crosschain/precompile/bridge_coin_amount.go index b198a9036..0be3e339d 100644 --- a/x/crosschain/precompile/bridge_coin_amount.go +++ b/x/crosschain/precompile/bridge_coin_amount.go @@ -7,11 +7,11 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/core/vm" - fxcontract "github.com/functionx/fx-core/v7/contract" - fxtypes "github.com/functionx/fx-core/v7/types" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" - ethtypes "github.com/functionx/fx-core/v7/x/eth/types" - evmtypes "github.com/functionx/fx-core/v7/x/evm/types" + fxcontract "github.com/functionx/fx-core/v8/contract" + fxtypes "github.com/functionx/fx-core/v8/types" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" + ethtypes "github.com/functionx/fx-core/v8/x/eth/types" + evmtypes "github.com/functionx/fx-core/v8/x/evm/types" ) type BridgeCoinAmountMethod struct { diff --git a/x/crosschain/precompile/bridge_coin_amount_test.go b/x/crosschain/precompile/bridge_coin_amount_test.go index 18eb91f76..adcda76e3 100644 --- a/x/crosschain/precompile/bridge_coin_amount_test.go +++ b/x/crosschain/precompile/bridge_coin_amount_test.go @@ -11,10 +11,10 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/assert" - "github.com/functionx/fx-core/v7/testutil/helpers" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/crosschain/precompile" - "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/testutil/helpers" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/crosschain/precompile" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) func TestBridgeCoinAmountMethod_ABI(t *testing.T) { diff --git a/x/crosschain/precompile/cancel_bridge_call.go b/x/crosschain/precompile/cancel_bridge_call.go index 674216028..25ef5ae30 100644 --- a/x/crosschain/precompile/cancel_bridge_call.go +++ b/x/crosschain/precompile/cancel_bridge_call.go @@ -10,8 +10,8 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/vm" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" - evmtypes "github.com/functionx/fx-core/v7/x/evm/types" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" + evmtypes "github.com/functionx/fx-core/v8/x/evm/types" ) type CancelPendingBridgeCallMethod struct { diff --git a/x/crosschain/precompile/cancel_bridge_call_test.go b/x/crosschain/precompile/cancel_bridge_call_test.go index 51ab27a5e..2f0c50cd6 100644 --- a/x/crosschain/precompile/cancel_bridge_call_test.go +++ b/x/crosschain/precompile/cancel_bridge_call_test.go @@ -12,10 +12,10 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" - "github.com/functionx/fx-core/v7/testutil/helpers" - "github.com/functionx/fx-core/v7/x/crosschain/precompile" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" - "github.com/functionx/fx-core/v7/x/erc20/types" + "github.com/functionx/fx-core/v8/testutil/helpers" + "github.com/functionx/fx-core/v8/x/crosschain/precompile" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/erc20/types" ) func TestCancelPendingBridgeCallABI(t *testing.T) { diff --git a/x/crosschain/precompile/cancel_send_to_external.go b/x/crosschain/precompile/cancel_send_to_external.go index d55bf438d..0a0a5263b 100644 --- a/x/crosschain/precompile/cancel_send_to_external.go +++ b/x/crosschain/precompile/cancel_send_to_external.go @@ -10,8 +10,8 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/vm" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" - evmtypes "github.com/functionx/fx-core/v7/x/evm/types" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" + evmtypes "github.com/functionx/fx-core/v8/x/evm/types" ) type CancelSendToExternalMethod struct { diff --git a/x/crosschain/precompile/cancel_send_to_external_test.go b/x/crosschain/precompile/cancel_send_to_external_test.go index 2625f9591..ce1f5048b 100644 --- a/x/crosschain/precompile/cancel_send_to_external_test.go +++ b/x/crosschain/precompile/cancel_send_to_external_test.go @@ -15,15 +15,15 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" - "github.com/functionx/fx-core/v7/contract" - "github.com/functionx/fx-core/v7/testutil/helpers" - fxtypes "github.com/functionx/fx-core/v7/types" - bsctypes "github.com/functionx/fx-core/v7/x/bsc/types" - crosschainkeeper "github.com/functionx/fx-core/v7/x/crosschain/keeper" - "github.com/functionx/fx-core/v7/x/crosschain/precompile" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" - "github.com/functionx/fx-core/v7/x/erc20/types" - ethtypes "github.com/functionx/fx-core/v7/x/eth/types" + "github.com/functionx/fx-core/v8/contract" + "github.com/functionx/fx-core/v8/testutil/helpers" + fxtypes "github.com/functionx/fx-core/v8/types" + bsctypes "github.com/functionx/fx-core/v8/x/bsc/types" + crosschainkeeper "github.com/functionx/fx-core/v8/x/crosschain/keeper" + "github.com/functionx/fx-core/v8/x/crosschain/precompile" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/erc20/types" + ethtypes "github.com/functionx/fx-core/v8/x/eth/types" ) func TestCancelSendToExternalABI(t *testing.T) { diff --git a/x/crosschain/precompile/contract.go b/x/crosschain/precompile/contract.go index f97985fa1..43371b513 100644 --- a/x/crosschain/precompile/contract.go +++ b/x/crosschain/precompile/contract.go @@ -8,9 +8,9 @@ import ( ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/vm" - "github.com/functionx/fx-core/v7/contract" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" - evmtypes "github.com/functionx/fx-core/v7/x/evm/types" + "github.com/functionx/fx-core/v8/contract" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" + evmtypes "github.com/functionx/fx-core/v8/x/evm/types" ) type Contract struct { diff --git a/x/crosschain/precompile/contract_test.go b/x/crosschain/precompile/contract_test.go index f28e7402c..fcbbd36b6 100644 --- a/x/crosschain/precompile/contract_test.go +++ b/x/crosschain/precompile/contract_test.go @@ -40,17 +40,17 @@ import ( "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" - "github.com/functionx/fx-core/v7/app" - "github.com/functionx/fx-core/v7/contract" - testscontract "github.com/functionx/fx-core/v7/tests/contract" - "github.com/functionx/fx-core/v7/testutil/helpers" - fxtypes "github.com/functionx/fx-core/v7/types" - crosschainkeeper "github.com/functionx/fx-core/v7/x/crosschain/keeper" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" - "github.com/functionx/fx-core/v7/x/erc20/types" - crossethtypes "github.com/functionx/fx-core/v7/x/eth/types" - tronkeeper "github.com/functionx/fx-core/v7/x/tron/keeper" - trontypes "github.com/functionx/fx-core/v7/x/tron/types" + "github.com/functionx/fx-core/v8/app" + "github.com/functionx/fx-core/v8/contract" + testscontract "github.com/functionx/fx-core/v8/tests/contract" + "github.com/functionx/fx-core/v8/testutil/helpers" + fxtypes "github.com/functionx/fx-core/v8/types" + crosschainkeeper "github.com/functionx/fx-core/v8/x/crosschain/keeper" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/erc20/types" + crossethtypes "github.com/functionx/fx-core/v8/x/eth/types" + tronkeeper "github.com/functionx/fx-core/v8/x/tron/keeper" + trontypes "github.com/functionx/fx-core/v8/x/tron/types" ) type PrecompileTestSuite struct { diff --git a/x/crosschain/precompile/crosschain.go b/x/crosschain/precompile/crosschain.go index 4d7607e9a..9aaf88e60 100644 --- a/x/crosschain/precompile/crosschain.go +++ b/x/crosschain/precompile/crosschain.go @@ -10,11 +10,11 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/vm" - fxcontract "github.com/functionx/fx-core/v7/contract" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/crosschain/legacy" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" - evmtypes "github.com/functionx/fx-core/v7/x/evm/types" + fxcontract "github.com/functionx/fx-core/v8/contract" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/crosschain/legacy" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" + evmtypes "github.com/functionx/fx-core/v8/x/evm/types" ) type CrossChainMethod struct { diff --git a/x/crosschain/precompile/crosschain_test.go b/x/crosschain/precompile/crosschain_test.go index dcfc42fea..a5cbb851b 100644 --- a/x/crosschain/precompile/crosschain_test.go +++ b/x/crosschain/precompile/crosschain_test.go @@ -18,16 +18,16 @@ import ( "github.com/stretchr/testify/require" "golang.org/x/exp/slices" - "github.com/functionx/fx-core/v7/contract" - testcontract "github.com/functionx/fx-core/v7/tests/contract" - "github.com/functionx/fx-core/v7/testutil/helpers" - fxtypes "github.com/functionx/fx-core/v7/types" - bsctypes "github.com/functionx/fx-core/v7/x/bsc/types" - crosschainkeeper "github.com/functionx/fx-core/v7/x/crosschain/keeper" - "github.com/functionx/fx-core/v7/x/crosschain/precompile" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" - "github.com/functionx/fx-core/v7/x/erc20/types" - ethtypes "github.com/functionx/fx-core/v7/x/eth/types" + "github.com/functionx/fx-core/v8/contract" + testcontract "github.com/functionx/fx-core/v8/tests/contract" + "github.com/functionx/fx-core/v8/testutil/helpers" + fxtypes "github.com/functionx/fx-core/v8/types" + bsctypes "github.com/functionx/fx-core/v8/x/bsc/types" + crosschainkeeper "github.com/functionx/fx-core/v8/x/crosschain/keeper" + "github.com/functionx/fx-core/v8/x/crosschain/precompile" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/erc20/types" + ethtypes "github.com/functionx/fx-core/v8/x/eth/types" ) func TestCrossChainABI(t *testing.T) { @@ -1984,10 +1984,10 @@ func (suite *PrecompileTestSuite) TestCrossChainIBC() { packData, value, portId, channelId, errArgs := tc.malleate(pair, md, signer, randMint) - contract := crosschaintypes.GetAddress() + crosschainContract := crosschaintypes.GetAddress() addrQuery := signer.Address() if strings.HasPrefix(tc.name, "contract") { - contract = suite.crosschain + crosschainContract = suite.crosschain addrQuery = suite.crosschain } @@ -2000,7 +2000,7 @@ func (suite *PrecompileTestSuite) TestCrossChainIBC() { totalBefore, err := suite.app.BankKeeper.TotalSupply(suite.ctx, &banktypes.QueryTotalSupplyRequest{}) suite.Require().NoError(err) - res := suite.EthereumTx(signer, contract, value, packData) + res := suite.EthereumTx(signer, crosschainContract, value, packData) if tc.result { suite.Require().False(res.Failed(), res.VmError) diff --git a/x/crosschain/precompile/execute_claim.go b/x/crosschain/precompile/execute_claim.go index 6fa52505f..c6fbb3000 100644 --- a/x/crosschain/precompile/execute_claim.go +++ b/x/crosschain/precompile/execute_claim.go @@ -9,9 +9,9 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/vm" - "github.com/functionx/fx-core/v7/contract" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" - evmtypes "github.com/functionx/fx-core/v7/x/evm/types" + "github.com/functionx/fx-core/v8/contract" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" + evmtypes "github.com/functionx/fx-core/v8/x/evm/types" ) var _ contract.PrecompileMethod = (*ExecuteClaimMethod)(nil) diff --git a/x/crosschain/precompile/execute_claim_test.go b/x/crosschain/precompile/execute_claim_test.go index 0e43a74bc..bcf3dfa56 100644 --- a/x/crosschain/precompile/execute_claim_test.go +++ b/x/crosschain/precompile/execute_claim_test.go @@ -7,9 +7,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/functionx/fx-core/v7/x/crosschain/precompile" - "github.com/functionx/fx-core/v7/x/crosschain/types" - ethtypes "github.com/functionx/fx-core/v7/x/eth/types" + "github.com/functionx/fx-core/v8/x/crosschain/precompile" + "github.com/functionx/fx-core/v8/x/crosschain/types" + ethtypes "github.com/functionx/fx-core/v8/x/eth/types" ) func TestExecuteClaimMethod_ABI(t *testing.T) { diff --git a/x/crosschain/precompile/expected_keepers.go b/x/crosschain/precompile/expected_keepers.go index e9095cba0..a817cc7c6 100644 --- a/x/crosschain/precompile/expected_keepers.go +++ b/x/crosschain/precompile/expected_keepers.go @@ -9,8 +9,8 @@ import ( ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" "github.com/ethereum/go-ethereum/common" - fxtypes "github.com/functionx/fx-core/v7/types" - erc20types "github.com/functionx/fx-core/v7/x/erc20/types" + fxtypes "github.com/functionx/fx-core/v8/types" + erc20types "github.com/functionx/fx-core/v8/x/erc20/types" ) type Erc20Keeper interface { diff --git a/x/crosschain/precompile/fip20_crosschain.go b/x/crosschain/precompile/fip20_crosschain.go index c9a62b073..212c2cac1 100644 --- a/x/crosschain/precompile/fip20_crosschain.go +++ b/x/crosschain/precompile/fip20_crosschain.go @@ -8,10 +8,10 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/core/vm" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/crosschain/legacy" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" - evmtypes "github.com/functionx/fx-core/v7/x/evm/types" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/crosschain/legacy" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" + evmtypes "github.com/functionx/fx-core/v8/x/evm/types" ) type FIP20CrossChainMethod struct { diff --git a/x/crosschain/precompile/fip20crosschain_test.go b/x/crosschain/precompile/fip20crosschain_test.go index 62885a2c4..899fff9dc 100644 --- a/x/crosschain/precompile/fip20crosschain_test.go +++ b/x/crosschain/precompile/fip20crosschain_test.go @@ -17,15 +17,15 @@ import ( ibcchanneltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" "github.com/stretchr/testify/require" - "github.com/functionx/fx-core/v7/contract" - "github.com/functionx/fx-core/v7/testutil/helpers" - fxtypes "github.com/functionx/fx-core/v7/types" - bsctypes "github.com/functionx/fx-core/v7/x/bsc/types" - crosschainkeeper "github.com/functionx/fx-core/v7/x/crosschain/keeper" - "github.com/functionx/fx-core/v7/x/crosschain/precompile" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" - "github.com/functionx/fx-core/v7/x/erc20/types" - ethtypes "github.com/functionx/fx-core/v7/x/eth/types" + "github.com/functionx/fx-core/v8/contract" + "github.com/functionx/fx-core/v8/testutil/helpers" + fxtypes "github.com/functionx/fx-core/v8/types" + bsctypes "github.com/functionx/fx-core/v8/x/bsc/types" + crosschainkeeper "github.com/functionx/fx-core/v8/x/crosschain/keeper" + "github.com/functionx/fx-core/v8/x/crosschain/precompile" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/erc20/types" + ethtypes "github.com/functionx/fx-core/v8/x/eth/types" ) func TestFIP20CrossChainABI(t *testing.T) { diff --git a/x/crosschain/precompile/increase_bridge_fee.go b/x/crosschain/precompile/increase_bridge_fee.go index 62596b92b..07d0f9d71 100644 --- a/x/crosschain/precompile/increase_bridge_fee.go +++ b/x/crosschain/precompile/increase_bridge_fee.go @@ -11,10 +11,10 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/vm" - fxcontract "github.com/functionx/fx-core/v7/contract" - fxtypes "github.com/functionx/fx-core/v7/types" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" - evmtypes "github.com/functionx/fx-core/v7/x/evm/types" + fxcontract "github.com/functionx/fx-core/v8/contract" + fxtypes "github.com/functionx/fx-core/v8/types" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" + evmtypes "github.com/functionx/fx-core/v8/x/evm/types" ) type IncreaseBridgeFeeMethod struct { diff --git a/x/crosschain/precompile/increase_bridgefee_test.go b/x/crosschain/precompile/increase_bridgefee_test.go index bb42af573..1589f6a11 100644 --- a/x/crosschain/precompile/increase_bridgefee_test.go +++ b/x/crosschain/precompile/increase_bridgefee_test.go @@ -15,15 +15,15 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" - "github.com/functionx/fx-core/v7/contract" - "github.com/functionx/fx-core/v7/testutil/helpers" - fxtypes "github.com/functionx/fx-core/v7/types" - bsctypes "github.com/functionx/fx-core/v7/x/bsc/types" - crosschainkeeper "github.com/functionx/fx-core/v7/x/crosschain/keeper" - "github.com/functionx/fx-core/v7/x/crosschain/precompile" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" - "github.com/functionx/fx-core/v7/x/erc20/types" - ethtypes "github.com/functionx/fx-core/v7/x/eth/types" + "github.com/functionx/fx-core/v8/contract" + "github.com/functionx/fx-core/v8/testutil/helpers" + fxtypes "github.com/functionx/fx-core/v8/types" + bsctypes "github.com/functionx/fx-core/v8/x/bsc/types" + crosschainkeeper "github.com/functionx/fx-core/v8/x/crosschain/keeper" + "github.com/functionx/fx-core/v8/x/crosschain/precompile" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/erc20/types" + ethtypes "github.com/functionx/fx-core/v8/x/eth/types" ) func TestIncreaseBridgeFeeABI(t *testing.T) { diff --git a/x/crosschain/precompile/keeper.go b/x/crosschain/precompile/keeper.go index 52cecced5..1dbf29963 100644 --- a/x/crosschain/precompile/keeper.go +++ b/x/crosschain/precompile/keeper.go @@ -14,10 +14,10 @@ import ( "github.com/ethereum/go-ethereum/core/vm" evmtypes "github.com/evmos/ethermint/x/evm/types" - "github.com/functionx/fx-core/v7/contract" - fxtypes "github.com/functionx/fx-core/v7/types" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" - erc20types "github.com/functionx/fx-core/v7/x/erc20/types" + "github.com/functionx/fx-core/v8/contract" + fxtypes "github.com/functionx/fx-core/v8/types" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" + erc20types "github.com/functionx/fx-core/v8/x/erc20/types" ) type Keeper struct { diff --git a/x/crosschain/precompile/router.go b/x/crosschain/precompile/router.go index 4617329b8..3e72f32f0 100644 --- a/x/crosschain/precompile/router.go +++ b/x/crosschain/precompile/router.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - crosschainkeeper "github.com/functionx/fx-core/v7/x/crosschain/keeper" + crosschainkeeper "github.com/functionx/fx-core/v8/x/crosschain/keeper" ) type Router struct { diff --git a/x/crosschain/proposal_legacy.go b/x/crosschain/proposal_legacy.go index 8ce2a2232..88b10fe81 100644 --- a/x/crosschain/proposal_legacy.go +++ b/x/crosschain/proposal_legacy.go @@ -9,8 +9,8 @@ import ( errortypes "github.com/cosmos/cosmos-sdk/types/errors" govv1betal "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" - "github.com/functionx/fx-core/v7/x/crosschain/keeper" - "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/crosschain/keeper" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) // NewCrosschainProposalHandler diff --git a/x/crosschain/service.go b/x/crosschain/service.go index 787545121..5b80e63a1 100644 --- a/x/crosschain/service.go +++ b/x/crosschain/service.go @@ -7,7 +7,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/grpc-ecosystem/grpc-gateway/runtime" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" ) func RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { diff --git a/x/crosschain/types/abi.go b/x/crosschain/types/abi.go index 4a8b64793..f6f98863e 100644 --- a/x/crosschain/types/abi.go +++ b/x/crosschain/types/abi.go @@ -5,7 +5,7 @@ import ( "github.com/ethereum/go-ethereum/common" - "github.com/functionx/fx-core/v7/contract" + "github.com/functionx/fx-core/v8/contract" ) var MemoSendCallTo = common.HexToHash("0000000000000000000000000000000000000000000000000000000000010000") diff --git a/x/crosschain/types/abi_test.go b/x/crosschain/types/abi_test.go index 04c9f700f..283862c45 100644 --- a/x/crosschain/types/abi_test.go +++ b/x/crosschain/types/abi_test.go @@ -8,7 +8,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" - "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) func TestPackBridgeCallback(t *testing.T) { diff --git a/x/crosschain/types/contract.go b/x/crosschain/types/contract.go index 97786e199..a05ae6744 100644 --- a/x/crosschain/types/contract.go +++ b/x/crosschain/types/contract.go @@ -7,7 +7,7 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" - "github.com/functionx/fx-core/v7/contract" + "github.com/functionx/fx-core/v8/contract" ) var ( diff --git a/x/crosschain/types/eth_address.go b/x/crosschain/types/eth_address.go index 437e925e7..108ef7a98 100644 --- a/x/crosschain/types/eth_address.go +++ b/x/crosschain/types/eth_address.go @@ -4,7 +4,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" - "github.com/functionx/fx-core/v7/contract" + "github.com/functionx/fx-core/v8/contract" ) var _ ExternalAddress = EthereumAddress{} diff --git a/x/crosschain/types/eth_signer_test.go b/x/crosschain/types/eth_signer_test.go index 5ec0524a1..2f5941371 100644 --- a/x/crosschain/types/eth_signer_test.go +++ b/x/crosschain/types/eth_signer_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) func TestOracleSetConfirmSig(t *testing.T) { diff --git a/x/crosschain/types/expected_keepers.go b/x/crosschain/types/expected_keepers.go index bb02f528f..a502a2e2f 100644 --- a/x/crosschain/types/expected_keepers.go +++ b/x/crosschain/types/expected_keepers.go @@ -14,8 +14,8 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/evmos/ethermint/x/evm/types" - fxtypes "github.com/functionx/fx-core/v7/types" - erc20types "github.com/functionx/fx-core/v7/x/erc20/types" + fxtypes "github.com/functionx/fx-core/v8/types" + erc20types "github.com/functionx/fx-core/v8/x/erc20/types" ) type StakingKeeper interface { diff --git a/x/crosschain/types/external_address_test.go b/x/crosschain/types/external_address_test.go index e6cdab982..b362eb8c7 100644 --- a/x/crosschain/types/external_address_test.go +++ b/x/crosschain/types/external_address_test.go @@ -5,15 +5,15 @@ import ( "github.com/stretchr/testify/assert" - _ "github.com/functionx/fx-core/v7/app" - arbitrumtypes "github.com/functionx/fx-core/v7/x/arbitrum/types" - avalanchetypes "github.com/functionx/fx-core/v7/x/avalanche/types" - bsctypes "github.com/functionx/fx-core/v7/x/bsc/types" - "github.com/functionx/fx-core/v7/x/crosschain/types" - ethtypes "github.com/functionx/fx-core/v7/x/eth/types" - optimismtypes "github.com/functionx/fx-core/v7/x/optimism/types" - polygontypes "github.com/functionx/fx-core/v7/x/polygon/types" - trontypes "github.com/functionx/fx-core/v7/x/tron/types" + _ "github.com/functionx/fx-core/v8/app" + arbitrumtypes "github.com/functionx/fx-core/v8/x/arbitrum/types" + avalanchetypes "github.com/functionx/fx-core/v8/x/avalanche/types" + bsctypes "github.com/functionx/fx-core/v8/x/bsc/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" + ethtypes "github.com/functionx/fx-core/v8/x/eth/types" + optimismtypes "github.com/functionx/fx-core/v8/x/optimism/types" + polygontypes "github.com/functionx/fx-core/v8/x/polygon/types" + trontypes "github.com/functionx/fx-core/v8/x/tron/types" ) func TestValidateModuleName(t *testing.T) { diff --git a/x/crosschain/types/genesis_test.go b/x/crosschain/types/genesis_test.go index 10b6e9947..f8db98de1 100644 --- a/x/crosschain/types/genesis_test.go +++ b/x/crosschain/types/genesis_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) func TestGenesisStateValidate(t *testing.T) { diff --git a/x/crosschain/types/key_test.go b/x/crosschain/types/key_test.go index 990e3e817..f2471b6cc 100644 --- a/x/crosschain/types/key_test.go +++ b/x/crosschain/types/key_test.go @@ -7,8 +7,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/assert" - "github.com/functionx/fx-core/v7/testutil/helpers" - "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/testutil/helpers" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) func TestGetBatchConfirmKey(t *testing.T) { diff --git a/x/crosschain/types/msgs_test.go b/x/crosschain/types/msgs_test.go index 87e79df20..712ad5355 100644 --- a/x/crosschain/types/msgs_test.go +++ b/x/crosschain/types/msgs_test.go @@ -15,11 +15,11 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - _ "github.com/functionx/fx-core/v7/app" - "github.com/functionx/fx-core/v7/testutil/helpers" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/crosschain/types" - trontypes "github.com/functionx/fx-core/v7/x/tron/types" + _ "github.com/functionx/fx-core/v8/app" + "github.com/functionx/fx-core/v8/testutil/helpers" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" + trontypes "github.com/functionx/fx-core/v8/x/tron/types" ) const ( diff --git a/x/crosschain/types/params.go b/x/crosschain/types/params.go index 9774dabf0..f36eb89d5 100644 --- a/x/crosschain/types/params.go +++ b/x/crosschain/types/params.go @@ -7,7 +7,7 @@ import ( sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - fxtypes "github.com/functionx/fx-core/v7/types" + fxtypes "github.com/functionx/fx-core/v8/types" ) const ( diff --git a/x/crosschain/types/types.go b/x/crosschain/types/types.go index 111587411..a0b3a51cc 100644 --- a/x/crosschain/types/types.go +++ b/x/crosschain/types/types.go @@ -16,8 +16,8 @@ import ( gethcommon "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" - "github.com/functionx/fx-core/v7/contract" - fxtypes "github.com/functionx/fx-core/v7/types" + "github.com/functionx/fx-core/v8/contract" + fxtypes "github.com/functionx/fx-core/v8/types" ) const ( diff --git a/x/crosschain/types/types_test.go b/x/crosschain/types/types_test.go index 7b1a3469b..c2f84face 100644 --- a/x/crosschain/types/types_test.go +++ b/x/crosschain/types/types_test.go @@ -14,7 +14,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) func TestOracleSet_Checkpoint(t *testing.T) { diff --git a/x/erc20/client/cli/query.go b/x/erc20/client/cli/query.go index 32245d462..ead87098c 100644 --- a/x/erc20/client/cli/query.go +++ b/x/erc20/client/cli/query.go @@ -7,7 +7,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/flags" "github.com/spf13/cobra" - "github.com/functionx/fx-core/v7/x/erc20/types" + "github.com/functionx/fx-core/v8/x/erc20/types" ) // GetQueryCmd returns the parent command for all erc20 CLI query commands. diff --git a/x/erc20/client/cli/tx.go b/x/erc20/client/cli/tx.go index 04ebdd0e4..b22cbf0b2 100644 --- a/x/erc20/client/cli/tx.go +++ b/x/erc20/client/cli/tx.go @@ -11,8 +11,8 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/spf13/cobra" - "github.com/functionx/fx-core/v7/contract" - "github.com/functionx/fx-core/v7/x/erc20/types" + "github.com/functionx/fx-core/v8/contract" + "github.com/functionx/fx-core/v8/x/erc20/types" ) // NewTxCmd returns a root CLI command handler for certain modules/erc20 transaction commands. diff --git a/x/erc20/client/cli/tx_proposal.go b/x/erc20/client/cli/tx_proposal.go index 8395e8f0a..78914e6cd 100644 --- a/x/erc20/client/cli/tx_proposal.go +++ b/x/erc20/client/cli/tx_proposal.go @@ -16,7 +16,7 @@ import ( "google.golang.org/grpc/codes" grpcstatus "google.golang.org/grpc/status" - "github.com/functionx/fx-core/v7/x/erc20/types" + "github.com/functionx/fx-core/v8/x/erc20/types" ) // NewLegacyRegisterCoinProposalCmd implements the command to submit a register-coin proposal diff --git a/x/erc20/client/proposal_handler.go b/x/erc20/client/proposal_handler.go index 1cc6ce229..c08448289 100644 --- a/x/erc20/client/proposal_handler.go +++ b/x/erc20/client/proposal_handler.go @@ -3,7 +3,7 @@ package client import ( govclient "github.com/cosmos/cosmos-sdk/x/gov/client" - "github.com/functionx/fx-core/v7/x/erc20/client/cli" + "github.com/functionx/fx-core/v8/x/erc20/client/cli" ) var ( diff --git a/x/erc20/keeper/evm.go b/x/erc20/keeper/evm.go index 46b41db5d..3a01c4293 100644 --- a/x/erc20/keeper/evm.go +++ b/x/erc20/keeper/evm.go @@ -9,9 +9,9 @@ import ( "github.com/ethereum/go-ethereum/crypto" evmtypes "github.com/evmos/ethermint/x/evm/types" - "github.com/functionx/fx-core/v7/contract" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/erc20/types" + "github.com/functionx/fx-core/v8/contract" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/erc20/types" ) // QueryERC20 returns the data of a deployed ERC20 contract diff --git a/x/erc20/keeper/evm_test.go b/x/erc20/keeper/evm_test.go index 5840a4a8b..4822e2041 100644 --- a/x/erc20/keeper/evm_test.go +++ b/x/erc20/keeper/evm_test.go @@ -3,7 +3,7 @@ package keeper_test import ( "github.com/ethereum/go-ethereum/common" - "github.com/functionx/fx-core/v7/x/erc20/types" + "github.com/functionx/fx-core/v8/x/erc20/types" ) func (suite *KeeperTestSuite) TestQueryERC20() { diff --git a/x/erc20/keeper/genesis.go b/x/erc20/keeper/genesis.go index 23eac294c..c54e8d297 100644 --- a/x/erc20/keeper/genesis.go +++ b/x/erc20/keeper/genesis.go @@ -5,8 +5,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/erc20/types" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/erc20/types" ) // InitGenesis import module genesis diff --git a/x/erc20/keeper/grpc_query.go b/x/erc20/keeper/grpc_query.go index fe938af25..26b900766 100644 --- a/x/erc20/keeper/grpc_query.go +++ b/x/erc20/keeper/grpc_query.go @@ -9,8 +9,8 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "github.com/functionx/fx-core/v7/contract" - "github.com/functionx/fx-core/v7/x/erc20/types" + "github.com/functionx/fx-core/v8/contract" + "github.com/functionx/fx-core/v8/x/erc20/types" ) var _ types.QueryServer = Keeper{} diff --git a/x/erc20/keeper/grpc_query_test.go b/x/erc20/keeper/grpc_query_test.go index 33004e26f..d289be1d3 100644 --- a/x/erc20/keeper/grpc_query_test.go +++ b/x/erc20/keeper/grpc_query_test.go @@ -7,9 +7,9 @@ import ( "github.com/cosmos/cosmos-sdk/types/query" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/functionx/fx-core/v7/testutil/helpers" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/erc20/types" + "github.com/functionx/fx-core/v8/testutil/helpers" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/erc20/types" ) func (suite *KeeperTestSuite) TestQueryParams() { diff --git a/x/erc20/keeper/keeper.go b/x/erc20/keeper/keeper.go index b8946ae6d..8a1211531 100644 --- a/x/erc20/keeper/keeper.go +++ b/x/erc20/keeper/keeper.go @@ -11,9 +11,9 @@ import ( banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/ethereum/go-ethereum/common" - "github.com/functionx/fx-core/v7/contract" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" - "github.com/functionx/fx-core/v7/x/erc20/types" + "github.com/functionx/fx-core/v8/contract" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/erc20/types" ) // Keeper of this module maintains collections of erc20. diff --git a/x/erc20/keeper/keeper_test.go b/x/erc20/keeper/keeper_test.go index 593fbb504..0ccd2088f 100644 --- a/x/erc20/keeper/keeper_test.go +++ b/x/erc20/keeper/keeper_test.go @@ -38,14 +38,14 @@ import ( "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" - "github.com/functionx/fx-core/v7/app" - "github.com/functionx/fx-core/v7/contract" - "github.com/functionx/fx-core/v7/testutil/helpers" - fxtypes "github.com/functionx/fx-core/v7/types" - bsctypes "github.com/functionx/fx-core/v7/x/bsc/types" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" - "github.com/functionx/fx-core/v7/x/erc20/types" - ethtypes "github.com/functionx/fx-core/v7/x/eth/types" + "github.com/functionx/fx-core/v8/app" + "github.com/functionx/fx-core/v8/contract" + "github.com/functionx/fx-core/v8/testutil/helpers" + fxtypes "github.com/functionx/fx-core/v8/types" + bsctypes "github.com/functionx/fx-core/v8/x/bsc/types" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/erc20/types" + ethtypes "github.com/functionx/fx-core/v8/x/eth/types" ) type KeeperTestSuite struct { diff --git a/x/erc20/keeper/mint.go b/x/erc20/keeper/mint.go index ad19a9181..124ebc0be 100644 --- a/x/erc20/keeper/mint.go +++ b/x/erc20/keeper/mint.go @@ -6,7 +6,7 @@ import ( errortypes "github.com/cosmos/cosmos-sdk/types/errors" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/functionx/fx-core/v7/x/erc20/types" + "github.com/functionx/fx-core/v8/x/erc20/types" ) // MintingEnabled checks that: diff --git a/x/erc20/keeper/mint_test.go b/x/erc20/keeper/mint_test.go index 1766c606e..1ee672b6b 100644 --- a/x/erc20/keeper/mint_test.go +++ b/x/erc20/keeper/mint_test.go @@ -3,8 +3,8 @@ package keeper_test import ( "fmt" - "github.com/functionx/fx-core/v7/testutil/helpers" - "github.com/functionx/fx-core/v7/x/erc20/types" + "github.com/functionx/fx-core/v8/testutil/helpers" + "github.com/functionx/fx-core/v8/x/erc20/types" ) func (suite *KeeperTestSuite) TestMintingEnabled() { diff --git a/x/erc20/keeper/msg_server.go b/x/erc20/keeper/msg_server.go index 2a4a2c33a..ad00a8d09 100644 --- a/x/erc20/keeper/msg_server.go +++ b/x/erc20/keeper/msg_server.go @@ -17,9 +17,9 @@ import ( "github.com/ethereum/go-ethereum/common" "golang.org/x/exp/slices" - "github.com/functionx/fx-core/v7/contract" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/erc20/types" + "github.com/functionx/fx-core/v8/contract" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/erc20/types" ) var _ types.MsgServer = &Keeper{} @@ -190,16 +190,16 @@ func (k Keeper) ConvertCoinNativeCoin(ctx sdk.Context, pair types.TokenPair, sen } erc20 := contract.GetFIP20().ABI - contract := pair.GetERC20Contract() + erc20Contract := pair.GetERC20Contract() // Mint Tokens and send to receiver - _, err := k.evmKeeper.ApplyContract(ctx, k.moduleAddress, contract, nil, erc20, "mint", receiver, coin.Amount.BigInt()) + _, err := k.evmKeeper.ApplyContract(ctx, k.moduleAddress, erc20Contract, nil, erc20, "mint", receiver, coin.Amount.BigInt()) if err != nil { return err } if pair.Denom == fxtypes.DefaultDenom { - if err := k.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, contract.Bytes(), coins); err != nil { + if err := k.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, erc20Contract.Bytes(), coins); err != nil { return errorsmod.Wrap(err, "failed to transfer escrow coins to origin denom") } } @@ -213,10 +213,10 @@ func (k Keeper) ConvertCoinNativeCoin(ctx sdk.Context, pair types.TokenPair, sen // - Check if token balance decreased by amount func (k Keeper) ConvertERC20NativeCoin(ctx sdk.Context, pair types.TokenPair, sender common.Address, receiver sdk.AccAddress, amount sdkmath.Int) error { erc20 := contract.GetFIP20().ABI - contract := pair.GetERC20Contract() + erc20Contract := pair.GetERC20Contract() // Burn escrowed tokens - _, err := k.evmKeeper.ApplyContract(ctx, k.moduleAddress, contract, nil, erc20, "burn", sender, amount.BigInt()) + _, err := k.evmKeeper.ApplyContract(ctx, k.moduleAddress, erc20Contract, nil, erc20, "burn", sender, amount.BigInt()) if err != nil { return err } @@ -226,7 +226,7 @@ func (k Keeper) ConvertERC20NativeCoin(ctx sdk.Context, pair types.TokenPair, se // Transfer origin denom to module if pair.Denom == fxtypes.DefaultDenom { - if err := k.bankKeeper.SendCoinsFromAccountToModule(ctx, contract.Bytes(), types.ModuleName, coins); err != nil { + if err := k.bankKeeper.SendCoinsFromAccountToModule(ctx, erc20Contract.Bytes(), types.ModuleName, coins); err != nil { return errorsmod.Wrap(err, "failed to transfer origin denom to module") } } @@ -249,8 +249,8 @@ func (k Keeper) ConvertERC20NativeToken(ctx sdk.Context, pair types.TokenPair, s erc20 := contract.GetFIP20().ABI // Escrow tokens on module account - contract := pair.GetERC20Contract() - res, err := k.evmKeeper.ApplyContract(ctx, sender, contract, nil, erc20, "transfer", k.moduleAddress, amount.BigInt()) + erc20Contract := pair.GetERC20Contract() + res, err := k.evmKeeper.ApplyContract(ctx, sender, erc20Contract, nil, erc20, "transfer", k.moduleAddress, amount.BigInt()) if err != nil { return err } @@ -301,10 +301,10 @@ func (k Keeper) ConvertCoinNativeERC20(ctx sdk.Context, pair types.TokenPair, se } erc20 := contract.GetFIP20().ABI - contract := pair.GetERC20Contract() + erc20Contract := pair.GetERC20Contract() // Unescrow Tokens and send to receiver - res, err := k.evmKeeper.ApplyContract(ctx, k.moduleAddress, contract, nil, erc20, "transfer", receiver, coin.Amount.BigInt()) + res, err := k.evmKeeper.ApplyContract(ctx, k.moduleAddress, erc20Contract, nil, erc20, "transfer", receiver, coin.Amount.BigInt()) if err != nil { return err } diff --git a/x/erc20/keeper/msg_server_test.go b/x/erc20/keeper/msg_server_test.go index 2a8e25168..ba5fe9a29 100644 --- a/x/erc20/keeper/msg_server_test.go +++ b/x/erc20/keeper/msg_server_test.go @@ -13,12 +13,12 @@ import ( ibcchanneltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" "github.com/ethereum/go-ethereum/common" - "github.com/functionx/fx-core/v7/testutil/helpers" - fxtypes "github.com/functionx/fx-core/v7/types" - bsctypes "github.com/functionx/fx-core/v7/x/bsc/types" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" - "github.com/functionx/fx-core/v7/x/erc20/types" - ethtypes "github.com/functionx/fx-core/v7/x/eth/types" + "github.com/functionx/fx-core/v8/testutil/helpers" + fxtypes "github.com/functionx/fx-core/v8/types" + bsctypes "github.com/functionx/fx-core/v8/x/bsc/types" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/erc20/types" + ethtypes "github.com/functionx/fx-core/v8/x/eth/types" ) func (suite *KeeperTestSuite) TestConvertCoinNativeCoin() { diff --git a/x/erc20/keeper/params.go b/x/erc20/keeper/params.go index 543e3da73..892167869 100644 --- a/x/erc20/keeper/params.go +++ b/x/erc20/keeper/params.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/functionx/fx-core/v7/x/erc20/types" + "github.com/functionx/fx-core/v8/x/erc20/types" ) // GetParams returns the total set of erc20 parameters. diff --git a/x/erc20/keeper/params_test.go b/x/erc20/keeper/params_test.go index bc6b79559..5d4d7b85d 100644 --- a/x/erc20/keeper/params_test.go +++ b/x/erc20/keeper/params_test.go @@ -3,7 +3,7 @@ package keeper_test import ( "time" - "github.com/functionx/fx-core/v7/x/erc20/types" + "github.com/functionx/fx-core/v8/x/erc20/types" ) func (suite *KeeperTestSuite) TestParams() { diff --git a/x/erc20/keeper/proposals.go b/x/erc20/keeper/proposals.go index 6d6cd90f0..d58439f5e 100644 --- a/x/erc20/keeper/proposals.go +++ b/x/erc20/keeper/proposals.go @@ -9,8 +9,8 @@ import ( banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/ethereum/go-ethereum/common" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/erc20/types" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/erc20/types" ) // RegisterNativeCoin deploys an erc20 contract and creates the token pair for the existing cosmos coin diff --git a/x/erc20/keeper/proposals_test.go b/x/erc20/keeper/proposals_test.go index 919518f17..b0674c7af 100644 --- a/x/erc20/keeper/proposals_test.go +++ b/x/erc20/keeper/proposals_test.go @@ -13,12 +13,12 @@ import ( "github.com/ethereum/go-ethereum/crypto" "golang.org/x/exp/slices" - "github.com/functionx/fx-core/v7/contract" - "github.com/functionx/fx-core/v7/testutil/helpers" - fxtypes "github.com/functionx/fx-core/v7/types" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" - "github.com/functionx/fx-core/v7/x/erc20/types" - ethtypes "github.com/functionx/fx-core/v7/x/eth/types" + "github.com/functionx/fx-core/v8/contract" + "github.com/functionx/fx-core/v8/testutil/helpers" + fxtypes "github.com/functionx/fx-core/v8/types" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/erc20/types" + ethtypes "github.com/functionx/fx-core/v8/x/eth/types" ) func (suite *KeeperTestSuite) setupRegisterERC20Pair() common.Address { diff --git a/x/erc20/keeper/token_pairs.go b/x/erc20/keeper/token_pairs.go index 0a92fe0fe..fd43f3321 100644 --- a/x/erc20/keeper/token_pairs.go +++ b/x/erc20/keeper/token_pairs.go @@ -7,9 +7,9 @@ import ( ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" "github.com/ethereum/go-ethereum/common" - fxtypes "github.com/functionx/fx-core/v7/types" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" - "github.com/functionx/fx-core/v7/x/erc20/types" + fxtypes "github.com/functionx/fx-core/v8/types" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/erc20/types" ) // GetAllTokenPairs - get all registered token tokenPairs diff --git a/x/erc20/keeper/token_pairs_test.go b/x/erc20/keeper/token_pairs_test.go index 8152ba9f1..2d2dcce73 100644 --- a/x/erc20/keeper/token_pairs_test.go +++ b/x/erc20/keeper/token_pairs_test.go @@ -3,9 +3,9 @@ package keeper_test import ( "github.com/ethereum/go-ethereum/common" - "github.com/functionx/fx-core/v7/testutil/helpers" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/erc20/types" + "github.com/functionx/fx-core/v8/testutil/helpers" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/erc20/types" ) func (suite *KeeperTestSuite) TestGetTokenPair() { diff --git a/x/erc20/keeper/transfer_relation.go b/x/erc20/keeper/transfer_relation.go index d90b73e31..e3e5a2408 100644 --- a/x/erc20/keeper/transfer_relation.go +++ b/x/erc20/keeper/transfer_relation.go @@ -4,7 +4,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" - "github.com/functionx/fx-core/v7/x/erc20/types" + "github.com/functionx/fx-core/v8/x/erc20/types" ) func (k Keeper) RefundAfter(ctx sdk.Context, channel string, sequence uint64, sender sdk.AccAddress, amount sdk.Coin) { diff --git a/x/erc20/module.go b/x/erc20/module.go index ec3bd7e62..e9dd5c571 100644 --- a/x/erc20/module.go +++ b/x/erc20/module.go @@ -14,9 +14,9 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - "github.com/functionx/fx-core/v7/x/erc20/client/cli" - "github.com/functionx/fx-core/v7/x/erc20/keeper" - "github.com/functionx/fx-core/v7/x/erc20/types" + "github.com/functionx/fx-core/v8/x/erc20/client/cli" + "github.com/functionx/fx-core/v8/x/erc20/keeper" + "github.com/functionx/fx-core/v8/x/erc20/types" ) // type check to ensure the interface is properly implemented diff --git a/x/erc20/proposal.go b/x/erc20/proposal.go index 546908217..05c25591c 100644 --- a/x/erc20/proposal.go +++ b/x/erc20/proposal.go @@ -8,8 +8,8 @@ import ( govv1betal "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/ethereum/go-ethereum/common" - "github.com/functionx/fx-core/v7/x/erc20/keeper" - "github.com/functionx/fx-core/v7/x/erc20/types" + "github.com/functionx/fx-core/v8/x/erc20/keeper" + "github.com/functionx/fx-core/v8/x/erc20/types" ) // NewErc20ProposalHandler creates a governance handler to manage new proposal types. diff --git a/x/erc20/types/erc20_data_test.go b/x/erc20/types/erc20_data_test.go index 5a27c239d..76fde27c0 100644 --- a/x/erc20/types/erc20_data_test.go +++ b/x/erc20/types/erc20_data_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/functionx/fx-core/v7/x/erc20/types" + "github.com/functionx/fx-core/v8/x/erc20/types" ) func TestNewERC20Data(t *testing.T) { diff --git a/x/erc20/types/genesis_test.go b/x/erc20/types/genesis_test.go index 3cf91b7c4..d5e8546e1 100644 --- a/x/erc20/types/genesis_test.go +++ b/x/erc20/types/genesis_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/functionx/fx-core/v7/x/erc20/types" + "github.com/functionx/fx-core/v8/x/erc20/types" ) func TestValidateGenesis(t *testing.T) { diff --git a/x/erc20/types/msg.go b/x/erc20/types/msg.go index 391d89b8f..be4a6a8d3 100644 --- a/x/erc20/types/msg.go +++ b/x/erc20/types/msg.go @@ -11,8 +11,8 @@ import ( ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" "github.com/ethereum/go-ethereum/common" - "github.com/functionx/fx-core/v7/contract" - fxtypes "github.com/functionx/fx-core/v7/types" + "github.com/functionx/fx-core/v8/contract" + fxtypes "github.com/functionx/fx-core/v8/types" ) var ( diff --git a/x/erc20/types/msg_test.go b/x/erc20/types/msg_test.go index 4e5e01d3c..ed9ed84fd 100644 --- a/x/erc20/types/msg_test.go +++ b/x/erc20/types/msg_test.go @@ -8,8 +8,8 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/suite" - "github.com/functionx/fx-core/v7/testutil/helpers" - "github.com/functionx/fx-core/v7/x/erc20/types" + "github.com/functionx/fx-core/v8/testutil/helpers" + "github.com/functionx/fx-core/v8/x/erc20/types" ) type MsgsTestSuite struct { diff --git a/x/erc20/types/proposal.go b/x/erc20/types/proposal.go index 8eb3282ed..1ad67d600 100644 --- a/x/erc20/types/proposal.go +++ b/x/erc20/types/proposal.go @@ -10,8 +10,8 @@ import ( govv1betal "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" - "github.com/functionx/fx-core/v7/contract" - fxtypes "github.com/functionx/fx-core/v7/types" + "github.com/functionx/fx-core/v8/contract" + fxtypes "github.com/functionx/fx-core/v8/types" ) // constants diff --git a/x/erc20/types/proposal_test.go b/x/erc20/types/proposal_test.go index ff28efb1c..16161cabd 100644 --- a/x/erc20/types/proposal_test.go +++ b/x/erc20/types/proposal_test.go @@ -8,8 +8,8 @@ import ( govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/stretchr/testify/suite" - "github.com/functionx/fx-core/v7/testutil/helpers" - "github.com/functionx/fx-core/v7/x/erc20/types" + "github.com/functionx/fx-core/v8/testutil/helpers" + "github.com/functionx/fx-core/v8/x/erc20/types" ) type ProposalTestSuite struct { diff --git a/x/erc20/types/token_pair.go b/x/erc20/types/token_pair.go index 95a30ecc7..ad846a96c 100644 --- a/x/erc20/types/token_pair.go +++ b/x/erc20/types/token_pair.go @@ -7,7 +7,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" - "github.com/functionx/fx-core/v7/contract" + "github.com/functionx/fx-core/v8/contract" ) // NewTokenPair returns an instance of TokenPair diff --git a/x/erc20/types/token_pair_test.go b/x/erc20/types/token_pair_test.go index 7ca925373..f6b6b2477 100644 --- a/x/erc20/types/token_pair_test.go +++ b/x/erc20/types/token_pair_test.go @@ -6,7 +6,7 @@ import ( "github.com/cometbft/cometbft/crypto/tmhash" - "github.com/functionx/fx-core/v7/x/erc20/types" + "github.com/functionx/fx-core/v8/x/erc20/types" ) func TestTokenPair_GetID(t *testing.T) { diff --git a/x/eth/module.go b/x/eth/module.go index dd63054a6..f467e0a33 100644 --- a/x/eth/module.go +++ b/x/eth/module.go @@ -13,10 +13,10 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - crosschaincli "github.com/functionx/fx-core/v7/x/crosschain/client/cli" - crosschainkeeper "github.com/functionx/fx-core/v7/x/crosschain/keeper" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" - "github.com/functionx/fx-core/v7/x/eth/types" + crosschaincli "github.com/functionx/fx-core/v8/x/crosschain/client/cli" + crosschainkeeper "github.com/functionx/fx-core/v8/x/crosschain/keeper" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/eth/types" ) // type check to ensure the interface is properly implemented diff --git a/x/eth/types/genesis.go b/x/eth/types/genesis.go index 7f9ac4c52..19761d04b 100644 --- a/x/eth/types/genesis.go +++ b/x/eth/types/genesis.go @@ -1,7 +1,7 @@ package types import ( - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" ) func DefaultGenesisState() *crosschaintypes.GenesisState { diff --git a/x/eth/types/key.go b/x/eth/types/key.go index 751d26c4c..efe7b384f 100644 --- a/x/eth/types/key.go +++ b/x/eth/types/key.go @@ -1,6 +1,6 @@ package types -import crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" +import crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" const ( // ModuleName is the name of the module diff --git a/x/evm/keeper/contract_code.go b/x/evm/keeper/contract_code.go index a737de971..18cf214a6 100644 --- a/x/evm/keeper/contract_code.go +++ b/x/evm/keeper/contract_code.go @@ -14,8 +14,8 @@ import ( "github.com/evmos/ethermint/x/evm/statedb" evmtypes "github.com/evmos/ethermint/x/evm/types" - "github.com/functionx/fx-core/v7/contract" - "github.com/functionx/fx-core/v7/x/evm/types" + "github.com/functionx/fx-core/v8/contract" + "github.com/functionx/fx-core/v8/x/evm/types" ) // CreateContractWithCode create contract account and set code diff --git a/x/evm/keeper/contract_code_test.go b/x/evm/keeper/contract_code_test.go index d6b7b852e..20c63c1ee 100644 --- a/x/evm/keeper/contract_code_test.go +++ b/x/evm/keeper/contract_code_test.go @@ -6,8 +6,8 @@ import ( "github.com/ethereum/go-ethereum/common" evmtypes "github.com/evmos/ethermint/x/evm/types" - "github.com/functionx/fx-core/v7/contract" - "github.com/functionx/fx-core/v7/testutil/helpers" + "github.com/functionx/fx-core/v8/contract" + "github.com/functionx/fx-core/v8/testutil/helpers" ) func (s *KeeperTestSuite) TestKeeper_ContractCode() { diff --git a/x/evm/keeper/genesis.go b/x/evm/keeper/genesis.go index 88c5d1c5e..b852d3d6b 100644 --- a/x/evm/keeper/genesis.go +++ b/x/evm/keeper/genesis.go @@ -6,7 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/evmos/ethermint/x/evm/types" - "github.com/functionx/fx-core/v7/contract" + "github.com/functionx/fx-core/v8/contract" ) // InitGenesis initializes genesis state based on exported genesis diff --git a/x/evm/keeper/keeper.go b/x/evm/keeper/keeper.go index 42aea15b6..71c495b02 100644 --- a/x/evm/keeper/keeper.go +++ b/x/evm/keeper/keeper.go @@ -18,9 +18,9 @@ import ( evmkeeper "github.com/evmos/ethermint/x/evm/keeper" "github.com/evmos/ethermint/x/evm/types" - fxcontract "github.com/functionx/fx-core/v7/contract" - fxtypes "github.com/functionx/fx-core/v7/types" - fxevmtypes "github.com/functionx/fx-core/v7/x/evm/types" + fxcontract "github.com/functionx/fx-core/v8/contract" + fxtypes "github.com/functionx/fx-core/v8/types" + fxevmtypes "github.com/functionx/fx-core/v8/x/evm/types" ) type Keeper struct { diff --git a/x/evm/keeper/keeper_test.go b/x/evm/keeper/keeper_test.go index 637be8b25..6f9bc1705 100644 --- a/x/evm/keeper/keeper_test.go +++ b/x/evm/keeper/keeper_test.go @@ -11,9 +11,9 @@ import ( evmtypes "github.com/evmos/ethermint/x/evm/types" "github.com/stretchr/testify/suite" - "github.com/functionx/fx-core/v7/testutil/helpers" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/evm/testutil" + "github.com/functionx/fx-core/v8/testutil/helpers" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/evm/testutil" ) type KeeperTestSuite struct { diff --git a/x/evm/keeper/msg_server.go b/x/evm/keeper/msg_server.go index 724787afc..c6c1fc5d3 100644 --- a/x/evm/keeper/msg_server.go +++ b/x/evm/keeper/msg_server.go @@ -10,7 +10,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/evmos/ethermint/x/evm/types" - fxevmtypes "github.com/functionx/fx-core/v7/x/evm/types" + fxevmtypes "github.com/functionx/fx-core/v8/x/evm/types" ) var _ types.MsgServer = &Keeper{} diff --git a/x/evm/keeper/msg_server_test.go b/x/evm/keeper/msg_server_test.go index 240957c33..084c1e7e8 100644 --- a/x/evm/keeper/msg_server_test.go +++ b/x/evm/keeper/msg_server_test.go @@ -9,8 +9,8 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/evmos/ethermint/x/evm/types" - "github.com/functionx/fx-core/v7/testutil/helpers" - fxtypes "github.com/functionx/fx-core/v7/types" + "github.com/functionx/fx-core/v8/testutil/helpers" + fxtypes "github.com/functionx/fx-core/v8/types" ) func (s *KeeperTestSuite) TestKeeper_EthereumTx_Data() { diff --git a/x/evm/keeper/statedb_test.go b/x/evm/keeper/statedb_test.go index ada2ddbd3..80bb79763 100644 --- a/x/evm/keeper/statedb_test.go +++ b/x/evm/keeper/statedb_test.go @@ -4,7 +4,7 @@ import ( "github.com/ethereum/go-ethereum/common" ethermint "github.com/evmos/ethermint/types" - "github.com/functionx/fx-core/v7/testutil/helpers" + "github.com/functionx/fx-core/v8/testutil/helpers" ) func (s *KeeperTestSuite) TestKeeper_SetAccount() { diff --git a/x/evm/module.go b/x/evm/module.go index 724639476..5fa85387f 100644 --- a/x/evm/module.go +++ b/x/evm/module.go @@ -15,9 +15,9 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/evm/keeper" - fxevmtypes "github.com/functionx/fx-core/v7/x/evm/types" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/evm/keeper" + fxevmtypes "github.com/functionx/fx-core/v8/x/evm/types" ) var ( @@ -94,7 +94,7 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { } // BeginBlock returns the begin block for the evm module. -func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) { +func (am AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) { // not reset chain-id on the begin-block } diff --git a/x/evm/testutil/erc20.go b/x/evm/testutil/erc20.go index 9898801a4..f6270772e 100644 --- a/x/evm/testutil/erc20.go +++ b/x/evm/testutil/erc20.go @@ -8,8 +8,8 @@ import ( "github.com/ethereum/go-ethereum/crypto" evmtypes "github.com/evmos/ethermint/x/evm/types" - "github.com/functionx/fx-core/v7/contract" - "github.com/functionx/fx-core/v7/testutil/helpers" + "github.com/functionx/fx-core/v8/contract" + "github.com/functionx/fx-core/v8/testutil/helpers" ) type ERC20Suite struct { diff --git a/x/evm/testutil/evm.go b/x/evm/testutil/evm.go index 05d3a96bb..8cab3cc25 100644 --- a/x/evm/testutil/evm.go +++ b/x/evm/testutil/evm.go @@ -12,12 +12,12 @@ import ( evmtypes "github.com/evmos/ethermint/x/evm/types" "github.com/stretchr/testify/require" - "github.com/functionx/fx-core/v7/contract" - "github.com/functionx/fx-core/v7/testutil/helpers" - fxtypes "github.com/functionx/fx-core/v7/types" - erc20types "github.com/functionx/fx-core/v7/x/erc20/types" - fxevmkeeper "github.com/functionx/fx-core/v7/x/evm/keeper" - fxevmtypes "github.com/functionx/fx-core/v7/x/evm/types" + "github.com/functionx/fx-core/v8/contract" + "github.com/functionx/fx-core/v8/testutil/helpers" + fxtypes "github.com/functionx/fx-core/v8/types" + erc20types "github.com/functionx/fx-core/v8/x/erc20/types" + fxevmkeeper "github.com/functionx/fx-core/v8/x/evm/keeper" + fxevmtypes "github.com/functionx/fx-core/v8/x/evm/types" ) type EVMSuite struct { diff --git a/x/evm/types/codec.go b/x/evm/types/codec.go index 7a264f585..c42513b5f 100644 --- a/x/evm/types/codec.go +++ b/x/evm/types/codec.go @@ -8,7 +8,7 @@ import ( authzcodec "github.com/cosmos/cosmos-sdk/x/authz/codec" govv1betal "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" - "github.com/functionx/fx-core/v7/x/evm/legacy" + "github.com/functionx/fx-core/v8/x/evm/legacy" ) var ModuleCdc = codec.NewAminoCodec(codec.NewLegacyAmino()) diff --git a/x/evm/types/errors.go b/x/evm/types/errors.go index 59d9d2447..2ff2a91ad 100644 --- a/x/evm/types/errors.go +++ b/x/evm/types/errors.go @@ -1,14 +1,11 @@ package types import ( - "errors" - "fmt" - errorsmod "cosmossdk.io/errors" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/evmos/ethermint/x/evm/types" - "github.com/functionx/fx-core/v7/contract" + "github.com/functionx/fx-core/v8/contract" ) const ( @@ -26,21 +23,6 @@ func PackRetError(err error) ([]byte, error) { return pack, err } -func UnpackRetError(ret []byte) (string, error) { - unpack, err := abi.Arguments{{Type: contract.TypeString}}.Unpack(ret) - if err != nil { - return "", err - } - if len(unpack) != 1 { - return "", errors.New("unpack ret error") - } - errStr, ok := unpack[0].(string) - if !ok { - return "", fmt.Errorf("unpack ret type error %T", unpack[0]) - } - return errStr, nil -} - func PackRetErrV2(err error) ([]byte, error) { pack, _ := contract.GetErrorABI().Pack("Error", err.Error()) return pack, err diff --git a/x/evm/types/msg.go b/x/evm/types/msg.go index 4d3aa5604..6498a4e71 100644 --- a/x/evm/types/msg.go +++ b/x/evm/types/msg.go @@ -6,7 +6,7 @@ import ( errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/functionx/fx-core/v7/contract" + "github.com/functionx/fx-core/v8/contract" ) var _ sdk.Msg = &MsgCallContract{} diff --git a/x/gov/client/cli/query.go b/x/gov/client/cli/query.go index db1a99589..35d232d4a 100644 --- a/x/gov/client/cli/query.go +++ b/x/gov/client/cli/query.go @@ -11,7 +11,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/spf13/cobra" - fxgovtypes "github.com/functionx/fx-core/v7/x/gov/types" + fxgovtypes "github.com/functionx/fx-core/v8/x/gov/types" ) // GetQueryCmd returns the cli query commands for this module diff --git a/x/gov/client/cli/query_test.go b/x/gov/client/cli/query_test.go index 92dadae4e..b29ce9aaf 100644 --- a/x/gov/client/cli/query_test.go +++ b/x/gov/client/cli/query_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/functionx/fx-core/v7/x/gov/client/cli" + "github.com/functionx/fx-core/v8/x/gov/client/cli" ) func TestCmdParams(t *testing.T) { diff --git a/x/gov/keeper/abci.go b/x/gov/keeper/abci.go index 1c282bd27..50c96f111 100644 --- a/x/gov/keeper/abci.go +++ b/x/gov/keeper/abci.go @@ -9,7 +9,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/gov/types" govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" - fxgovtypes "github.com/functionx/fx-core/v7/x/gov/types" + fxgovtypes "github.com/functionx/fx-core/v8/x/gov/types" ) // EndBlocker called every block, process inflation, update validator set. diff --git a/x/gov/keeper/grpc_query.go b/x/gov/keeper/grpc_query.go index f4aedcefc..9c4de8063 100644 --- a/x/gov/keeper/grpc_query.go +++ b/x/gov/keeper/grpc_query.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/functionx/fx-core/v7/x/gov/types" + "github.com/functionx/fx-core/v8/x/gov/types" ) var _ types.QueryServer = Keeper{} diff --git a/x/gov/keeper/grpc_query_test.go b/x/gov/keeper/grpc_query_test.go index ceff1f5f1..d6dde7213 100644 --- a/x/gov/keeper/grpc_query_test.go +++ b/x/gov/keeper/grpc_query_test.go @@ -4,9 +4,9 @@ import ( sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - fxtypes "github.com/functionx/fx-core/v7/types" - erc20types "github.com/functionx/fx-core/v7/x/erc20/types" - govtypes "github.com/functionx/fx-core/v7/x/gov/types" + fxtypes "github.com/functionx/fx-core/v8/types" + erc20types "github.com/functionx/fx-core/v8/x/erc20/types" + govtypes "github.com/functionx/fx-core/v8/x/gov/types" ) func (suite *KeeperTestSuite) TestGRPCQueryParams() { diff --git a/x/gov/keeper/keeper.go b/x/gov/keeper/keeper.go index af3a0fbf2..0d673e8fd 100644 --- a/x/gov/keeper/keeper.go +++ b/x/gov/keeper/keeper.go @@ -16,8 +16,8 @@ import ( govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" "github.com/ethereum/go-ethereum/common" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/gov/types" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/gov/types" ) type Keeper struct { diff --git a/x/gov/keeper/keeper_test.go b/x/gov/keeper/keeper_test.go index 3d40e209a..63d8a503f 100644 --- a/x/gov/keeper/keeper_test.go +++ b/x/gov/keeper/keeper_test.go @@ -21,14 +21,14 @@ import ( "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" - "github.com/functionx/fx-core/v7/app" - "github.com/functionx/fx-core/v7/testutil/helpers" - fxtypes "github.com/functionx/fx-core/v7/types" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" - erc20types "github.com/functionx/fx-core/v7/x/erc20/types" - evmtypes "github.com/functionx/fx-core/v7/x/evm/types" - "github.com/functionx/fx-core/v7/x/gov/keeper" - "github.com/functionx/fx-core/v7/x/gov/types" + "github.com/functionx/fx-core/v8/app" + "github.com/functionx/fx-core/v8/testutil/helpers" + fxtypes "github.com/functionx/fx-core/v8/types" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" + erc20types "github.com/functionx/fx-core/v8/x/erc20/types" + evmtypes "github.com/functionx/fx-core/v8/x/evm/types" + "github.com/functionx/fx-core/v8/x/gov/keeper" + "github.com/functionx/fx-core/v8/x/gov/types" ) type KeeperTestSuite struct { diff --git a/x/gov/keeper/migrations.go b/x/gov/keeper/migrations.go index f0cd170ac..08d105618 100644 --- a/x/gov/keeper/migrations.go +++ b/x/gov/keeper/migrations.go @@ -5,7 +5,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/gov/exported" govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" - v4 "github.com/functionx/fx-core/v7/x/gov/migrations/v4" + v4 "github.com/functionx/fx-core/v8/x/gov/migrations/v4" ) // Migrator is a struct for handling in-place store migrations. diff --git a/x/gov/keeper/msg_server.go b/x/gov/keeper/msg_server.go index 93fd155c6..95a05ef1e 100644 --- a/x/gov/keeper/msg_server.go +++ b/x/gov/keeper/msg_server.go @@ -16,7 +16,7 @@ import ( govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/cosmos/cosmos-sdk/x/gov/types/v1" - "github.com/functionx/fx-core/v7/x/gov/types" + "github.com/functionx/fx-core/v8/x/gov/types" ) type msgServer struct { diff --git a/x/gov/keeper/msg_server_test.go b/x/gov/keeper/msg_server_test.go index a34a40e48..00dc06762 100644 --- a/x/gov/keeper/msg_server_test.go +++ b/x/gov/keeper/msg_server_test.go @@ -14,11 +14,11 @@ import ( govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" - "github.com/functionx/fx-core/v7/testutil/helpers" - fxtypes "github.com/functionx/fx-core/v7/types" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" - erc20types "github.com/functionx/fx-core/v7/x/erc20/types" - "github.com/functionx/fx-core/v7/x/gov/types" + "github.com/functionx/fx-core/v8/testutil/helpers" + fxtypes "github.com/functionx/fx-core/v8/types" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" + erc20types "github.com/functionx/fx-core/v8/x/erc20/types" + "github.com/functionx/fx-core/v8/x/gov/types" ) func (suite *KeeperTestSuite) TestSubmitProposal() { diff --git a/x/gov/keeper/params.go b/x/gov/keeper/params.go index e0346afd1..4e429c0e8 100644 --- a/x/gov/keeper/params.go +++ b/x/gov/keeper/params.go @@ -5,8 +5,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/gov/types" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/gov/types" ) // GetFXParams gets the gov module's parameters. diff --git a/x/gov/keeper/params_test.go b/x/gov/keeper/params_test.go index 9367b1dab..ff472a961 100644 --- a/x/gov/keeper/params_test.go +++ b/x/gov/keeper/params_test.go @@ -7,9 +7,9 @@ import ( sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - fxtypes "github.com/functionx/fx-core/v7/types" - erc20types "github.com/functionx/fx-core/v7/x/erc20/types" - "github.com/functionx/fx-core/v7/x/gov/types" + fxtypes "github.com/functionx/fx-core/v8/types" + erc20types "github.com/functionx/fx-core/v8/x/erc20/types" + "github.com/functionx/fx-core/v8/x/gov/types" ) func (suite *KeeperTestSuite) TestParams() { diff --git a/x/gov/keeper/tally.go b/x/gov/keeper/tally.go index c789eefc5..c30600835 100644 --- a/x/gov/keeper/tally.go +++ b/x/gov/keeper/tally.go @@ -7,7 +7,7 @@ import ( govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - fxgovtypes "github.com/functionx/fx-core/v7/x/gov/types" + fxgovtypes "github.com/functionx/fx-core/v8/x/gov/types" ) // Tally iterates over the votes and updates the tally of a proposal based on the voting power of the diff --git a/x/gov/keeper/tally_test.go b/x/gov/keeper/tally_test.go index 39bc59a27..b004b66e7 100644 --- a/x/gov/keeper/tally_test.go +++ b/x/gov/keeper/tally_test.go @@ -6,8 +6,8 @@ import ( banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" - fxtypes "github.com/functionx/fx-core/v7/types" - erc20types "github.com/functionx/fx-core/v7/x/erc20/types" + fxtypes "github.com/functionx/fx-core/v8/types" + erc20types "github.com/functionx/fx-core/v8/x/erc20/types" ) func (suite *KeeperTestSuite) TestKeeper_Tally() { diff --git a/x/gov/migrations/v4/params.go b/x/gov/migrations/v4/params.go index 427254ee3..9713ede59 100644 --- a/x/gov/migrations/v4/params.go +++ b/x/gov/migrations/v4/params.go @@ -7,7 +7,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" - "github.com/functionx/fx-core/v7/x/gov/types" + "github.com/functionx/fx-core/v8/x/gov/types" ) func MigrateFXParams(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.BinaryCodec, params govv1.Params) error { diff --git a/x/gov/module.go b/x/gov/module.go index 1cbd4d5cf..fd0f21168 100644 --- a/x/gov/module.go +++ b/x/gov/module.go @@ -20,9 +20,9 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - "github.com/functionx/fx-core/v7/x/gov/client/cli" - "github.com/functionx/fx-core/v7/x/gov/keeper" - "github.com/functionx/fx-core/v7/x/gov/types" + "github.com/functionx/fx-core/v8/x/gov/client/cli" + "github.com/functionx/fx-core/v8/x/gov/keeper" + "github.com/functionx/fx-core/v8/x/gov/types" ) var ( diff --git a/x/gov/types/codec.go b/x/gov/types/codec.go index c4180c3d3..b82eef722 100644 --- a/x/gov/types/codec.go +++ b/x/gov/types/codec.go @@ -7,7 +7,7 @@ import ( "github.com/cosmos/cosmos-sdk/types/msgservice" authzcodec "github.com/cosmos/cosmos-sdk/x/authz/codec" - "github.com/functionx/fx-core/v7/x/gov/legacy" + "github.com/functionx/fx-core/v8/x/gov/legacy" ) // ModuleCdc is the codec for the module diff --git a/x/gov/types/msgs_test.go b/x/gov/types/msgs_test.go index 90856629e..7db76c086 100644 --- a/x/gov/types/msgs_test.go +++ b/x/gov/types/msgs_test.go @@ -9,8 +9,8 @@ import ( govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/stretchr/testify/require" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/gov/types" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/gov/types" ) var ( diff --git a/x/gov/types/params.go b/x/gov/types/params.go index 0fa51e9dd..b8a16b830 100644 --- a/x/gov/types/params.go +++ b/x/gov/types/params.go @@ -12,9 +12,9 @@ import ( govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" "github.com/cosmos/gogoproto/proto" - fxtypes "github.com/functionx/fx-core/v7/types" - erc20types "github.com/functionx/fx-core/v7/x/erc20/types" - evmtypes "github.com/functionx/fx-core/v7/x/evm/types" + fxtypes "github.com/functionx/fx-core/v8/types" + erc20types "github.com/functionx/fx-core/v8/x/erc20/types" + evmtypes "github.com/functionx/fx-core/v8/x/evm/types" ) var ( diff --git a/x/gravity/keeper/grpc_query.go b/x/gravity/keeper/grpc_query.go index 99bbf6c4e..66afd2381 100644 --- a/x/gravity/keeper/grpc_query.go +++ b/x/gravity/keeper/grpc_query.go @@ -4,11 +4,11 @@ package keeper import ( "context" - fxtypes "github.com/functionx/fx-core/v7/types" - crosschainkeeper "github.com/functionx/fx-core/v7/x/crosschain/keeper" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" - ethtypes "github.com/functionx/fx-core/v7/x/eth/types" - "github.com/functionx/fx-core/v7/x/gravity/types" + fxtypes "github.com/functionx/fx-core/v8/types" + crosschainkeeper "github.com/functionx/fx-core/v8/x/crosschain/keeper" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" + ethtypes "github.com/functionx/fx-core/v8/x/eth/types" + "github.com/functionx/fx-core/v8/x/gravity/types" ) type queryServer struct { diff --git a/x/gravity/keeper/msg_server.go b/x/gravity/keeper/msg_server.go index 469d96fb7..0264423d7 100644 --- a/x/gravity/keeper/msg_server.go +++ b/x/gravity/keeper/msg_server.go @@ -4,10 +4,10 @@ package keeper import ( "context" - crosschainkeeper "github.com/functionx/fx-core/v7/x/crosschain/keeper" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" - ethtypes "github.com/functionx/fx-core/v7/x/eth/types" - "github.com/functionx/fx-core/v7/x/gravity/types" + crosschainkeeper "github.com/functionx/fx-core/v8/x/crosschain/keeper" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" + ethtypes "github.com/functionx/fx-core/v8/x/eth/types" + "github.com/functionx/fx-core/v8/x/gravity/types" ) type msgServer struct { diff --git a/x/gravity/service.go b/x/gravity/service.go index f0ead5c61..da9589313 100644 --- a/x/gravity/service.go +++ b/x/gravity/service.go @@ -7,7 +7,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/functionx/fx-core/v7/x/gravity/types" + "github.com/functionx/fx-core/v8/x/gravity/types" ) // RegisterGRPCGatewayRoutes diff --git a/x/gravity/types/msgs.go b/x/gravity/types/msgs.go index ba23a823d..e92e52e45 100644 --- a/x/gravity/types/msgs.go +++ b/x/gravity/types/msgs.go @@ -9,7 +9,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" errortypes "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/functionx/fx-core/v7/contract" + "github.com/functionx/fx-core/v8/contract" ) const ( diff --git a/x/ibc/applications/transfer/client/cli/tx.go b/x/ibc/applications/transfer/client/cli/tx.go index 94f07b2f2..362d6187d 100644 --- a/x/ibc/applications/transfer/client/cli/tx.go +++ b/x/ibc/applications/transfer/client/cli/tx.go @@ -17,7 +17,7 @@ import ( channelutils "github.com/cosmos/ibc-go/v7/modules/core/04-channel/client/utils" "github.com/spf13/cobra" - "github.com/functionx/fx-core/v7/x/ibc/applications/transfer/types" + "github.com/functionx/fx-core/v8/x/ibc/applications/transfer/types" ) const ( diff --git a/x/ibc/applications/transfer/ibc_middleware.go b/x/ibc/applications/transfer/ibc_middleware.go index 31f72b448..1aa1a7eb9 100644 --- a/x/ibc/applications/transfer/ibc_middleware.go +++ b/x/ibc/applications/transfer/ibc_middleware.go @@ -14,9 +14,9 @@ import ( porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" "github.com/cosmos/ibc-go/v7/modules/core/exported" - "github.com/functionx/fx-core/v7/x/ibc" - "github.com/functionx/fx-core/v7/x/ibc/applications/transfer/keeper" - "github.com/functionx/fx-core/v7/x/ibc/applications/transfer/types" + "github.com/functionx/fx-core/v8/x/ibc" + "github.com/functionx/fx-core/v8/x/ibc/applications/transfer/keeper" + "github.com/functionx/fx-core/v8/x/ibc/applications/transfer/types" ) var _ porttypes.Middleware = &IBCMiddleware{} diff --git a/x/ibc/applications/transfer/ibc_middleware_test.go b/x/ibc/applications/transfer/ibc_middleware_test.go index be32b870f..d889e47ca 100644 --- a/x/ibc/applications/transfer/ibc_middleware_test.go +++ b/x/ibc/applications/transfer/ibc_middleware_test.go @@ -6,8 +6,8 @@ import ( transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" "github.com/stretchr/testify/require" - _ "github.com/functionx/fx-core/v7/app" - "github.com/functionx/fx-core/v7/x/ibc/applications/transfer/types" + _ "github.com/functionx/fx-core/v8/app" + "github.com/functionx/fx-core/v8/x/ibc/applications/transfer/types" ) func TestUnmarshalJSON(t *testing.T) { diff --git a/x/ibc/applications/transfer/keeper/ibc_call.go b/x/ibc/applications/transfer/keeper/ibc_call.go index 7620f2e2d..1c3a8f8ce 100644 --- a/x/ibc/applications/transfer/keeper/ibc_call.go +++ b/x/ibc/applications/transfer/keeper/ibc_call.go @@ -8,7 +8,7 @@ import ( "github.com/ethereum/go-ethereum/common" evmtypes "github.com/evmos/ethermint/x/evm/types" - "github.com/functionx/fx-core/v7/x/ibc/applications/transfer/types" + "github.com/functionx/fx-core/v8/x/ibc/applications/transfer/types" ) func (k Keeper) HandlerIbcCall(ctx sdk.Context, sourcePort, sourceChannel string, data types.FungibleTokenPacketData) error { diff --git a/x/ibc/applications/transfer/keeper/keeper.go b/x/ibc/applications/transfer/keeper/keeper.go index 631e930d0..bc08e79ae 100644 --- a/x/ibc/applications/transfer/keeper/keeper.go +++ b/x/ibc/applications/transfer/keeper/keeper.go @@ -12,7 +12,7 @@ import ( porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" - "github.com/functionx/fx-core/v7/x/ibc/applications/transfer/types" + "github.com/functionx/fx-core/v8/x/ibc/applications/transfer/types" ) // Keeper defines the IBC fungible transfer keeper diff --git a/x/ibc/applications/transfer/keeper/keeper_test.go b/x/ibc/applications/transfer/keeper/keeper_test.go index c63733134..aacfce976 100644 --- a/x/ibc/applications/transfer/keeper/keeper_test.go +++ b/x/ibc/applications/transfer/keeper/keeper_test.go @@ -8,9 +8,9 @@ import ( ibctesting "github.com/cosmos/ibc-go/v7/testing" "github.com/stretchr/testify/suite" - "github.com/functionx/fx-core/v7/testutil/helpers" - "github.com/functionx/fx-core/v7/x/ibc/applications/transfer/types" - fxibctesting "github.com/functionx/fx-core/v7/x/ibc/testing" + "github.com/functionx/fx-core/v8/testutil/helpers" + "github.com/functionx/fx-core/v8/x/ibc/applications/transfer/types" + fxibctesting "github.com/functionx/fx-core/v8/x/ibc/testing" ) type KeeperTestSuite struct { diff --git a/x/ibc/applications/transfer/keeper/msg_server.go b/x/ibc/applications/transfer/keeper/msg_server.go index 06f5eb89b..c44b49a33 100644 --- a/x/ibc/applications/transfer/keeper/msg_server.go +++ b/x/ibc/applications/transfer/keeper/msg_server.go @@ -8,7 +8,7 @@ import ( errortypes "github.com/cosmos/cosmos-sdk/types/errors" transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" - "github.com/functionx/fx-core/v7/x/ibc/applications/transfer/types" + "github.com/functionx/fx-core/v8/x/ibc/applications/transfer/types" ) var ( diff --git a/x/ibc/applications/transfer/keeper/msg_server_test.go b/x/ibc/applications/transfer/keeper/msg_server_test.go index e0a637fbd..3ec935dae 100644 --- a/x/ibc/applications/transfer/keeper/msg_server_test.go +++ b/x/ibc/applications/transfer/keeper/msg_server_test.go @@ -4,8 +4,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" - fxtypes "github.com/functionx/fx-core/v7/types" - ibctesting "github.com/functionx/fx-core/v7/x/ibc/testing" + fxtypes "github.com/functionx/fx-core/v8/types" + ibctesting "github.com/functionx/fx-core/v8/x/ibc/testing" ) func (suite *KeeperTestSuite) TestMsgTransfer() { diff --git a/x/ibc/applications/transfer/keeper/parse.go b/x/ibc/applications/transfer/keeper/parse.go index 0152c2547..e04446d7e 100644 --- a/x/ibc/applications/transfer/keeper/parse.go +++ b/x/ibc/applications/transfer/keeper/parse.go @@ -7,8 +7,8 @@ import ( transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/ibc/applications/transfer/types" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/ibc/applications/transfer/types" ) func parseIBCCoinDenom(packet channeltypes.Packet, packetDenom string) string { diff --git a/x/ibc/applications/transfer/keeper/parse_test.go b/x/ibc/applications/transfer/keeper/parse_test.go index 26b68c1a0..3986b80e4 100644 --- a/x/ibc/applications/transfer/keeper/parse_test.go +++ b/x/ibc/applications/transfer/keeper/parse_test.go @@ -10,8 +10,8 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/ibc/applications/transfer/types" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/ibc/applications/transfer/types" ) func TestParseReceiveAndAmountByPacket(t *testing.T) { diff --git a/x/ibc/applications/transfer/keeper/relay.go b/x/ibc/applications/transfer/keeper/relay.go index d0d996466..13caa51e7 100644 --- a/x/ibc/applications/transfer/keeper/relay.go +++ b/x/ibc/applications/transfer/keeper/relay.go @@ -16,9 +16,9 @@ import ( coretypes "github.com/cosmos/ibc-go/v7/modules/core/types" "github.com/ethereum/go-ethereum/common" - fxtypes "github.com/functionx/fx-core/v7/types" - erc20types "github.com/functionx/fx-core/v7/x/erc20/types" - "github.com/functionx/fx-core/v7/x/ibc/applications/transfer/types" + fxtypes "github.com/functionx/fx-core/v8/types" + erc20types "github.com/functionx/fx-core/v8/x/erc20/types" + "github.com/functionx/fx-core/v8/x/ibc/applications/transfer/types" ) // make SendTransfer private diff --git a/x/ibc/applications/transfer/keeper/relay_test.go b/x/ibc/applications/transfer/keeper/relay_test.go index 08b0ac98f..6a65f4899 100644 --- a/x/ibc/applications/transfer/keeper/relay_test.go +++ b/x/ibc/applications/transfer/keeper/relay_test.go @@ -20,18 +20,18 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" - "github.com/functionx/fx-core/v7/contract" - "github.com/functionx/fx-core/v7/testutil/helpers" - fxtypes "github.com/functionx/fx-core/v7/types" - avalanchetypes "github.com/functionx/fx-core/v7/x/avalanche/types" - bsctypes "github.com/functionx/fx-core/v7/x/bsc/types" - erc20types "github.com/functionx/fx-core/v7/x/erc20/types" - ethtypes "github.com/functionx/fx-core/v7/x/eth/types" - fxtransfer "github.com/functionx/fx-core/v7/x/ibc/applications/transfer" - fxtransfertypes "github.com/functionx/fx-core/v7/x/ibc/applications/transfer/types" - fxibctesting "github.com/functionx/fx-core/v7/x/ibc/testing" - polygontypes "github.com/functionx/fx-core/v7/x/polygon/types" - trontypes "github.com/functionx/fx-core/v7/x/tron/types" + "github.com/functionx/fx-core/v8/contract" + "github.com/functionx/fx-core/v8/testutil/helpers" + fxtypes "github.com/functionx/fx-core/v8/types" + avalanchetypes "github.com/functionx/fx-core/v8/x/avalanche/types" + bsctypes "github.com/functionx/fx-core/v8/x/bsc/types" + erc20types "github.com/functionx/fx-core/v8/x/erc20/types" + ethtypes "github.com/functionx/fx-core/v8/x/eth/types" + fxtransfer "github.com/functionx/fx-core/v8/x/ibc/applications/transfer" + fxtransfertypes "github.com/functionx/fx-core/v8/x/ibc/applications/transfer/types" + fxibctesting "github.com/functionx/fx-core/v8/x/ibc/testing" + polygontypes "github.com/functionx/fx-core/v8/x/polygon/types" + trontypes "github.com/functionx/fx-core/v8/x/tron/types" ) func (suite *KeeperTestSuite) TestSendTransfer() { diff --git a/x/ibc/applications/transfer/module.go b/x/ibc/applications/transfer/module.go index d2aee78a6..e2bc0ebb2 100644 --- a/x/ibc/applications/transfer/module.go +++ b/x/ibc/applications/transfer/module.go @@ -14,9 +14,9 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - "github.com/functionx/fx-core/v7/x/ibc/applications/transfer/client/cli" - "github.com/functionx/fx-core/v7/x/ibc/applications/transfer/keeper" - "github.com/functionx/fx-core/v7/x/ibc/applications/transfer/types" + "github.com/functionx/fx-core/v8/x/ibc/applications/transfer/client/cli" + "github.com/functionx/fx-core/v8/x/ibc/applications/transfer/keeper" + "github.com/functionx/fx-core/v8/x/ibc/applications/transfer/types" ) // type check to ensure the interface is properly implemented diff --git a/x/ibc/applications/transfer/transfer_test.go b/x/ibc/applications/transfer/transfer_test.go index 726295a77..2e06fbc8c 100644 --- a/x/ibc/applications/transfer/transfer_test.go +++ b/x/ibc/applications/transfer/transfer_test.go @@ -12,9 +12,9 @@ import ( ibctesting "github.com/cosmos/ibc-go/v7/testing" "github.com/stretchr/testify/suite" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/ibc/applications/transfer/types" - fxibctesting "github.com/functionx/fx-core/v7/x/ibc/testing" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/ibc/applications/transfer/types" + fxibctesting "github.com/functionx/fx-core/v8/x/ibc/testing" ) var defaultMsgRouter = "" diff --git a/x/ibc/applications/transfer/types/expected_keepers.go b/x/ibc/applications/transfer/types/expected_keepers.go index 50441d363..414bff7c2 100644 --- a/x/ibc/applications/transfer/types/expected_keepers.go +++ b/x/ibc/applications/transfer/types/expected_keepers.go @@ -8,8 +8,8 @@ import ( "github.com/ethereum/go-ethereum/common" evmtypes "github.com/evmos/ethermint/x/evm/types" - fxtypes "github.com/functionx/fx-core/v7/types" - erc20types "github.com/functionx/fx-core/v7/x/erc20/types" + fxtypes "github.com/functionx/fx-core/v8/types" + erc20types "github.com/functionx/fx-core/v8/x/erc20/types" ) type RefundHook interface { diff --git a/x/ibc/applications/transfer/types/msgs_test.go b/x/ibc/applications/transfer/types/msgs_test.go index 4275a22b3..56b59db55 100644 --- a/x/ibc/applications/transfer/types/msgs_test.go +++ b/x/ibc/applications/transfer/types/msgs_test.go @@ -10,7 +10,7 @@ import ( clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" "github.com/stretchr/testify/require" - _ "github.com/functionx/fx-core/v7/types" + _ "github.com/functionx/fx-core/v8/types" ) // define constants used for testing diff --git a/x/ibc/applications/transfer/types/packet.go b/x/ibc/applications/transfer/types/packet.go index 45eb19e47..507856ff1 100644 --- a/x/ibc/applications/transfer/types/packet.go +++ b/x/ibc/applications/transfer/types/packet.go @@ -13,7 +13,7 @@ import ( transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" "github.com/ethereum/go-ethereum/common" - "github.com/functionx/fx-core/v7/contract" + "github.com/functionx/fx-core/v8/contract" ) type MemoPacket interface { @@ -52,7 +52,7 @@ func (ftpd FungibleTokenPacketData) ValidateBasic() error { return errorsmod.Wrapf(transfertypes.ErrInvalidAmount, "unable to parse transfer amount (%s) into sdkmath.Int", ftpd.Amount) } if !amount.IsPositive() { - return errorsmod.Wrapf(transfertypes.ErrInvalidAmount, "amount must be strictly positive: got %d", amount) + return errorsmod.Wrapf(transfertypes.ErrInvalidAmount, "amount must be strictly positive: got %s", amount) } if strings.TrimSpace(ftpd.Sender) == "" { return errorsmod.Wrap(errortypes.ErrInvalidAddress, "sender address cannot be blank") @@ -65,7 +65,7 @@ func (ftpd FungibleTokenPacketData) ValidateBasic() error { return errorsmod.Wrapf(transfertypes.ErrInvalidAmount, "unable to parse transfer fee (%s) into sdkmath.Int", ftpd.Fee) } if fee.IsNegative() { - return errorsmod.Wrapf(transfertypes.ErrInvalidAmount, "fee must be strictly not negative: got %d", fee) + return errorsmod.Wrapf(transfertypes.ErrInvalidAmount, "fee must be strictly not negative: got %s", fee) } if err := transfertypes.ValidatePrefixedDenom(ftpd.Denom); err != nil { return err diff --git a/x/ibc/ibcrouter/ibc_middleware.go b/x/ibc/ibcrouter/ibc_middleware.go index 80f02dd80..4159c7a3e 100644 --- a/x/ibc/ibcrouter/ibc_middleware.go +++ b/x/ibc/ibcrouter/ibc_middleware.go @@ -17,9 +17,9 @@ import ( porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" "github.com/cosmos/ibc-go/v7/modules/core/exported" - fxtransfertypes "github.com/functionx/fx-core/v7/x/ibc/applications/transfer/types" - "github.com/functionx/fx-core/v7/x/ibc/ibcrouter/parser" - "github.com/functionx/fx-core/v7/x/ibc/ibcrouter/types" + fxtransfertypes "github.com/functionx/fx-core/v8/x/ibc/applications/transfer/types" + "github.com/functionx/fx-core/v8/x/ibc/ibcrouter/parser" + "github.com/functionx/fx-core/v8/x/ibc/ibcrouter/types" ) const ( @@ -191,7 +191,7 @@ func handlerForwardTransferPacket(ctx sdk.Context, im IBCMiddleware, packet chan // send tokens to destination if _, err = im.transferKeeper.Transfer(sdk.WrapSDKContext(ctx), msgTransfer); err != nil { - return nil, errorsmod.Wrapf(errortypes.ErrInsufficientFunds, err.Error()) + return nil, errorsmod.Wrap(errortypes.ErrInsufficientFunds, err.Error()) } } return ack, nil diff --git a/x/ibc/ibcrouter/ibc_middleware_test.go b/x/ibc/ibcrouter/ibc_middleware_test.go index 4dc837907..26ec274a4 100644 --- a/x/ibc/ibcrouter/ibc_middleware_test.go +++ b/x/ibc/ibcrouter/ibc_middleware_test.go @@ -9,9 +9,9 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" - _ "github.com/functionx/fx-core/v7/app" - "github.com/functionx/fx-core/v7/x/ibc/ibcrouter" - "github.com/functionx/fx-core/v7/x/ibc/ibcrouter/parser" + _ "github.com/functionx/fx-core/v8/app" + "github.com/functionx/fx-core/v8/x/ibc/ibcrouter" + "github.com/functionx/fx-core/v8/x/ibc/ibcrouter/parser" ) func TestParseIncomingTransferField(t *testing.T) { diff --git a/x/ibc/ibcrouter/parser/receiver_parser_test.go b/x/ibc/ibcrouter/parser/receiver_parser_test.go index d0b185d83..bc8e605bc 100644 --- a/x/ibc/ibcrouter/parser/receiver_parser_test.go +++ b/x/ibc/ibcrouter/parser/receiver_parser_test.go @@ -9,7 +9,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" - "github.com/functionx/fx-core/v7/x/ibc/ibcrouter/parser" + "github.com/functionx/fx-core/v8/x/ibc/ibcrouter/parser" ) func TestParseReceiverDataTransfer(t *testing.T) { diff --git a/x/ibc/testing/app.go b/x/ibc/testing/app.go index f4b05c37c..5ea4b06b5 100644 --- a/x/ibc/testing/app.go +++ b/x/ibc/testing/app.go @@ -19,10 +19,10 @@ import ( ibctesting "github.com/cosmos/ibc-go/v7/testing" "github.com/stretchr/testify/require" - fxapp "github.com/functionx/fx-core/v7/app" - "github.com/functionx/fx-core/v7/testutil/helpers" - "github.com/functionx/fx-core/v7/types" - fxstakingtypes "github.com/functionx/fx-core/v7/x/staking/types" + fxapp "github.com/functionx/fx-core/v8/app" + "github.com/functionx/fx-core/v8/testutil/helpers" + "github.com/functionx/fx-core/v8/types" + fxstakingtypes "github.com/functionx/fx-core/v8/x/staking/types" ) var DefaultTestingAppInit = helpers.SetupTestingApp diff --git a/x/ibc/testing/chain.go b/x/ibc/testing/chain.go index 817347380..dd943d64d 100644 --- a/x/ibc/testing/chain.go +++ b/x/ibc/testing/chain.go @@ -14,7 +14,7 @@ import ( "github.com/cosmos/ibc-go/v7/testing/mock" "github.com/stretchr/testify/require" - fxtypes "github.com/functionx/fx-core/v7/types" + fxtypes "github.com/functionx/fx-core/v8/types" ) // ChainIDPrefix defines the default chain ID prefix for Evmos test chains diff --git a/x/layer2/module.go b/x/layer2/module.go index ab88a545a..caee1beac 100644 --- a/x/layer2/module.go +++ b/x/layer2/module.go @@ -13,10 +13,10 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - crosschaincli "github.com/functionx/fx-core/v7/x/crosschain/client/cli" - crosschainkeeper "github.com/functionx/fx-core/v7/x/crosschain/keeper" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" - "github.com/functionx/fx-core/v7/x/layer2/types" + crosschaincli "github.com/functionx/fx-core/v8/x/crosschain/client/cli" + crosschainkeeper "github.com/functionx/fx-core/v8/x/crosschain/keeper" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/layer2/types" ) // type check to ensure the interface is properly implemented diff --git a/x/layer2/types/genesis.go b/x/layer2/types/genesis.go index 6f8dfb7e7..b988f89f9 100644 --- a/x/layer2/types/genesis.go +++ b/x/layer2/types/genesis.go @@ -1,7 +1,7 @@ package types import ( - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" ) func DefaultGenesisState() *crosschaintypes.GenesisState { diff --git a/x/layer2/types/key.go b/x/layer2/types/key.go index 37ee435d7..b0d8c96ac 100644 --- a/x/layer2/types/key.go +++ b/x/layer2/types/key.go @@ -1,6 +1,6 @@ package types -import crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" +import crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" const ( // ModuleName is the name of the module diff --git a/x/migrate/client/cli/query.go b/x/migrate/client/cli/query.go index 5cdbfdc98..341689f61 100644 --- a/x/migrate/client/cli/query.go +++ b/x/migrate/client/cli/query.go @@ -14,7 +14,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/spf13/cobra" - "github.com/functionx/fx-core/v7/x/migrate/types" + "github.com/functionx/fx-core/v8/x/migrate/types" ) func GetQueryCmd() *cobra.Command { diff --git a/x/migrate/client/cli/tx.go b/x/migrate/client/cli/tx.go index b051820c6..bacda1ac2 100644 --- a/x/migrate/client/cli/tx.go +++ b/x/migrate/client/cli/tx.go @@ -13,10 +13,10 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/spf13/cobra" - "github.com/functionx/fx-core/v7/contract" - fxtypes "github.com/functionx/fx-core/v7/types" - erc20types "github.com/functionx/fx-core/v7/x/erc20/types" - "github.com/functionx/fx-core/v7/x/migrate/types" + "github.com/functionx/fx-core/v8/contract" + fxtypes "github.com/functionx/fx-core/v8/types" + erc20types "github.com/functionx/fx-core/v8/x/erc20/types" + "github.com/functionx/fx-core/v8/x/migrate/types" ) func GetTxCmd() *cobra.Command { diff --git a/x/migrate/keeper/bank.go b/x/migrate/keeper/bank.go index a80192384..bd88635e4 100644 --- a/x/migrate/keeper/bank.go +++ b/x/migrate/keeper/bank.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" - migratetypes "github.com/functionx/fx-core/v7/x/migrate/types" + migratetypes "github.com/functionx/fx-core/v8/x/migrate/types" ) type BankMigrate struct { diff --git a/x/migrate/keeper/bank_test.go b/x/migrate/keeper/bank_test.go index 468930461..0f13fc469 100644 --- a/x/migrate/keeper/bank_test.go +++ b/x/migrate/keeper/bank_test.go @@ -6,8 +6,8 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" - ethtypes "github.com/functionx/fx-core/v7/x/eth/types" - migratekeeper "github.com/functionx/fx-core/v7/x/migrate/keeper" + ethtypes "github.com/functionx/fx-core/v8/x/eth/types" + migratekeeper "github.com/functionx/fx-core/v8/x/migrate/keeper" ) func (suite *KeeperTestSuite) TestMigrateBank() { diff --git a/x/migrate/keeper/distr_staking.go b/x/migrate/keeper/distr_staking.go index e66e2a9cf..2a2deb9d1 100644 --- a/x/migrate/keeper/distr_staking.go +++ b/x/migrate/keeper/distr_staking.go @@ -9,7 +9,7 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/ethereum/go-ethereum/common" - "github.com/functionx/fx-core/v7/x/migrate/types" + "github.com/functionx/fx-core/v8/x/migrate/types" ) type DistrStakingMigrate struct { diff --git a/x/migrate/keeper/distr_staking_test.go b/x/migrate/keeper/distr_staking_test.go index 87f1e761e..ecdc25791 100644 --- a/x/migrate/keeper/distr_staking_test.go +++ b/x/migrate/keeper/distr_staking_test.go @@ -23,10 +23,10 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" - "github.com/functionx/fx-core/v7/app" - fxtypes "github.com/functionx/fx-core/v7/types" - bsctypes "github.com/functionx/fx-core/v7/x/bsc/types" - migratekeeper "github.com/functionx/fx-core/v7/x/migrate/keeper" + "github.com/functionx/fx-core/v8/app" + fxtypes "github.com/functionx/fx-core/v8/types" + bsctypes "github.com/functionx/fx-core/v8/x/bsc/types" + migratekeeper "github.com/functionx/fx-core/v8/x/migrate/keeper" ) func (suite *KeeperTestSuite) TestMigrateStakingDelegate() { @@ -63,7 +63,7 @@ func (suite *KeeperTestSuite) TestMigrateStakingDelegate() { rewards1, err := GetDelegateRewards(suite.ctx, suite.app, acc, val1.GetOperator()) suite.Require().NoError(err) rewards2, err := GetDelegateRewards(suite.ctx, suite.app, ethAcc.Bytes(), val1.GetOperator()) - suite.Require().Equal("delegation does not exist", err.Error()) + suite.Require().EqualError(err, "delegation does not exist") // migrate m := migratekeeper.NewDistrStakingMigrate(suite.app.GetKey(distritypes.StoreKey), suite.app.GetKey(stakingtypes.StoreKey), suite.app.StakingKeeper) @@ -83,7 +83,7 @@ func (suite *KeeperTestSuite) TestMigrateStakingDelegate() { // check reward rewards3, err := GetDelegateRewards(suite.ctx, suite.app, acc, val1.GetOperator()) - suite.Require().Equal("delegation does not exist", err.Error()) + suite.Require().EqualError(err, "delegation does not exist") suite.Require().Equal(rewards2, rewards3) rewards4, err := GetDelegateRewards(suite.ctx, suite.app, ethAcc.Bytes(), val1.GetOperator()) suite.Require().NoError(err) diff --git a/x/migrate/keeper/genesis.go b/x/migrate/keeper/genesis.go index 7c60972a2..1ba2e17be 100644 --- a/x/migrate/keeper/genesis.go +++ b/x/migrate/keeper/genesis.go @@ -4,8 +4,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" - "github.com/functionx/fx-core/v7/contract" - "github.com/functionx/fx-core/v7/x/migrate/types" + "github.com/functionx/fx-core/v8/contract" + "github.com/functionx/fx-core/v8/x/migrate/types" ) // InitGenesis import module genesis diff --git a/x/migrate/keeper/gov.go b/x/migrate/keeper/gov.go index 8b7949e44..6252eecd1 100644 --- a/x/migrate/keeper/gov.go +++ b/x/migrate/keeper/gov.go @@ -11,7 +11,7 @@ import ( govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" "github.com/ethereum/go-ethereum/common" - "github.com/functionx/fx-core/v7/x/migrate/types" + "github.com/functionx/fx-core/v8/x/migrate/types" ) type GovMigrate struct { diff --git a/x/migrate/keeper/gov_test.go b/x/migrate/keeper/gov_test.go index 6cb3f86ef..fc0cb55a4 100644 --- a/x/migrate/keeper/gov_test.go +++ b/x/migrate/keeper/gov_test.go @@ -8,9 +8,9 @@ import ( govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/ethereum/go-ethereum/common" - fxtypes "github.com/functionx/fx-core/v7/types" - bsctypes "github.com/functionx/fx-core/v7/x/bsc/types" - migratekeeper "github.com/functionx/fx-core/v7/x/migrate/keeper" + fxtypes "github.com/functionx/fx-core/v8/types" + bsctypes "github.com/functionx/fx-core/v8/x/bsc/types" + migratekeeper "github.com/functionx/fx-core/v8/x/migrate/keeper" ) func (suite *KeeperTestSuite) TestMigrateGovInactive() { diff --git a/x/migrate/keeper/grpc_query.go b/x/migrate/keeper/grpc_query.go index 7fd3bdee4..f7aa7e205 100644 --- a/x/migrate/keeper/grpc_query.go +++ b/x/migrate/keeper/grpc_query.go @@ -8,7 +8,7 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "github.com/functionx/fx-core/v7/x/migrate/types" + "github.com/functionx/fx-core/v8/x/migrate/types" ) var _ types.QueryServer = Keeper{} diff --git a/x/migrate/keeper/grpc_query_test.go b/x/migrate/keeper/grpc_query_test.go index 1617a51cf..da895532a 100644 --- a/x/migrate/keeper/grpc_query_test.go +++ b/x/migrate/keeper/grpc_query_test.go @@ -12,8 +12,8 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/evmos/ethermint/crypto/ethsecp256k1" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/migrate/types" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/migrate/types" ) func (suite *KeeperTestSuite) TestMigrateRecord() { diff --git a/x/migrate/keeper/keeper.go b/x/migrate/keeper/keeper.go index 7664a3adc..d1235f3f5 100644 --- a/x/migrate/keeper/keeper.go +++ b/x/migrate/keeper/keeper.go @@ -12,7 +12,7 @@ import ( authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/ethereum/go-ethereum/common" - "github.com/functionx/fx-core/v7/x/migrate/types" + "github.com/functionx/fx-core/v8/x/migrate/types" ) // secp256k1 diff --git a/x/migrate/keeper/keeper_test.go b/x/migrate/keeper/keeper_test.go index 56150ae6f..ae079deae 100644 --- a/x/migrate/keeper/keeper_test.go +++ b/x/migrate/keeper/keeper_test.go @@ -20,10 +20,10 @@ import ( ethermint "github.com/evmos/ethermint/types" "github.com/stretchr/testify/suite" - "github.com/functionx/fx-core/v7/app" - "github.com/functionx/fx-core/v7/testutil/helpers" - fxtypes "github.com/functionx/fx-core/v7/types" - migratetypes "github.com/functionx/fx-core/v7/x/migrate/types" + "github.com/functionx/fx-core/v8/app" + "github.com/functionx/fx-core/v8/testutil/helpers" + fxtypes "github.com/functionx/fx-core/v8/types" + migratetypes "github.com/functionx/fx-core/v8/x/migrate/types" ) type KeeperTestSuite struct { diff --git a/x/migrate/keeper/msg_server.go b/x/migrate/keeper/msg_server.go index 83178a958..69d3f140e 100644 --- a/x/migrate/keeper/msg_server.go +++ b/x/migrate/keeper/msg_server.go @@ -8,7 +8,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" - "github.com/functionx/fx-core/v7/x/migrate/types" + "github.com/functionx/fx-core/v8/x/migrate/types" ) var _ types.MsgServer = &Keeper{} diff --git a/x/migrate/keeper/msg_server_test.go b/x/migrate/keeper/msg_server_test.go index eb86e11b9..081ae4443 100644 --- a/x/migrate/keeper/msg_server_test.go +++ b/x/migrate/keeper/msg_server_test.go @@ -5,8 +5,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" - bsctypes "github.com/functionx/fx-core/v7/x/bsc/types" - "github.com/functionx/fx-core/v7/x/migrate/types" + bsctypes "github.com/functionx/fx-core/v8/x/bsc/types" + "github.com/functionx/fx-core/v8/x/migrate/types" ) func (suite *KeeperTestSuite) TestMigrateAccount() { diff --git a/x/migrate/module.go b/x/migrate/module.go index 70806cced..d39187b3d 100644 --- a/x/migrate/module.go +++ b/x/migrate/module.go @@ -14,9 +14,9 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - "github.com/functionx/fx-core/v7/x/migrate/client/cli" - "github.com/functionx/fx-core/v7/x/migrate/keeper" - "github.com/functionx/fx-core/v7/x/migrate/types" + "github.com/functionx/fx-core/v8/x/migrate/client/cli" + "github.com/functionx/fx-core/v8/x/migrate/keeper" + "github.com/functionx/fx-core/v8/x/migrate/types" ) // type check to ensure the interface is properly implemented diff --git a/x/migrate/types/msg.go b/x/migrate/types/msg.go index 39d671e3c..ac704b2a4 100644 --- a/x/migrate/types/msg.go +++ b/x/migrate/types/msg.go @@ -9,7 +9,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" - "github.com/functionx/fx-core/v7/contract" + "github.com/functionx/fx-core/v8/contract" ) const TypeMsgMigrateAccount = "migrate_account" diff --git a/x/migrate/types/msg_test.go b/x/migrate/types/msg_test.go index 5568b93fc..a938e5bd4 100644 --- a/x/migrate/types/msg_test.go +++ b/x/migrate/types/msg_test.go @@ -10,8 +10,8 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/stretchr/testify/require" - _ "github.com/functionx/fx-core/v7/app" - "github.com/functionx/fx-core/v7/x/migrate/types" + _ "github.com/functionx/fx-core/v8/app" + "github.com/functionx/fx-core/v8/x/migrate/types" ) func TestMsgMigrateAccountRoute(t *testing.T) { diff --git a/x/optimism/module.go b/x/optimism/module.go index a36181c46..ea307c0c6 100644 --- a/x/optimism/module.go +++ b/x/optimism/module.go @@ -13,10 +13,10 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - crosschaincli "github.com/functionx/fx-core/v7/x/crosschain/client/cli" - crosschainkeeper "github.com/functionx/fx-core/v7/x/crosschain/keeper" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" - "github.com/functionx/fx-core/v7/x/optimism/types" + crosschaincli "github.com/functionx/fx-core/v8/x/crosschain/client/cli" + crosschainkeeper "github.com/functionx/fx-core/v8/x/crosschain/keeper" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/optimism/types" ) // type check to ensure the interface is properly implemented diff --git a/x/optimism/types/genesis.go b/x/optimism/types/genesis.go index 50ea5e2b6..fbcbc823a 100644 --- a/x/optimism/types/genesis.go +++ b/x/optimism/types/genesis.go @@ -1,7 +1,7 @@ package types import ( - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" ) func DefaultGenesisState() *crosschaintypes.GenesisState { diff --git a/x/optimism/types/key.go b/x/optimism/types/key.go index bdd959750..a3667daff 100644 --- a/x/optimism/types/key.go +++ b/x/optimism/types/key.go @@ -1,6 +1,6 @@ package types -import crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" +import crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" const ( // ModuleName is the name of the module diff --git a/x/polygon/module.go b/x/polygon/module.go index 104865faf..91863bf81 100644 --- a/x/polygon/module.go +++ b/x/polygon/module.go @@ -13,10 +13,10 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - crosschaincli "github.com/functionx/fx-core/v7/x/crosschain/client/cli" - crosschainkeeper "github.com/functionx/fx-core/v7/x/crosschain/keeper" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" - "github.com/functionx/fx-core/v7/x/polygon/types" + crosschaincli "github.com/functionx/fx-core/v8/x/crosschain/client/cli" + crosschainkeeper "github.com/functionx/fx-core/v8/x/crosschain/keeper" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/polygon/types" ) // type check to ensure the interface is properly implemented diff --git a/x/polygon/types/genesis.go b/x/polygon/types/genesis.go index 5dfb55cfb..d701d808d 100644 --- a/x/polygon/types/genesis.go +++ b/x/polygon/types/genesis.go @@ -1,7 +1,7 @@ package types import ( - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" ) func DefaultGenesisState() *crosschaintypes.GenesisState { diff --git a/x/polygon/types/key.go b/x/polygon/types/key.go index 5afb1567d..c96d0cf9b 100644 --- a/x/polygon/types/key.go +++ b/x/polygon/types/key.go @@ -1,6 +1,6 @@ package types -import crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" +import crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" const ( // ModuleName is the name of the module diff --git a/x/staking/client/cli/tx.go b/x/staking/client/cli/tx.go index 9f7c2899f..063237a11 100644 --- a/x/staking/client/cli/tx.go +++ b/x/staking/client/cli/tx.go @@ -14,7 +14,7 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/spf13/cobra" - "github.com/functionx/fx-core/v7/x/staking/types" + "github.com/functionx/fx-core/v8/x/staking/types" ) // NewTxCmd returns a root CLI command handler for all x/staking transaction commands. diff --git a/x/staking/keeper/abci.go b/x/staking/keeper/abci.go index d993a46b0..0918b00ec 100644 --- a/x/staking/keeper/abci.go +++ b/x/staking/keeper/abci.go @@ -14,7 +14,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/staking" "github.com/cosmos/cosmos-sdk/x/staking/types" - fxstakingtypes "github.com/functionx/fx-core/v7/x/staking/types" + fxstakingtypes "github.com/functionx/fx-core/v8/x/staking/types" ) func (k Keeper) EndBlock(ctx sdk.Context) []abci.ValidatorUpdate { diff --git a/x/staking/keeper/abci_test.go b/x/staking/keeper/abci_test.go index fc3557f2e..5882787df 100644 --- a/x/staking/keeper/abci_test.go +++ b/x/staking/keeper/abci_test.go @@ -17,10 +17,10 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/stretchr/testify/require" - "github.com/functionx/fx-core/v7/client/jsonrpc" - "github.com/functionx/fx-core/v7/testutil/helpers" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/staking/types" + "github.com/functionx/fx-core/v8/client/jsonrpc" + "github.com/functionx/fx-core/v8/testutil/helpers" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/staking/types" ) func (suite *KeeperTestSuite) TestValidatorUpdate() { diff --git a/x/staking/keeper/genesis.go b/x/staking/keeper/genesis.go index c25633837..617afd71b 100644 --- a/x/staking/keeper/genesis.go +++ b/x/staking/keeper/genesis.go @@ -8,7 +8,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/functionx/fx-core/v7/x/staking/types" + "github.com/functionx/fx-core/v8/x/staking/types" ) func (k Keeper) InitGenesis(ctx sdk.Context, data *types.GenesisState) (res []abci.ValidatorUpdate) { diff --git a/x/staking/keeper/genesis_test.go b/x/staking/keeper/genesis_test.go index d513c6f7f..54f4b9069 100644 --- a/x/staking/keeper/genesis_test.go +++ b/x/staking/keeper/genesis_test.go @@ -8,8 +8,8 @@ import ( tmrand "github.com/cometbft/cometbft/libs/rand" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/functionx/fx-core/v7/testutil/helpers" - "github.com/functionx/fx-core/v7/x/staking/types" + "github.com/functionx/fx-core/v8/testutil/helpers" + "github.com/functionx/fx-core/v8/x/staking/types" ) func (suite *KeeperTestSuite) TestInitGenesis() { diff --git a/x/staking/keeper/keeper.go b/x/staking/keeper/keeper.go index 6f9652860..1c1ae2e07 100644 --- a/x/staking/keeper/keeper.go +++ b/x/staking/keeper/keeper.go @@ -14,7 +14,7 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/evmos/ethermint/crypto/ethsecp256k1" - "github.com/functionx/fx-core/v7/x/staking/types" + "github.com/functionx/fx-core/v8/x/staking/types" ) type Keeper struct { diff --git a/x/staking/keeper/keeper_test.go b/x/staking/keeper/keeper_test.go index 54f8c1e86..b3cfeff96 100644 --- a/x/staking/keeper/keeper_test.go +++ b/x/staking/keeper/keeper_test.go @@ -22,10 +22,10 @@ import ( "github.com/evmos/ethermint/crypto/ethsecp256k1" "github.com/stretchr/testify/suite" - "github.com/functionx/fx-core/v7/app" - "github.com/functionx/fx-core/v7/testutil/helpers" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/staking/types" + "github.com/functionx/fx-core/v8/app" + "github.com/functionx/fx-core/v8/testutil/helpers" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/staking/types" ) type KeeperTestSuite struct { diff --git a/x/staking/keeper/msg_server.go b/x/staking/keeper/msg_server.go index 4819e406e..ec67da6ab 100644 --- a/x/staking/keeper/msg_server.go +++ b/x/staking/keeper/msg_server.go @@ -13,7 +13,7 @@ import ( evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/functionx/fx-core/v7/x/staking/types" + "github.com/functionx/fx-core/v8/x/staking/types" ) var _ types.MsgServer = Keeper{} diff --git a/x/staking/keeper/msg_server_test.go b/x/staking/keeper/msg_server_test.go index 25f1168e0..9a20e0fd8 100644 --- a/x/staking/keeper/msg_server_test.go +++ b/x/staking/keeper/msg_server_test.go @@ -13,9 +13,9 @@ import ( evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/functionx/fx-core/v7/testutil/helpers" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/staking/types" + "github.com/functionx/fx-core/v8/testutil/helpers" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/staking/types" ) func (suite *KeeperTestSuite) TestGrantPrivilege() { diff --git a/x/staking/keeper/shares.go b/x/staking/keeper/shares.go index 31b2727c0..27bf13cea 100644 --- a/x/staking/keeper/shares.go +++ b/x/staking/keeper/shares.go @@ -6,7 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/functionx/fx-core/v7/x/staking/types" + "github.com/functionx/fx-core/v8/x/staking/types" ) // SetAllowance sets the allowance of a spender for a delegator. diff --git a/x/staking/keeper/shares_test.go b/x/staking/keeper/shares_test.go index 14fa4b154..b5e499718 100644 --- a/x/staking/keeper/shares_test.go +++ b/x/staking/keeper/shares_test.go @@ -3,7 +3,7 @@ package keeper_test import ( "math/big" - "github.com/functionx/fx-core/v7/testutil/helpers" + "github.com/functionx/fx-core/v8/testutil/helpers" ) func (suite *KeeperTestSuite) TestAllowance() { diff --git a/x/staking/module.go b/x/staking/module.go index ec0a8f032..d7f3fd911 100644 --- a/x/staking/module.go +++ b/x/staking/module.go @@ -15,9 +15,9 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/spf13/cobra" - fxstakingcli "github.com/functionx/fx-core/v7/x/staking/client/cli" - "github.com/functionx/fx-core/v7/x/staking/keeper" - fxstakingtypes "github.com/functionx/fx-core/v7/x/staking/types" + fxstakingcli "github.com/functionx/fx-core/v8/x/staking/client/cli" + "github.com/functionx/fx-core/v8/x/staking/keeper" + fxstakingtypes "github.com/functionx/fx-core/v8/x/staking/types" ) var ( diff --git a/x/staking/precompile/allowance_shares.go b/x/staking/precompile/allowance_shares.go index 23aa3e5a8..4811e2e07 100644 --- a/x/staking/precompile/allowance_shares.go +++ b/x/staking/precompile/allowance_shares.go @@ -6,8 +6,8 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/core/vm" - "github.com/functionx/fx-core/v7/x/evm/types" - fxstakingtypes "github.com/functionx/fx-core/v7/x/staking/types" + "github.com/functionx/fx-core/v8/x/evm/types" + fxstakingtypes "github.com/functionx/fx-core/v8/x/staking/types" ) type AllowanceSharesMethod struct { diff --git a/x/staking/precompile/allowance_shares_test.go b/x/staking/precompile/allowance_shares_test.go index d261ab9e7..6ef815bce 100644 --- a/x/staking/precompile/allowance_shares_test.go +++ b/x/staking/precompile/allowance_shares_test.go @@ -9,11 +9,11 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "github.com/functionx/fx-core/v7/contract" - testscontract "github.com/functionx/fx-core/v7/tests/contract" - "github.com/functionx/fx-core/v7/testutil/helpers" - "github.com/functionx/fx-core/v7/x/staking/precompile" - "github.com/functionx/fx-core/v7/x/staking/types" + "github.com/functionx/fx-core/v8/contract" + testscontract "github.com/functionx/fx-core/v8/tests/contract" + "github.com/functionx/fx-core/v8/testutil/helpers" + "github.com/functionx/fx-core/v8/x/staking/precompile" + "github.com/functionx/fx-core/v8/x/staking/types" ) func TestStakingAllowanceSharesABI(t *testing.T) { diff --git a/x/staking/precompile/approve_shares.go b/x/staking/precompile/approve_shares.go index d8e9b5613..e73582764 100644 --- a/x/staking/precompile/approve_shares.go +++ b/x/staking/precompile/approve_shares.go @@ -15,9 +15,9 @@ import ( "github.com/ethereum/go-ethereum/core/vm" evmtypes "github.com/evmos/ethermint/x/evm/types" - fxcontract "github.com/functionx/fx-core/v7/contract" - "github.com/functionx/fx-core/v7/x/evm/types" - fxstakingtypes "github.com/functionx/fx-core/v7/x/staking/types" + fxcontract "github.com/functionx/fx-core/v8/contract" + "github.com/functionx/fx-core/v8/x/evm/types" + fxstakingtypes "github.com/functionx/fx-core/v8/x/staking/types" ) type ApproveSharesMethod struct { diff --git a/x/staking/precompile/approve_shares_test.go b/x/staking/precompile/approve_shares_test.go index 2a6f893a3..c9943d9d3 100644 --- a/x/staking/precompile/approve_shares_test.go +++ b/x/staking/precompile/approve_shares_test.go @@ -11,11 +11,11 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/stretchr/testify/require" - "github.com/functionx/fx-core/v7/contract" - testscontract "github.com/functionx/fx-core/v7/tests/contract" - "github.com/functionx/fx-core/v7/testutil/helpers" - "github.com/functionx/fx-core/v7/x/staking/precompile" - fxstakingtypes "github.com/functionx/fx-core/v7/x/staking/types" + "github.com/functionx/fx-core/v8/contract" + testscontract "github.com/functionx/fx-core/v8/tests/contract" + "github.com/functionx/fx-core/v8/testutil/helpers" + "github.com/functionx/fx-core/v8/x/staking/precompile" + fxstakingtypes "github.com/functionx/fx-core/v8/x/staking/types" ) func TestStakingApproveSharesABI(t *testing.T) { diff --git a/x/staking/precompile/contract.go b/x/staking/precompile/contract.go index 3a6c64e3e..b3f520bd1 100644 --- a/x/staking/precompile/contract.go +++ b/x/staking/precompile/contract.go @@ -10,10 +10,10 @@ import ( ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/vm" - "github.com/functionx/fx-core/v7/contract" - evmtypes "github.com/functionx/fx-core/v7/x/evm/types" - fxstakingkeeper "github.com/functionx/fx-core/v7/x/staking/keeper" - fxstakingtypes "github.com/functionx/fx-core/v7/x/staking/types" + "github.com/functionx/fx-core/v8/contract" + evmtypes "github.com/functionx/fx-core/v8/x/evm/types" + fxstakingkeeper "github.com/functionx/fx-core/v8/x/staking/keeper" + fxstakingtypes "github.com/functionx/fx-core/v8/x/staking/types" ) type Contract struct { diff --git a/x/staking/precompile/contract_test.go b/x/staking/precompile/contract_test.go index 7d1c459cd..a82d99f52 100644 --- a/x/staking/precompile/contract_test.go +++ b/x/staking/precompile/contract_test.go @@ -26,12 +26,12 @@ import ( evmtypes "github.com/evmos/ethermint/x/evm/types" "github.com/stretchr/testify/suite" - "github.com/functionx/fx-core/v7/contract" - testscontract "github.com/functionx/fx-core/v7/tests/contract" - "github.com/functionx/fx-core/v7/testutil/helpers" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/staking/precompile" - "github.com/functionx/fx-core/v7/x/staking/testutil" + "github.com/functionx/fx-core/v8/contract" + testscontract "github.com/functionx/fx-core/v8/tests/contract" + "github.com/functionx/fx-core/v8/testutil/helpers" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/staking/precompile" + "github.com/functionx/fx-core/v8/x/staking/testutil" ) const ( diff --git a/x/staking/precompile/delegate.go b/x/staking/precompile/delegate.go index 49ea1ff3b..734d98251 100644 --- a/x/staking/precompile/delegate.go +++ b/x/staking/precompile/delegate.go @@ -16,10 +16,10 @@ import ( "github.com/ethereum/go-ethereum/core/vm" evmtypes "github.com/evmos/ethermint/x/evm/types" - fxcontract "github.com/functionx/fx-core/v7/contract" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/evm/types" - fxstakingtypes "github.com/functionx/fx-core/v7/x/staking/types" + fxcontract "github.com/functionx/fx-core/v8/contract" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/evm/types" + fxstakingtypes "github.com/functionx/fx-core/v8/x/staking/types" ) type DelegateMethod struct { diff --git a/x/staking/precompile/delegate_test.go b/x/staking/precompile/delegate_test.go index bea25324d..15d55dade 100644 --- a/x/staking/precompile/delegate_test.go +++ b/x/staking/precompile/delegate_test.go @@ -11,12 +11,12 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/stretchr/testify/require" - "github.com/functionx/fx-core/v7/contract" - testscontract "github.com/functionx/fx-core/v7/tests/contract" - "github.com/functionx/fx-core/v7/testutil/helpers" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/staking/precompile" - "github.com/functionx/fx-core/v7/x/staking/types" + "github.com/functionx/fx-core/v8/contract" + testscontract "github.com/functionx/fx-core/v8/tests/contract" + "github.com/functionx/fx-core/v8/testutil/helpers" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/staking/precompile" + "github.com/functionx/fx-core/v8/x/staking/types" ) func TestStakingDelegateABI(t *testing.T) { diff --git a/x/staking/precompile/delegation.go b/x/staking/precompile/delegation.go index 041096d90..1ec3ec492 100644 --- a/x/staking/precompile/delegation.go +++ b/x/staking/precompile/delegation.go @@ -7,8 +7,8 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/core/vm" - "github.com/functionx/fx-core/v7/x/evm/types" - fxstakingtypes "github.com/functionx/fx-core/v7/x/staking/types" + "github.com/functionx/fx-core/v8/x/evm/types" + fxstakingtypes "github.com/functionx/fx-core/v8/x/staking/types" ) type DelegationMethod struct { diff --git a/x/staking/precompile/delegation_rewards.go b/x/staking/precompile/delegation_rewards.go index 9017c9467..be83de613 100644 --- a/x/staking/precompile/delegation_rewards.go +++ b/x/staking/precompile/delegation_rewards.go @@ -7,8 +7,8 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/core/vm" - "github.com/functionx/fx-core/v7/x/evm/types" - fxstakingtypes "github.com/functionx/fx-core/v7/x/staking/types" + "github.com/functionx/fx-core/v8/x/evm/types" + fxstakingtypes "github.com/functionx/fx-core/v8/x/staking/types" ) type DelegationRewardsMethod struct { diff --git a/x/staking/precompile/delegation_rewards_test.go b/x/staking/precompile/delegation_rewards_test.go index eb34a8bda..ed39a6d3f 100644 --- a/x/staking/precompile/delegation_rewards_test.go +++ b/x/staking/precompile/delegation_rewards_test.go @@ -13,12 +13,12 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" - "github.com/functionx/fx-core/v7/contract" - testscontract "github.com/functionx/fx-core/v7/tests/contract" - "github.com/functionx/fx-core/v7/testutil/helpers" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/staking/precompile" - "github.com/functionx/fx-core/v7/x/staking/types" + "github.com/functionx/fx-core/v8/contract" + testscontract "github.com/functionx/fx-core/v8/tests/contract" + "github.com/functionx/fx-core/v8/testutil/helpers" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/staking/precompile" + "github.com/functionx/fx-core/v8/x/staking/types" ) func TestStakingDelegationRewardsABI(t *testing.T) { diff --git a/x/staking/precompile/delegation_test.go b/x/staking/precompile/delegation_test.go index a7d866bd0..5db7d7c06 100644 --- a/x/staking/precompile/delegation_test.go +++ b/x/staking/precompile/delegation_test.go @@ -10,11 +10,11 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" - "github.com/functionx/fx-core/v7/contract" - testscontract "github.com/functionx/fx-core/v7/tests/contract" - "github.com/functionx/fx-core/v7/testutil/helpers" - "github.com/functionx/fx-core/v7/x/staking/precompile" - "github.com/functionx/fx-core/v7/x/staking/types" + "github.com/functionx/fx-core/v8/contract" + testscontract "github.com/functionx/fx-core/v8/tests/contract" + "github.com/functionx/fx-core/v8/testutil/helpers" + "github.com/functionx/fx-core/v8/x/staking/precompile" + "github.com/functionx/fx-core/v8/x/staking/types" ) func TestStakingDelegationABI(t *testing.T) { diff --git a/x/staking/precompile/keys.go b/x/staking/precompile/keys.go index dabaeac49..d232c1af6 100644 --- a/x/staking/precompile/keys.go +++ b/x/staking/precompile/keys.go @@ -4,7 +4,7 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" - "github.com/functionx/fx-core/v7/contract" + "github.com/functionx/fx-core/v8/contract" ) var ( diff --git a/x/staking/precompile/redelegate.go b/x/staking/precompile/redelegate.go index 36f00b3cd..732e4c060 100644 --- a/x/staking/precompile/redelegate.go +++ b/x/staking/precompile/redelegate.go @@ -17,10 +17,10 @@ import ( "github.com/ethereum/go-ethereum/core/vm" evmtypes "github.com/evmos/ethermint/x/evm/types" - fxcontract "github.com/functionx/fx-core/v7/contract" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/evm/types" - fxstakingtypes "github.com/functionx/fx-core/v7/x/staking/types" + fxcontract "github.com/functionx/fx-core/v8/contract" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/evm/types" + fxstakingtypes "github.com/functionx/fx-core/v8/x/staking/types" ) type RedelegationMethod struct { diff --git a/x/staking/precompile/redelegate_test.go b/x/staking/precompile/redelegate_test.go index 43c5d031f..e166685be 100644 --- a/x/staking/precompile/redelegate_test.go +++ b/x/staking/precompile/redelegate_test.go @@ -10,11 +10,11 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "github.com/functionx/fx-core/v7/contract" - testscontract "github.com/functionx/fx-core/v7/tests/contract" - "github.com/functionx/fx-core/v7/testutil/helpers" - "github.com/functionx/fx-core/v7/x/staking/precompile" - "github.com/functionx/fx-core/v7/x/staking/types" + "github.com/functionx/fx-core/v8/contract" + testscontract "github.com/functionx/fx-core/v8/tests/contract" + "github.com/functionx/fx-core/v8/testutil/helpers" + "github.com/functionx/fx-core/v8/x/staking/precompile" + "github.com/functionx/fx-core/v8/x/staking/types" ) func TestStakingRedelegateABI(t *testing.T) { diff --git a/x/staking/precompile/slashing_info.go b/x/staking/precompile/slashing_info.go index ef7f7b1a6..03148bcac 100644 --- a/x/staking/precompile/slashing_info.go +++ b/x/staking/precompile/slashing_info.go @@ -7,8 +7,8 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/core/vm" - "github.com/functionx/fx-core/v7/x/evm/types" - fxstakingtypes "github.com/functionx/fx-core/v7/x/staking/types" + "github.com/functionx/fx-core/v8/x/evm/types" + fxstakingtypes "github.com/functionx/fx-core/v8/x/staking/types" ) type SlashingInfoMethod struct { diff --git a/x/staking/precompile/slashing_info_test.go b/x/staking/precompile/slashing_info_test.go index 68858cde9..9cd395624 100644 --- a/x/staking/precompile/slashing_info_test.go +++ b/x/staking/precompile/slashing_info_test.go @@ -9,11 +9,11 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "github.com/functionx/fx-core/v7/contract" - testscontract "github.com/functionx/fx-core/v7/tests/contract" - "github.com/functionx/fx-core/v7/testutil/helpers" - "github.com/functionx/fx-core/v7/x/staking/precompile" - "github.com/functionx/fx-core/v7/x/staking/types" + "github.com/functionx/fx-core/v8/contract" + testscontract "github.com/functionx/fx-core/v8/tests/contract" + "github.com/functionx/fx-core/v8/testutil/helpers" + "github.com/functionx/fx-core/v8/x/staking/precompile" + "github.com/functionx/fx-core/v8/x/staking/types" ) func TestSlashingInfoABI(t *testing.T) { diff --git a/x/staking/precompile/transfer_shares.go b/x/staking/precompile/transfer_shares.go index 7ed3e79e5..15b1f6795 100644 --- a/x/staking/precompile/transfer_shares.go +++ b/x/staking/precompile/transfer_shares.go @@ -17,9 +17,9 @@ import ( "github.com/ethereum/go-ethereum/core/vm" evmtypes "github.com/evmos/ethermint/x/evm/types" - fxcontract "github.com/functionx/fx-core/v7/contract" - "github.com/functionx/fx-core/v7/x/evm/types" - fxstakingtypes "github.com/functionx/fx-core/v7/x/staking/types" + fxcontract "github.com/functionx/fx-core/v8/contract" + "github.com/functionx/fx-core/v8/x/evm/types" + fxstakingtypes "github.com/functionx/fx-core/v8/x/staking/types" ) type TransferShare struct { diff --git a/x/staking/precompile/transfer_shares_test.go b/x/staking/precompile/transfer_shares_test.go index ff92e4a67..ab64c947f 100644 --- a/x/staking/precompile/transfer_shares_test.go +++ b/x/staking/precompile/transfer_shares_test.go @@ -14,10 +14,10 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" - "github.com/functionx/fx-core/v7/testutil/helpers" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/staking/precompile" - fxstakingtypes "github.com/functionx/fx-core/v7/x/staking/types" + "github.com/functionx/fx-core/v8/testutil/helpers" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/staking/precompile" + fxstakingtypes "github.com/functionx/fx-core/v8/x/staking/types" ) func TestStakingTransferSharesABI(t *testing.T) { diff --git a/x/staking/precompile/undelegate.go b/x/staking/precompile/undelegate.go index 8c42e8146..f704cd56b 100644 --- a/x/staking/precompile/undelegate.go +++ b/x/staking/precompile/undelegate.go @@ -17,10 +17,10 @@ import ( "github.com/ethereum/go-ethereum/core/vm" evmtypes "github.com/evmos/ethermint/x/evm/types" - fxcontract "github.com/functionx/fx-core/v7/contract" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/evm/types" - fxstakingtypes "github.com/functionx/fx-core/v7/x/staking/types" + fxcontract "github.com/functionx/fx-core/v8/contract" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/evm/types" + fxstakingtypes "github.com/functionx/fx-core/v8/x/staking/types" ) type UndelegateMethod struct { diff --git a/x/staking/precompile/undelegate_test.go b/x/staking/precompile/undelegate_test.go index fdbd6035c..289c808da 100644 --- a/x/staking/precompile/undelegate_test.go +++ b/x/staking/precompile/undelegate_test.go @@ -10,11 +10,11 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "github.com/functionx/fx-core/v7/contract" - testscontract "github.com/functionx/fx-core/v7/tests/contract" - "github.com/functionx/fx-core/v7/testutil/helpers" - "github.com/functionx/fx-core/v7/x/staking/precompile" - "github.com/functionx/fx-core/v7/x/staking/types" + "github.com/functionx/fx-core/v8/contract" + testscontract "github.com/functionx/fx-core/v8/tests/contract" + "github.com/functionx/fx-core/v8/testutil/helpers" + "github.com/functionx/fx-core/v8/x/staking/precompile" + "github.com/functionx/fx-core/v8/x/staking/types" ) func TestStakingUndelegateABI(t *testing.T) { diff --git a/x/staking/precompile/validator_list.go b/x/staking/precompile/validator_list.go index 2a8b386b1..d10d8777c 100644 --- a/x/staking/precompile/validator_list.go +++ b/x/staking/precompile/validator_list.go @@ -9,8 +9,8 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/core/vm" - "github.com/functionx/fx-core/v7/x/evm/types" - fxstakingtypes "github.com/functionx/fx-core/v7/x/staking/types" + "github.com/functionx/fx-core/v8/x/evm/types" + fxstakingtypes "github.com/functionx/fx-core/v8/x/staking/types" ) type ValidatorListMethod struct { diff --git a/x/staking/precompile/validator_list_test.go b/x/staking/precompile/validator_list_test.go index 761dde8f4..db1e60c1e 100644 --- a/x/staking/precompile/validator_list_test.go +++ b/x/staking/precompile/validator_list_test.go @@ -9,11 +9,11 @@ import ( "github.com/stretchr/testify/require" - "github.com/functionx/fx-core/v7/contract" - testscontract "github.com/functionx/fx-core/v7/tests/contract" - "github.com/functionx/fx-core/v7/testutil/helpers" - "github.com/functionx/fx-core/v7/x/staking/precompile" - "github.com/functionx/fx-core/v7/x/staking/types" + "github.com/functionx/fx-core/v8/contract" + testscontract "github.com/functionx/fx-core/v8/tests/contract" + "github.com/functionx/fx-core/v8/testutil/helpers" + "github.com/functionx/fx-core/v8/x/staking/precompile" + "github.com/functionx/fx-core/v8/x/staking/types" ) func TestValidatorListABI(t *testing.T) { diff --git a/x/staking/precompile/withdraw.go b/x/staking/precompile/withdraw.go index 43ada0f15..a21a7c5f8 100644 --- a/x/staking/precompile/withdraw.go +++ b/x/staking/precompile/withdraw.go @@ -14,9 +14,9 @@ import ( "github.com/ethereum/go-ethereum/core/vm" evmtypes "github.com/evmos/ethermint/x/evm/types" - fxcontract "github.com/functionx/fx-core/v7/contract" - "github.com/functionx/fx-core/v7/x/evm/types" - fxstakingtypes "github.com/functionx/fx-core/v7/x/staking/types" + fxcontract "github.com/functionx/fx-core/v8/contract" + "github.com/functionx/fx-core/v8/x/evm/types" + fxstakingtypes "github.com/functionx/fx-core/v8/x/staking/types" ) func WithdrawEmitEvents(ctx sdk.Context, delegator sdk.AccAddress, amount sdk.Coins) { diff --git a/x/staking/precompile/withdraw_test.go b/x/staking/precompile/withdraw_test.go index 77ccc44c4..71a6fb7fa 100644 --- a/x/staking/precompile/withdraw_test.go +++ b/x/staking/precompile/withdraw_test.go @@ -12,12 +12,12 @@ import ( distritypes "github.com/cosmos/cosmos-sdk/x/distribution/types" "github.com/stretchr/testify/require" - "github.com/functionx/fx-core/v7/contract" - testscontract "github.com/functionx/fx-core/v7/tests/contract" - "github.com/functionx/fx-core/v7/testutil/helpers" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/staking/precompile" - "github.com/functionx/fx-core/v7/x/staking/types" + "github.com/functionx/fx-core/v8/contract" + testscontract "github.com/functionx/fx-core/v8/tests/contract" + "github.com/functionx/fx-core/v8/testutil/helpers" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/staking/precompile" + "github.com/functionx/fx-core/v8/x/staking/types" ) func TestStakingWithdrawABI(t *testing.T) { diff --git a/x/staking/testutil/staking.go b/x/staking/testutil/staking.go index 34cd57e73..c45a1d5c5 100644 --- a/x/staking/testutil/staking.go +++ b/x/staking/testutil/staking.go @@ -6,7 +6,7 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/stretchr/testify/require" - fxstakingkeeper "github.com/functionx/fx-core/v7/x/staking/keeper" + fxstakingkeeper "github.com/functionx/fx-core/v8/x/staking/keeper" ) type StakingSuite struct { diff --git a/x/staking/testutil/staking_precompile.go b/x/staking/testutil/staking_precompile.go index f0fb10e50..90a40ed59 100644 --- a/x/staking/testutil/staking_precompile.go +++ b/x/staking/testutil/staking_precompile.go @@ -7,10 +7,10 @@ import ( "github.com/ethereum/go-ethereum/common" evmtypes "github.com/evmos/ethermint/x/evm/types" - fxcontract "github.com/functionx/fx-core/v7/contract" - "github.com/functionx/fx-core/v7/x/evm/testutil" - "github.com/functionx/fx-core/v7/x/staking/precompile" - fxstakingtypes "github.com/functionx/fx-core/v7/x/staking/types" + fxcontract "github.com/functionx/fx-core/v8/contract" + "github.com/functionx/fx-core/v8/x/evm/testutil" + "github.com/functionx/fx-core/v8/x/staking/precompile" + fxstakingtypes "github.com/functionx/fx-core/v8/x/staking/types" ) type StakingPrecompileSuite struct { diff --git a/x/staking/types/contract.go b/x/staking/types/contract.go index a08a12fbc..ea74732dc 100644 --- a/x/staking/types/contract.go +++ b/x/staking/types/contract.go @@ -9,7 +9,7 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" - "github.com/functionx/fx-core/v7/contract" + "github.com/functionx/fx-core/v8/contract" ) var ( diff --git a/x/staking/types/msg_test.go b/x/staking/types/msg_test.go index 1e6ad3f86..f4a88a29f 100644 --- a/x/staking/types/msg_test.go +++ b/x/staking/types/msg_test.go @@ -14,9 +14,9 @@ import ( "github.com/evmos/ethermint/crypto/ethsecp256k1" "github.com/stretchr/testify/require" - "github.com/functionx/fx-core/v7/app" - "github.com/functionx/fx-core/v7/testutil/helpers" - "github.com/functionx/fx-core/v7/x/staking/types" + "github.com/functionx/fx-core/v8/app" + "github.com/functionx/fx-core/v8/testutil/helpers" + "github.com/functionx/fx-core/v8/x/staking/types" ) func TestMsgGrantPrivilegeRoute(t *testing.T) { diff --git a/x/tron/keeper/grpc_query_test.go b/x/tron/keeper/grpc_query_test.go index 5a25d9cc3..b3ae7ecec 100644 --- a/x/tron/keeper/grpc_query_test.go +++ b/x/tron/keeper/grpc_query_test.go @@ -6,9 +6,9 @@ import ( sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/functionx/fx-core/v7/testutil/helpers" - "github.com/functionx/fx-core/v7/x/crosschain/types" - trontypes "github.com/functionx/fx-core/v7/x/tron/types" + "github.com/functionx/fx-core/v8/testutil/helpers" + "github.com/functionx/fx-core/v8/x/crosschain/types" + trontypes "github.com/functionx/fx-core/v8/x/tron/types" ) func (suite *KeeperTestSuite) TestKeeper_BatchFees() { diff --git a/x/tron/keeper/keeper.go b/x/tron/keeper/keeper.go index 6621d8240..c1c09a9d2 100644 --- a/x/tron/keeper/keeper.go +++ b/x/tron/keeper/keeper.go @@ -4,8 +4,8 @@ import ( "github.com/cometbft/cometbft/libs/log" sdk "github.com/cosmos/cosmos-sdk/types" - crosschainkeeper "github.com/functionx/fx-core/v7/x/crosschain/keeper" - "github.com/functionx/fx-core/v7/x/tron/types" + crosschainkeeper "github.com/functionx/fx-core/v8/x/crosschain/keeper" + "github.com/functionx/fx-core/v8/x/tron/types" ) type Keeper struct { diff --git a/x/tron/keeper/keeper_test.go b/x/tron/keeper/keeper_test.go index 22faecef5..899214698 100644 --- a/x/tron/keeper/keeper_test.go +++ b/x/tron/keeper/keeper_test.go @@ -15,12 +15,12 @@ import ( "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" - "github.com/functionx/fx-core/v7/app" - "github.com/functionx/fx-core/v7/testutil/helpers" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/crosschain/keeper" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" - tronkeeper "github.com/functionx/fx-core/v7/x/tron/keeper" + "github.com/functionx/fx-core/v8/app" + "github.com/functionx/fx-core/v8/testutil/helpers" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/crosschain/keeper" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" + tronkeeper "github.com/functionx/fx-core/v8/x/tron/keeper" ) type KeeperTestSuite struct { diff --git a/x/tron/keeper/msg_server.go b/x/tron/keeper/msg_server.go index f0cdf9573..df14a264a 100644 --- a/x/tron/keeper/msg_server.go +++ b/x/tron/keeper/msg_server.go @@ -8,9 +8,9 @@ import ( errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" - crosschainkeeper "github.com/functionx/fx-core/v7/x/crosschain/keeper" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" - trontypes "github.com/functionx/fx-core/v7/x/tron/types" + crosschainkeeper "github.com/functionx/fx-core/v8/x/crosschain/keeper" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" + trontypes "github.com/functionx/fx-core/v8/x/tron/types" ) var _ crosschaintypes.MsgServer = msgServer{} diff --git a/x/tron/keeper/msg_server_test.go b/x/tron/keeper/msg_server_test.go index 0f3ffc9db..64394018b 100644 --- a/x/tron/keeper/msg_server_test.go +++ b/x/tron/keeper/msg_server_test.go @@ -7,9 +7,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/evmos/ethermint/crypto/ethsecp256k1" - "github.com/functionx/fx-core/v7/testutil/helpers" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" - trontypes "github.com/functionx/fx-core/v7/x/tron/types" + "github.com/functionx/fx-core/v8/testutil/helpers" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" + trontypes "github.com/functionx/fx-core/v8/x/tron/types" ) func (suite *KeeperTestSuite) Test_msgServer_ConfirmBatch() { diff --git a/x/tron/module.go b/x/tron/module.go index 3ee318d08..e1783a293 100644 --- a/x/tron/module.go +++ b/x/tron/module.go @@ -13,11 +13,11 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - crosschaincli "github.com/functionx/fx-core/v7/x/crosschain/client/cli" - crosschainkeeper "github.com/functionx/fx-core/v7/x/crosschain/keeper" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" - "github.com/functionx/fx-core/v7/x/tron/keeper" - "github.com/functionx/fx-core/v7/x/tron/types" + crosschaincli "github.com/functionx/fx-core/v8/x/crosschain/client/cli" + crosschainkeeper "github.com/functionx/fx-core/v8/x/crosschain/keeper" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/tron/keeper" + "github.com/functionx/fx-core/v8/x/tron/types" ) // type check to ensure the interface is properly implemented diff --git a/x/tron/types/address.go b/x/tron/types/address.go index 1a2cc29b1..e2ee54e7c 100644 --- a/x/tron/types/address.go +++ b/x/tron/types/address.go @@ -9,7 +9,7 @@ import ( tronaddress "github.com/fbsobreira/gotron-sdk/pkg/address" "github.com/fbsobreira/gotron-sdk/pkg/common" - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" ) var _ crosschaintypes.ExternalAddress = tronAddress{} diff --git a/x/tron/types/address_test.go b/x/tron/types/address_test.go index 45077c835..11c4dc8ae 100644 --- a/x/tron/types/address_test.go +++ b/x/tron/types/address_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/functionx/fx-core/v7/x/tron/types" + "github.com/functionx/fx-core/v8/x/tron/types" ) func TestValidateTronAddress(t *testing.T) { diff --git a/x/tron/types/checkpoint.go b/x/tron/types/checkpoint.go index d70ba104a..e8583d073 100644 --- a/x/tron/types/checkpoint.go +++ b/x/tron/types/checkpoint.go @@ -8,8 +8,8 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/fbsobreira/gotron-sdk/pkg/abi" - fxtypes "github.com/functionx/fx-core/v7/types" - "github.com/functionx/fx-core/v7/x/crosschain/types" + fxtypes "github.com/functionx/fx-core/v8/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) // GetCheckpointOracleSet returns the checkpoint diff --git a/x/tron/types/genesis.go b/x/tron/types/genesis.go index 9ed9e4669..1554aecf5 100644 --- a/x/tron/types/genesis.go +++ b/x/tron/types/genesis.go @@ -1,7 +1,7 @@ package types import ( - crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" + crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" ) func DefaultGenesisState() *crosschaintypes.GenesisState { diff --git a/x/tron/types/key.go b/x/tron/types/key.go index e3390f1a6..1749be7bd 100644 --- a/x/tron/types/key.go +++ b/x/tron/types/key.go @@ -1,6 +1,6 @@ package types -import crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" +import crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" const ( // ModuleName is the name of the module diff --git a/x/tron/types/signer.go b/x/tron/types/signer.go index ebdb73947..a1a88ed75 100644 --- a/x/tron/types/signer.go +++ b/x/tron/types/signer.go @@ -7,7 +7,7 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/fbsobreira/gotron-sdk/pkg/address" - "github.com/functionx/fx-core/v7/x/crosschain/types" + "github.com/functionx/fx-core/v8/x/crosschain/types" ) const tronSignaturePrefix = "\x19TRON Signed Message:\n32"