Questions tagged [smart-contract]
Everything smart contract related, either WASM or EVM based.
284 questions
2 votes
1 answer
36 views
Purpose of `value` param in `pallet-contracts::call` extrinsic?
Why is the value parameter (of some Balance type) required in the call extrinsic of pallet-contracts? The data parameter seems to handle all the business, why does value need its own thing? Function ...
0 votes
1 answer
26 views
How can I execute smart contract functions using Rust or Golang instead of JavaScript in a Substrate/Polkadot environment?
I'm working with the polkadot-sdk-solochain-template and have successfully executed contract calls using JavaScript (via polkadot‑js). However, I'm facing challenges when trying to call smart contract ...
0 votes
0 answers
7 views
Manipulate time in test suits
ink::env::test::set_block_timestamp doesn't work in e2e setting. What's the proper way of testing timed contracts in that case? I can't isolate particular contract to test without cross-contract ...
1 vote
0 answers
13 views
OpenBrush and RMRK-Ink updates? [closed]
I had been looking around for tools to aid my ink! smart contract development. I had found OpenBrush from BrushFam and RMRK-ink to be a great resources.But seem like they haven't got any updates since ...
1 vote
1 answer
24 views
Security when instantiate Smart Contract
i am new to smart contract development and i decide to use Ink as a way to learn more about blockchain and Dapps. I was curious about what if an unauthorized actor could instantiate a new instance of ...
1 vote
1 answer
48 views
Call read only ink contract functions from subxt
How do i do something like cargo contract call --contract --message get --suri //Alice in subxt or from a rust backend the docs in subxt focus mostly on signing and submitting txs and events hence ...
1 vote
0 answers
22 views
Help with indexing smart contract events
Was having a hard time with subxt and indexing smart contract events hence asking for help I want to look for an event on a specific smart contract i deployed can someone help provide some existing ...
2 votes
1 answer
25 views
How to properly send a bare_call from a pallet to a smart contract
I'm trying to make a pallet -> contract call, using the bare_call function. pub fn call_smart_contract( origin: OriginFor<T>, dest: T::AccountId, mut ...
1 vote
1 answer
32 views
Creation of a smart contract in contracts pallet
I need to create a smart contract using contracts pallet. I look at the source code of the contracts pallet and see: pub fn upload_code( origin: OriginFor<T>, code: Vec<u8>, ...
0 votes
1 answer
21 views
openbrush::implementation(PSP34Ownable) not implemented!
when building I get this error: error: custom attribute panicked | 4 | #[openbrush::implementation(PSP34, PSP34Ownable, PSP34Mintable, PSP34Enumerable, PSP34Metadata)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...
1 vote
1 answer
75 views
error: System.ExtrinsicFailed: NoProvider when deploying smart contract
I just installed pallet-contracts on my Frontier node. From the Polkadot js app interface, I can send transactions with tokens without problems, but if I try to deploy a new smart contract (inside ...
0 votes
1 answer
60 views
How can I properly use scale::Decode to get consistent results?
I'm trying to process a result from a contract call using what's here. It works totally fine when I'm trying to get a u32 result from an ink_e2e test. E.g. // -- Snip -- let number_of_items = client ...
2 votes
1 answer
43 views
How to impl FindAuthor<H160> with Babe
I want add pallet-evm in my substrate node. and my substrate node use Babe instead of Aura. How can I Impl FindAuthor whih Babe ? this is the example of Aura. I want to impl it with Babe pub struct ...
0 votes
1 answer
41 views
getting CouldNotReadInput while creating cross invocation call when passing Vec<u8> as argument
This is how i am trying to invoke call.. where Bytes is Vec<u8> let res = build_call::<DefaultEnvironment>() .call(handler_acc_id) .exec_input( ...
1 vote
0 answers
15 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 ...