Unanswered Questions
78 questions with no upvoted or accepted answers
9
votes
0
answers
104
views
What are the size limits of contract storage in ink?
Whilst reading the docs for ink I came across this warning:
CAUTION
If any type exhibiting Packed layout gets large enough (an ever-growing Vec might be a prime candidate for this), it will break ...
7
votes
0
answers
96
views
Why do clients have to hardcode the extra types in the registry?
Context: I'm experimenting with an H160-address based substrate and I'm doing it from scratch (it's not a moon* or frontier template fork).
It's reasonably trivial to make changes to the substrate ...
5
votes
0
answers
38
views
Cross-contract call failed with TransferFailed
After instantiating a contract using the CreateBuilder as shown here.
If I then try to call the contract using CallBuilder as shown here and use #[ink(message, payable)] in the callee message of the ...
5
votes
0
answers
98
views
I want to use Parity SCALE codec in Solidity? Is there any implementation of scale codec to decode bytes?
I want to decode bytes on the Solidity side that was decoded with scale codec.
Is the any implementation of scale codec (decode) on the Solidity side?
4
votes
0
answers
37
views
Is there a way to instantiate a contract from code_hash without ContractRef
From the documentation, we have 2 ways of instantiating a contract from a code_hash, but both require a ContractRef.
In order to obtain ContractRef we have to import the contract crate as a dependency ...
4
votes
0
answers
45
views
Migration from legacy HashMap to Mapping
I have following code where I want to use with new Mapping (now it works but with legacy HashMap). I think that the source code below is self-explanatory:
self.balances
.entry(caller)
...
4
votes
0
answers
83
views
Upload and Deploy code in Rococo Contract (Testnet) and Shibuya Testnet not working?
I am experimenting with cross contract with a combination of psp22 and psp37 in my project. But there is a problem when uploading json file and wasm file and deploying. It just shows the "...
3
votes
0
answers
39
views
Why is the index of a pallet a u32(usize) instead of u8 when queried?
I'm implementing a flow where I first ask what index a pallet has with the QueryPallet xcm instruction, and then construct a call to use with Transact.
I see that to construct manually an encoded call ...
3
votes
0
answers
37
views
How to use enum with associated value(s) in ink smart contract
I have an ink smart contract message that takes an enum as argument. The code is shown below;
#[derive(Encode, Decode)]
#[cfg_attr(
feature = "std",
derive(Debug, PartialEq, Eq, ...
3
votes
0
answers
53
views
After using set_code_hash to upgrade contract, when decode on the new Storage,why there wont has error of "Not enough data to fill buffer"
I'm learning how to upgrade ink! contract,and have some question:
Eg:old contractA, storage define is
#[ink(storage)
pub struct MyContract {
a: u32,
}
new contractB,storage define is
#[ink(...
3
votes
0
answers
32
views
ink dapp asking to sign transactions everytime i reload
so i am building a dapp with ink
it has messages to get data and put data
and on FE when i logged in with the polkadot-js extension wallet
everytime i reload the page it asks me to sign the ...
3
votes
1
answer
71
views
Can we define ink_e2e tests outside of contracts module?
devs. I am writing the e2e tests for my smart contracts using ink_e2e
In contracts, I define the e2e-tests like this.
#[openbrush::contract]
pub mod controller {
...
#[cfg(all(test, ...
3
votes
1
answer
89
views
Build the data bytes to query a contract with the api state_call
I would like to use the rpc call to query a contract.
I try to use the method "call" from the endpoint "state" with the first parameter "ContractsApi_call" but I am not ...
3
votes
1
answer
55
views
No caller has been set
I write tests for my smart contract and got this error:
no caller has been set
The error comes from: ink_engine-4.2.0/src/ext.rs:325:14. In function that I want to write tests I have following line:
...
3
votes
0
answers
33
views
How can I use complex structure in ink! version3
how can i use the complex structure(like Mapping<String, Vec<Map<String, String>>>) in ink!
#![cfg_attr(not(feature = "std"), no_std)]
use ink_lang as ink;
#[ink::...