Skip to content

Commit

Permalink
feat(wallet integration): pop up contract (#365)
Browse files Browse the repository at this point in the history
* feat(wallet-integration): server and API (#362)

* feat(wallet-integration): implement server and API

* feat(wallet-integration): add a few tests to server. Needs more

* refactor(wallet-integration): just use call_data, remove data types

* feat(wallet-integration): add frontend type for flexible serving

* feat(wallet-integration): StateHandler in WalletIntegrationManager. Add terminate method

* refactor(wallet-integration): move to module with pop-cli crate

* feat(wallet-integration): server-side error handling, update port to 9090

* refactor(wallet-integration): restructure server for easier use in thread

* fix(wallet-integration): remove invalid fn `finish`

* docs(wallet-integration): inline comments

* test(wallet-integration): unit tests for wallet-integration server. Add new frontend type

* feat(wallet-integration): two new routes: error and terminate

* refactor(wallet-integration): consistent comments, remove unnecessary code in tests

* feat: add TransactionData::new

* refactor(wallet-integration: shutdown channel error handling, terminate helper, take_error and TranscationData::new tests

* chore: clippy warning

* feat(up-contract): get call data for upload-only and pass to wallet integration -- PoC

* feat(up-contract): get call data for instantiate and pass to wallet integration -- PoC

* feat(up-contract): run server and pass call_data for signing -- PoC

* feat(up-contract): submit signed payload to node

* fix(up-contract): update to FrontendFromDir type

* refactor(pop-up): create functions for wallet integration, plus general cleanup

* chore: use git branch for cargo contract

* feat(pop-up-contract): better error handling and prompt displays

* chore(up-contract): outdated field name and clippy allow

* feat(up-contract): handle subxt events better, various improvements

* feat(up-contract): custom errors in contracts crate

* fix: minor fixes after rebase

* fix(up-contract): test compilation after rebase

* feat(up-contract): suri and use-wallet can't be used together

* refactor: wait for finalization

* feat(up-contract): serve HTML from string, fix deployment message on error, cors, and other misc. improvements (#380)

* docs: add function comments
  • Loading branch information
peterwht authored Dec 16, 2024
1 parent fd962e2 commit a0a8397
Show file tree
Hide file tree
Showing 9 changed files with 645 additions and 77 deletions.
24 changes: 12 additions & 12 deletions Cargo.lock

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

10 changes: 7 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,15 @@ subxt = "0.38.0"
ink_env = "5.0.0"
sp-core = "32.0.0"
sp-weights = "31.0.0"
contract-build = "5.0.0"
contract-extrinsics = "5.0.0"
contract-transcode = "5.0.0"
scale-info = { version = "2.11.4", default-features = false, features = ["derive"] }
scale-value = { version = "0.17.0", default-features = false, features = ["from-string", "parser-ss58"] }
# TODO: git deps
#contract-build = "5.0.0-alpha"
contract-build = { git = "https://github.com/use-ink/cargo-contract", branch = "peter/chore-make-types-pub" }
#contract-extrinsics = "5.0.0-alpha"
contract-extrinsics = { git = "https://github.com/use-ink/cargo-contract", branch = "peter/chore-make-types-pub" }
#contract-transcode = "5.0.0"
contract-transcode = { git = "https://github.com/use-ink/cargo-contract", branch = "peter/chore-make-types-pub" }
heck = "0.5.0"
hex = { version = "0.4.3", default-features = false }

Expand Down
4 changes: 3 additions & 1 deletion crates/pop-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,13 @@ pop-common = { path = "../pop-common", version = "0.5.0" }

# wallet-integration
axum.workspace = true
tower-http = { workspace = true, features = ["fs"] }
tower-http = { workspace = true, features = ["fs", "cors"] }

[dev-dependencies]
assert_cmd.workspace = true
predicates.workspace = true
subxt.workspace = true
subxt-signer.workspace = true

[features]
default = ["contract", "parachain", "telemetry"]
Expand Down
134 changes: 134 additions & 0 deletions crates/pop-cli/src/assets/index.html

Large diffs are not rendered by default.

Loading

0 comments on commit a0a8397

Please sign in to comment.