Skip to content

Commit

Permalink
feat: guide user to call a contract (#306)
Browse files Browse the repository at this point in the history
* feat: guide user for calling a contract

* feat: get metadata contract from the contract path

* refactor: refactor test and validate address input

* fix: apply feedback

* feat: prompt to have another call and skip questions for queries

* refactor: use Cli module instead of cliclack

* test: unit test pop-cli crate

* test: unit contracts crate

* chore: format

* test: refactor and improve test cases

* fix: fix todos and refactor

* test: fix unit test

* feat: parse types of parameters and display it to the user in the placeholder

* refactor: error handling for pop call

* refactor: display call to be executed after guide and reorder

* refactor: when repeat call use same contract values and dont clean screen

* test: add dry-run test

* test: refactor and add more test coverage

* test: more coverage

* fix: unit test

* feat: dev mode to skip certain user prompts

* refactor: test functions, renaming and fix clippy

* refactor: improve devex of pop call contract

* test: adjust tests to refactor

* chore: reset_for_new_call fields

* fix: build contract if has not been built

* refactor: use command state (#338)

Merged set_up_call_config and guide_user_to_call_contract into a single function. Also adds short symbols for arguments.

* fix: parse user inputs for Option arguments (#332)

* fix: automatically add some or none to Option argument

* test: refactor and tests

* refactor: improve code and comments

* fix: renaming and clean code

* chore: option params not mandatory

* fix: parse user inputs for Option arguments in constructor (#335)

* fix: automatically add some or none to Option argument

* fix: tests

* refactor: process_function_args

* test: update tests accordingly last changes

* fix: issue with delimiter

* test: fix unit test

* refactor: renaming and fix comments

* refactor: format types (#339)

Shows the full type representation, making it easier to see the entry format of parameter values.

* fix: logo doesn't show in README

---------

Co-authored-by: Frank Bell <[email protected]>
Co-authored-by: Alejandro Martinez Andres <[email protected]>

* test: fix unit test

* feat: allow users to specify custom contract metadata files (#347)

* chore: allow the user specify the metadata file to call a contract

* test: unit test to parse metadata from a file

* docs: fix docs

* refactor: ensure_contract_built after user input path

* fix: call contract when metadata file

* fix: remove default_input in contract address

* docs: rename metadata with artifact

* fix: panic at has_contract_been_built

* fix: clippy

* refactor: keep ensure_contract_built as a CallContractCommand function

* fix: ensure_contract_built

* docs: improve comments

* fix: feedback and include wasm file for testing

* fix: clippy

* chore: after build contract prompt the user if the contract is already deployed

* refactor: ensure_contract_built

* refactor: has_contract_been_built function

* docs: fix comments and messages

* refactor: get_messages and get_constructors

* test: fix unit tests call ui

---------

Co-authored-by: Frank Bell <[email protected]>
Co-authored-by: Alejandro Martinez Andres <[email protected]>
  • Loading branch information
3 people authored Nov 29, 2024
1 parent 258a4b2 commit ef3594d
Show file tree
Hide file tree
Showing 17 changed files with 2,562 additions and 201 deletions.
12 changes: 7 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ sp-core = "31"
sp-weights = "30"
contract-build = "5.0.0-alpha"
contract-extrinsics = "5.0.0-alpha"
contract-transcode = "5.0.0-alpha"
scale-info = { version = "2.11.3", default-features = false, features = ["derive"] }
heck = "0.5.0"

# parachains
Expand Down
Loading

0 comments on commit ef3594d

Please sign in to comment.