Skip to main content

Questions tagged [substrate-contracts-node]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
33 views

connecting to local substrate-contracts-node with polkadotjs api

I'm running the substrate-contracts-node 0.40.0-17065f31ac4 with the command ./artifacts/substrate-contracts-node-linux/substrate-contracts-node --log info,runtime::contracts=debug , and am trying to ...
ytresza's user avatar
  • 63
0 votes
0 answers
13 views

Can't integrate NFTs pallet into latest version of substrate-contracts-node

I'm using the substrate-contracts-node as the base of my node. And I'm now trying to integrate the NFTs pallet into runtime and parachain-runtime. I have managed to do this successfully with earlier ...
Arjan van Eersel's user avatar
0 votes
0 answers
24 views

Can't get ChainExtension's caller address right

I'm trying to build a ChainExtension, so that my pallet can deal with invocations from Ink! smart contracts. The problem is that I can't get the address right. Here is that part of the chain extension ...
Arjan van Eersel's user avatar
3 votes
0 answers
48 views

Explorer compatibility with blockchain node version v1.0.0

The issue I ran in is finding an explorer version, which is compatible with substrate version v1.0.0. I found that version of explorer below v0.133.1 (https://github.com/polkadot-js/apps/releases/tag/...
Raid Ateir's user avatar
1 vote
0 answers
21 views

"EVM front tier remote code execution vulnerability"

Anyone using the latest EVM frontTier Pallet their - seems to be a possibility for a remote attacker to exploit your nodes remotely and control the nodes and every other nodes within your system, that'...
simon 's user avatar
  • 11
0 votes
1 answer
46 views

I have an error while compiling the substrate node

I got this error after trying to install the substrate-contract-node : 1) I download rustc rustc --version rustc 1.75.0 (82e1608df 2023-12-21) 2) I cloned the repo I followed the instruction to ...
castle_chain's user avatar
1 vote
0 answers
56 views

I want to clone a stable coin project in Rust but having a lot of errors

I am facing too much errors when I clone this project, I want to create a stable coin in substrate I found this repository https://github.com/1010adigupta/ink-Stable-Coin But after installing rust ...
Shah Dost's user avatar
0 votes
0 answers
15 views

How to test smart contract timestamp dependent behavior?

how can I test block_timestamp-dependent smart contract behavior? The substrate contact node doesn't allow block_timestamp manipulations. For context, in the EVM ecosystem, one can use hardhat helpers ...
Yrefef's user avatar
  • 75
0 votes
1 answer
77 views

contracts-ui cannot connect to local node

When following ink getting started tutorial at https://use.ink/getting-started/running-substrate I am stuck at one of the steps. After starting contracts node in dev mode with the following command: ...
jangorecki's user avatar
0 votes
1 answer
62 views

substrate contracts node compilation failed

Following https://use.ink/getting-started/setup#2-build-it-yourself cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git --tag v0.23.0 --force --locked gives ...
jangorecki's user avatar
2 votes
0 answers
62 views

Deploy ink! contracts with unified accounts

I have a chain similar to mentioned in this question, where I'm trying to deploy ink! smart contracts. I'm setting my Environment like this: use ink::env::{Environment, DefaultEnvironment}; use ...
Discardo's user avatar
  • 436
0 votes
0 answers
23 views

Encountering Error "Encountered Unknown Ink! attribute argument: path" in Ink! Smart Contract

I am working on an Ink! smart contract in Rust, and I've encountered an error that I'm having trouble resolving. I followed a solution from a source [provide link here if applicable], but the problem ...
the dev's user avatar
  • 477
1 vote
0 answers
17 views

RelaychainwithChainbridge

We have tried to connect my relay chain with Chainbridge, but I got errors (SUB to ETH and ETH to SUB). I could not replace the existing relay chain with my relay chain. Please let me know the ...
support's user avatar
  • 135
1 vote
2 answers
70 views

Getting error for running the substrate-contracts-node

first I installed the substrate contract node from this command cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git from paritytech GitHub I got too many ...
samyakt's user avatar
  • 11
1 vote
1 answer
40 views

What happens to legacy contracts given breaking changes to cargo-contract v3?

In the cargo contract v3 release, breaking changes were made for how contracts are built (cdylib -> bin) and specifying no_main. I've found that cargo contract v2 produces contracts compatible with ...
goastler's user avatar
  • 569
1 vote
2 answers
105 views

Not able to upload contract in substrate node template

I have added pallet-contract in our chain. Build contract works fine and run chain in dev mode also works fine. But when I try to deploy contract it doesn't work and doesn't throw any error. Can ...
Ganesh11's user avatar
  • 1,241
0 votes
1 answer
39 views

block time_stamp return value

When using block_timestamp to return value, why it's return 1,690,534,220,344 value? Someone please explain me what is the meaning of this value? #[ink(message)] pub fn abc(&self) -> u64 { ...
Ganesh11's user avatar
  • 1,241
0 votes
0 answers
36 views

