Unanswered Questions
28 questions with no answers
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 ...
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::...
3
votes
0
answers
32
views
How to migrate / backup & restore ink smart contract storage?
Is there a way to backup ink smart contract storage and later restore on another chain? Lets say we have chain with 3 validators and deployed smart contract containing certain information in its ...
2
votes
0
answers
54
views
Deployment of contract and calling its function is taking too much fees
I have configured the transaction fees to be approximately 40. However, when deploying a smart contract on an EVM-compatible chain, the fees amount to be 2300, and when calling this function, the ...
2
votes
0
answers
17
views
How can I mint new token from ink smart contract calling pallet-balances function?
How can I mint a new native token (not a custom token) from the ink smart contract calling one of the functions from pallet-balances pallet?
2
votes
0
answers
52
views
How to upload the same ink! smart contract to a different code hash?
I've written this ink! quickstart script that I can repeatedly call to run these steps to flood my local testnet with instances of Flipper contracts:
Kills an existing substrate-contracts-node ...
2
votes
0
answers
36
views
Error Type { registry: TypeRegistry {}, initialU8aLength: 6 } when try to query ink! smart contract by @polkadotjs/api-contract
My code:
const main = async() => {
//Get wasm
// This file wasm I already build through "cargo contract build"
let wasm = fs.readFileSync("../../res/incrementer.wasm&...
1
vote
0
answers
14
views
How To Increase Static Buffer Size in Ink 5.0 Contract
In Ink 5.0, the Static Buffer size can be increased. Does anyone know HOW to do that? This PR mentions several methods they were considering: https://github.com/paritytech/ink/pull/1869
I tried the ...
1
vote
0
answers
14
views
What happens to smart contracts when breaking changes are introduced to ink?
I've seen breaking changes mentioned in this issue for upgrading set_code_hash.
This got me thinking, what happens to existing contracts when a breaking change to ink is introduced?
For example, we're ...
1
vote
0
answers
23
views
"ContractTrapped" Error even with successful cross-contract call
let result_call = ink::env::call::build_call::<Environment>()
.call(self.escrow_address)
.gas_limit(0)
.transferred_value(0)
...
1
vote
0
answers
44
views
What could be the reason for my contract throwing "ContractTrapped"? Other cross contract calls are successful, but not in this code
The force_vote function in voting contract places a call to a different contract easily, but when I want to get some data from the other contract as well, it fails. Similarly in the function where the ...
1
vote
0
answers
21
views
error build_call
#[ink(message)]
pub fn get_flip2_buill_call(&mut self, token_contract_address: AccountId, account_id: AccountId )-> i32 {
let my_return_value = build_call::<DefaultEnvironment>()
...
1
vote
0
answers
31
views
How to curl `ink!` contract storage?
I'm trying to use curl to query an ink contract's storage using the RPC of substrate. I've looked at the below question
How do I call the RPC method `contractInfoOf` using curl?
but it does not ...
1
vote
0
answers
25
views
How to resolve "mismatched types" error while ink_e2e test : expected String, found Vec<u8>
I am working with ink_e2e testing framework in ink smart contract, and I have encountered an error message that's a bit confusing. The error says: mismatched types - expected String, found Vec<u8&...