![](/img/trans.png)
[英]How to deploy contract with polkadot.js
我用 polkadot.js 實現了一個前端應用程序。 我想從前端應用程序部署合同。 我按如下方式實現了代碼,但它不起作用並且出現錯誤。 請幫我。 代碼是: 錯誤是: ...
[英]How to deploy contract with polkadot.js
我用 polkadot.js 實現了一個前端應用程序。 我想從前端應用程序部署合同。 我按如下方式實現了代碼,但它不起作用並且出現錯誤。 請幫我。 代碼是: 錯誤是: ...
[英]How to get the value corresponding to solidity "tx.origin" in substrate ink?
我正在執行一個從合同 A 調用合同 B 的合同。 現在alice通過合約A調用了合約B。我想知道是alice調用了這個合約B。我能得到嗎? 如果你像上面那樣在合約 B 中獲得調用者,它的值將是合約 A 的合約地址。 我想得到一個類似於solidity的“tx.origin”的值。有可能嗎? ...
[英]metis example has an error [Mismatching versions of `parity-scale-codec` were found!]
我想嘗試用“patractlabs/metis”編譯智能合約。 首先,我下載了示例項目並嘗試編譯。 但是我收到如下錯誤。 我從“https://github.com/patractlabs/metis/tree/master/example”下載 請讓我知道如何解決此錯誤。 ...
[英]How to deposit into an Ink! Smart Contract
我對將使用 Ink 實施的智能合約有一些想法。 在基板上。 這些想法中的大多數都涉及調用者向智能合約中存入無限期持有的款項,然后調用者可能會在未來的某個時間點取款,具體取決於其他因素。 我找到了一個允許調用者退出智能合約的例子: https://github.com/paritytech/ink/ ...
[英]Rust ink, Unable to use imported module due an "unresolved import" error
我正在嘗試使用我正在處理的 SWAP 項目中存儲在本地存儲中的自定義 ERC20 合約。 我在 SWAP 合約中嘗試使用 erc20 導入時遇到的錯誤: 以下是我在 SWAP.rs 中導入 erc20 模塊的方法: 這就是我在 SWAP.rs.toml 文件中導入 ERC20 模塊的方式: 我還在 ...
[英]Rust ink, cross contract call returns ConctractTrapped error
正如標題所暗示的那樣,我試圖在已部署的合同上調用 function,並返回一個非常簡單的字符串 function。 已部署合約 1 function: 下面的代碼片段是contract2 function,從contract1返回值: ...
[英]canvas-ui error when uploading flipper.contract during substrate ink-workshop
上傳 wasm 二進制文件時,作為“ink-workshop”上的已編譯智能合約 - 我正在運行的canvas-ui只是錯誤。 畫布用戶界面錯誤: 步驟:“拖動包含捆綁的 wasm blob 的 flipper.contract 文件....” 相關的 Github 問題部分是只讀的,因此我在這里 ...
[英]polkadot canvas testnet contract deploy error "contracts.contractTrapped"
我正在嘗試在 rococo canvas 上部署基本的 erc20 示例合同,但在部署時彈出“contracts.ContractTrapped”錯誤? 任何提示將不勝感激,謝謝! ...
[英]How do I call an existing contract from another contract in rust-ink?
我有兩個非常基本rust-ink dapp 合約: 應用程序 1 Dapp 1 將toml指定為 toml 中的依賴項: dapp2 = { version = "3.0.0-rc7", path ="../dapp2", default-features = false, features = ...
[英]How can I set a caller in ink! contract unit testing function?
我正在為do_check函數編寫一個測試函數。 在這里,我想設置一個呼叫者,但不知道該怎么做。 請幫我 ...
[英]How can I query contract info with the latest polkadot-js and substrate contracts node?
由於使用api.query.contracts.contractInfoOf時Unable to create Enum via index 128, in Alive, Tombstone我最近無法查詢我現有的合同。 我在命令行和 polkadot-js 應用程序資源管理器中都收到此錯誤。 這些 ...
[英]When using Flutter Container, everything ok but no ripple effect - but Ink draws beyond its parent
我想在 singlechildscrollview 中提供一些按鈕 Column( children: < Widget > [ SizedBox(height: constraints.maxHeight / 8.0), AnimationConfiguration.staggere ...
[英]error[E0412]: cannot find type `String` in this scope
錯誤: serial_code: String | ^^^^^^ not found in this scope ...
[英]Generated code hash at ink smart contract deployment
放置墨水后! 使用https://paritytech.github.io/canvas-ui在 canvas-node 上的智能合約,創建的代碼哈希代表什么以及它的用途是什么? ...
[英]How can I get a `PairSigner` for my Polkadot account from a Rust client using substrate-subxt?
我有一個 Rust CLI,我使用此代碼https://github.com/paritytech/substrate-subxt/blob/master/examples/submit_and_watch.rs將余額從一個帳戶轉移到另一個帳戶。 PairSigner是通過let signer ...
[英]HashMap of AccountId tuple and ink_storage::collections::Vec
我想用墨水創建一個HashMap存儲項!。 並初始化它: 我遇到了這個錯誤信息 性狀PackedLayout不落實的`ink_storage :: VEC ...
[英]How do you pass and handle arguments to a `ChainExtension`?
我有ink! 調用擴展方法fetch_random()合約。 // runtime/src/lib.rs pub struct FetchRandomExtension; impl ChainExtension<Runtime> for FetchRandomExtension { ...
[英]How to define own struct on substrate ink
我想知道如何定義自己的結構。 我提到了基材墨水! 樣品,但我找不到它。 ...
[英]When execute Delegator example, I get a "ContractTrapped" error
建立委托合同... Git 克隆“https://github.com/paritytech/ink.git”。 移動“示例/委托人”。 使用“build-all.sh”構建合約。 部署和執行使用 Contract Pallet 執行 Substrate-Node-Template。 訪問 Pol ...
[英]How do you test cross-contract calling with Substrate using `ink!`?
給定一個使用ink! ,如何運行實例化兩個合同的單元測試? “根” MyContract 其他OtherContract 委托人示例還代表了多個合約的游樂場。 ...