1

A few months back, I added contract-pallet to the Polkadot using the link. At that time, I used Polkadot 0.9.28 as the node version. There was another link from the substrate that uas also useful.

At this point, both links are missing from the substrate page. Does it mean that the present versions have the contract-pallet enabled by default?

If not enabled by default, how to get the contract-pallet enabled in Polkadot? Are any tutorials or links available for Polkadot 0.9.40 to enable contract-pallet?

1 Answer 1

3

I think you mean the tutorial where pallet-contracts was added to the substrate-node-template. This tutorial is indeed removed.

You can use substrate-contracts-node where you have a node-template with pallet-contracts.

Additional info (after comment): cargo contract uses JSON-RPC to interact with the contracts node template (see ink docs):

cargo contract build
cargo contract upload --suri //Alice
cargo contract instantiate --suri //Alice --args ...
cargo contract call --contract ... --message get --dry-run --suri //Alice

enter image description here

3
  • This is for running the contract node interface. If you want to connect the RPC method ( accessing using the nodeJS interface), I cannot go with this method. One needs to connect to the polkadot.js.org interface to instantiate the contract and use it in a framework. Substrate-contact-node is for testing purposes only. Apr 13, 2023 at 5:51
  • See edit @StanlyWilson Apr 13, 2023 at 7:37
  • I don't see any problem with the above answer. Please refer to use.ink for checking how to prepare a node where you can deploy your smart contracts. In the above documentation you will also find the different options when it comes to the deployment itself, contracts-UI or cargo-contracts being the main ones. Apr 13, 2023 at 7:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.