Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove usage of globals from 08-wasm #6103

Merged
merged 24 commits into from
Apr 10, 2024

Commits on Apr 3, 2024

  1. Move functionality from client state methods to light client module m…

    …ethods.
    
     - Yank all statements and delete functions as needed.
     - Make any required functions from types/ public.
     - Add the vm in the 08-wasm keeper.
     - Update documentation to include documentation of deleted functions.
    DimitrisJim committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    6dc7fa9 View commit details
    Browse the repository at this point in the history
  2. Remove global VM, introspection to retrieve client identifier.

     - Refactor signatures to explicitly pass vm, client identifier for time being.
     - Refactor tests to conform with new signatures.
     - Replace occurences of `ibcwasm.GetVM` in other keeper functions.
    DimitrisJim committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    8ec8bf6 View commit details
    Browse the repository at this point in the history

Commits on Apr 4, 2024

  1. Move migrateContract from clientState to keeper method.

    - Matches moves for other functions.
    - Move is required to address future circular dependency for state management (keeper would import types and types would import keeper)
    - Rm migrate_contract(test).go files.
    DimitrisJim committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    c3ddc51 View commit details
    Browse the repository at this point in the history
  2. Move state management to keeper.

    - Remove globals for state (Checksums)
    - Move access functions from types to keeper, move tests.
    - Update calls using global to instead go through keeper.
    DimitrisJim committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    6e9d4a6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5cc45a4 View commit details
    Browse the repository at this point in the history
  4. Remove pending todo in test for migrate contract.

    This previously was testing a function that didn't set the client state after calling the contract (invoking through the keeper
    always sets a client state after contract invocation). Hence, even if we don't set explicitly in the migrateFn callback, we _still_ get
    a client state in the end.
    DimitrisJim committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    139c806 View commit details
    Browse the repository at this point in the history

Commits on Apr 5, 2024

  1. Configuration menu
    Copy the full SHA
    f3a7aae View commit details
    Browse the repository at this point in the history

Commits on Apr 7, 2024

  1. Configuration menu
    Copy the full SHA
    6f5616a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7373de0 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1692f8b View commit details
    Browse the repository at this point in the history

Commits on Apr 8, 2024

  1. Configuration menu
    Copy the full SHA
    5127126 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    57c2235 View commit details
    Browse the repository at this point in the history
  3. refactor: remove queryRouter global variable

     - Move into the func for creating new plugins, pass it to acceptStargateQuery directly. This is probably what wasmd did (see they don't accept a query router now?).
       Since we don't use the get elsewhere, this was the smallest diff for a globa.
     - Preemptively ran make lint-fix, gotcha linting crybaby.
    DimitrisJim committed Apr 8, 2024
    Configuration menu
    Copy the full SHA
    12c34cb View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    151a546 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    f679ccf View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    e726ce9 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    480fcf8 View commit details
    Browse the repository at this point in the history
  8. Make migrateContractCode a private function, clean up uneeded export …

    …in export_test.go for types/.
    DimitrisJim committed Apr 8, 2024
    Configuration menu
    Copy the full SHA
    d614a93 View commit details
    Browse the repository at this point in the history
  9. refactor: Move vm entrypoints to keeper.

    - Remove generic types and do unmarshalling in light client methods.
    - Move all functions onto keeper and adjust call sites.
    DimitrisJim committed Apr 8, 2024
    Configuration menu
    Copy the full SHA
    8e6b567 View commit details
    Browse the repository at this point in the history
  10. chore: address some testing todos. Move testing unmarshal failure cas…

    …e to light client tests.
    DimitrisJim committed Apr 8, 2024
    Configuration menu
    Copy the full SHA
    2aea36f View commit details
    Browse the repository at this point in the history
  11. chore: additional tiny nits.

    - Consistently use wasmClientKeeper as local var name.
    - Reorg keeper fields slightly.
    - Rm 'vm.go' which was already empty.
    DimitrisJim committed Apr 8, 2024
    Configuration menu
    Copy the full SHA
    23decca View commit details
    Browse the repository at this point in the history

Commits on Apr 9, 2024

  1. Configuration menu
    Copy the full SHA
    f23bc7c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2836073 View commit details
    Browse the repository at this point in the history

Commits on Apr 10, 2024

  1. Configuration menu
    Copy the full SHA
    76d8055 View commit details
    Browse the repository at this point in the history