the trait `StorableHint<ManualKey<1648493478>>` is not implemented

Can someone please help me figure our this issue? error[E0277]: the trait bound `ink::storage::Mapping<(ink::ink_primitives::AccountId, u64), u64, RequestUnstakingTimeKey>: StorableHint<...
Ganesh11's user avatar
  • 1,241
2 votes
1 answer
70 views

Generate random number ink!

I am writing ink! contract to generate random number between min and max value. I found this article. Here we can generate random number between 0 to 99. Then I modified to generate random number ...
Ganesh11's user avatar
  • 1,241
0 votes
1 answer
27 views

Could not find `CollectiveEvents` in `pallet_contracts`

Error: const CONTRACTS_EVENTS: pallet_contracts::CollectEvents = ^^^^^^^^^^^^^ not found in `pallet_contracts Cargo.toml File pallet-contracts = { version ...
Abubakar Mujahid's user avatar
0 votes
1 answer
53 views

How to deploy a contract on your chain

Hi i have cloned the node-template and also added the pallet-contract in it, now i want to know that how can i deploy a smart contract on my chain i have also deployed it on EC2 instance but i want to ...
Abubakar Mujahid's user avatar
2 votes
2 answers
1k views

What is the purpose of installing cargo-contract and using it to create Ink! Rust smart contracts?

What's the deal with installing cargo-contract to make Ink! Rust smart contracts? Is it the contract compiler, or is it ructc? Why do we even need it?
the dev's user avatar
  • 477
2 votes
0 answers
47 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 ...
Luke Schoen's user avatar
  • 2,332
1 vote
1 answer
72 views

Explain components of Mapping used by Openbrush. Mainly placeholders for the actual type used in the code. Like ApprovalsKey used in bellow example

I am trying to understand the working of upgradeble storage used by openbrush libraries. I am unable to understand Mapping used in impls of psp34 trait eg pub operator_approvals: Mapping<(Owner,...
the dev's user avatar
  • 477
1 vote
1 answer
46 views

Why we use empty struct named as key of particular lib name in mapping while using it in storage of openbrush libraries

When you go through the openbrush smart contract library. You will notice they are using upgradeable smart contract storage and while defining storage they are using some empty struct as key of ...
the dev's user avatar
  • 477
2 votes
1 answer
89 views

Error calling smart contract with py-substrate-interface

I am using substrate-contracts-node. I've uploaded and instantiated the smart contract. I would like to interact and query the function using py-substrate-interface. However, I ran into an error while ...
BHappy's user avatar
  • 45
2 votes
1 answer
67 views

Replacing Endowed Account Address in a Local Substrate Blockchain: A Tutorial

Hello Substrate community! If you have been following the tutorial on building a local blockchain using Substrate, you may have noticed that your address is hard-coded in a JSON file. To replace your ...
support's user avatar
  • 135
2 votes
2 answers
240 views

Do ink compiler automatically generate getter function for state variable ( if declared as public ) like solidity language?

In the case of solidity language - In smart contracts, state variables can be made public to allow for easy access and visibility of the data stored in the contract. When a state variable is declared ...
the dev's user avatar
  • 477
3 votes
1 answer
131 views

bridge substrate solo chain to parachain

I am trying to bridge a solo substrate chain to a parachain . I am very new to this. I came across the parity-bridges-common repo (https://github.com/paritytech/parity-bridges-common) . I was able to ...
Neo's user avatar
  • 323
2 votes
1 answer
75 views

How to run ink! e2e tests in GitHub CI

The directory structure for my project is something like this ink - contract runtime node and so on I want to run the contract ink/contract e2e tests in GitHub CI using my own node instead of the ...
Discardo's user avatar
  • 436
5 votes
1 answer
178 views

trait bounds not satisfied with Executive::try_runtime_upgrade()

I'm attempting to integrate try-runtime into substrate-contracts-node and I get the following error when I call Executive::try_runtime_upgrade(): Compiling contracts-node-runtime v0.24.0 (/Users/bruno/...
Bruno's user avatar
  • 8,365
1 vote
3 answers
118 views

Unable to deploy the open-brush contracts build using toolchain nightly-2023-02-07 on substrate node

As you can see in following link . I was not able to build contract using latest rust nighly ( rustc 1.70.0-nightly (17c116721 2023-03-29)) toolchain. ERROR: Loading of original wasm failed I got the ...
the dev's user avatar
  • 477
2 votes
1 answer
123 views

Can I deploy an old ink! v3.x contract on the latest version of substrate/polkadot (pallet-contracts >= polkadot-v0.9.37)?

I have old smart contracts written in ink! v3.x, and I need to update the substrate version (including pallet-contracts) to >= polkadot-v0.9.37. After the update, I'll need to redeploy my smart ...
Yahor Tsaryk's user avatar
1 vote
1 answer
17 views

Substrate node tempalate Facing error converting chainSpec.json to raw format

I am using substrate node-template for my blockchain, I want run with my own accounts, for some reason below code converting chainSpec.json raw format is throwing error. macOS: : Apple M1 pro Ventura ...
nagaraj's user avatar
  • 199
1 vote
2 answers
267 views

How to add evm and ethereum pallet from scratch into substrate node?

I want to add evm pallet and ethereum pallet into my substrate node from scratch, so how I can do that.
neeraj's user avatar
  • 41
3 votes
1 answer
52 views

Substrate node template fees deduction using native token

I have create blockchain using substrate-node-template with aura consensus and which contains own native coin and I have created stable-coin using pallet-contract. This stable token is contract, ...
nagaraj's user avatar
  • 199
1 vote
2 answers
75 views

Issue with adding a smart contract address to a DEX pallet in a Substrate-based node

I am facing an issue while creating a DEX pallet that allows a user to create a their tokens contract and add it to my DEX in a Substrate-based node. I am using the substrate-node-contract to upload ...
Mr Coder's user avatar
  • 923
0 votes
1 answer
35 views

Can I make a cross-contract call with constructor (function with "#[ink(constuctor)]" attribute) in ink! contract?

I've been trying to implement cross contract calls in constrcutor but somehow I can't seem to make it right. Is the following code executable? #[openbrush::contract] pub mod contract { #[ink(storage)...
linnefromice's user avatar
2 votes
1 answer
452 views

Failed to instantiate a new WASM module instance: Limit of 32 concurrent instances has been reached

The Problem I recently switched from polkadot-v0.20.0 to polkadot-v0.37.0 in order to support V4 Ink Smart contracts. But I am encountering the following error using the npm package @polkadot/api when ...
BRNHINLT's user avatar
  • 132
2 votes
1 answer
73 views

Error running e2e tests on flipper

I have the substrate-contracts-node running and I run the following command on the flipper contract: cargo test --features e2e-tests Results in the following error: running 4 tests test flipper::...
Bruno's user avatar
  • 8,365
1 vote
1 answer
492 views

Substrate node-template Compiling sp-externalities error: cannot find macro `thread_local` in this scope

When I am trying to build substrate node-template, cargo build below error occurs. How to solve this issue. system : Apple M1 Pro OSX : Ventura 13.2.1 rustup show installed toolchains -----------------...
nagaraj's user avatar
  • 199
0 votes
1 answer
94 views

Getting error after runtime upgrade

I am trying to upgrade the version of substrate on my running blockchain from version v0.9.25 to v0.9.36, everything is fine but after runtime upgrade my terminal shows this [869] 🏊‍♂️ Running ...
Akash Singh's user avatar
1 vote
2 answers
96 views

While executing contracts functions getting out of gas error

I have deployed a wasm smart contract on chain using version polkadot-v0.9.36, after deploying the contract when I tried to execute its function i got error out of gas as shown below. When I tried ...
Shubham Gupta's user avatar
0 votes
2 answers
196 views

What is the cause of this contracts.ContractTrapped error?

I have had two contracts (A, B), where contract a calls a function on contract b, when contract a is deployed. This works fine up to a certain point where I receive a contracts.ContractTrapped error (...
BRNHINLT's user avatar
  • 132
0 votes
1 answer
69 views

Calling ink! contracts not working

I have been trying to call the flipper ink! contract from polkadot.js contracts section I keep getting this error. I've build the smart contract using cargo +nightly contract build and am using ink! ...
Vincent Gitonga's user avatar
0 votes
1 answer
242 views

How to Call a Smart Contract on the Backend

What is the best way to call a contract (based on the Substrate Blokchain) on the backend side from the code? I know there is Polkadot.js but it's rather a frontend focused tool, and there is also ...
Pawel's user avatar
  • 41
0 votes
1 answer
76 views

How to add a Substrate token created with a smart contract to my wallet? What wallet can I use for testing in a local environment?

I created a token on the Substrate chain using a smart contract and I am now trying to add it to my wallet. However, when I enter the contract address into the "Import a token" section of ...
Mr Coder's user avatar
1 vote
1 answer
88 views

contracts.OutofGas when i want to uplooad smart contract

i want upload smart contract in the https://polkadot.js.org/apps/#/contracts but it when i press the depoloy button , it show me this error : polkadot-v0.9.34 substrate-contracts-node : substrate-...
Mr Coder's user avatar
  • 923
1 vote
1 answer
191 views

cargo-contract cannot build using the "stable" channel. Switch to nightly

I want to run and build contract by thia command : Step 1: cargo contract new my_contract Step 2: cargo contract build when i want to run Step 2 and i faced this error : ERROR: cargo-contract cannot ...
Mr Coder's user avatar
  • 923
0 votes
1 answer
104 views

How to upload a smart contract using Pallet-contract on Substrate Chain

I am using the Pallet-contract module in my Substrate chain and I would like to upload a smart contract. I have the following questions: What should I put in the code input field? Do I need to upload ...
Mr Coder's user avatar
  • 923