I have tried following instructions from:




My process:

1 - Add debug statements to the contract code:

pub fn new() -> Self {
  ink_env::debug_println!("created new instance at {}", Self::env().block_number());
  Self {}

pub fn sayhello(&self) {

2 - build: cargo +nightly contract build.


Original wasm size: 32.7K, Optimized: 11.1K

The contract was built in DEBUG mode.

Your contract artifacts are ready. You can find them in:

  - helloworld.contract (code + metadata)
  - helloworld.wasm (the contract's code)
  - metadata.json (the contract's metadata)

3 - In another terminal, run the node:

substrate-contracts-node --dev -lerror,runtime::contracts=debug

4 - In the original terminal, upload:

cargo contract upload --suri //Alice

5 - Get the code hash:


6 - Instantiate:

cargo contract instantiate \
  --gas 500000000000 \
  --constructor new \
  --suri //Alice \
  --code-hash $code_hash

7 - Get the Contract:


8 - Call:

cargo contract call \
  --gas 500000000000 \
  --message sayhello \
  --suri //Alice \
  --contract $Contract

RESULT: No output at all from the terminal running the node.

1 Answer 1


I have the following ink! message:

pub fn say_hello(&self) {

I run my node like this:

./target/release/substrate-contracts-node --dev -lerror,runtime::contracts=debug

If I call like this:

cargo contract call \
  --gas 500000000000 \
  --message say_hello \
  --suri //Alice \
  --contract 5HJSXhYLExB5KYCMXa95mKEUX4UXXsp8Up9rBLzR57PPwtkq

The following appears in my node logs:

2022-08-02 13:07:28.410 DEBUG tokio-runtime-worker runtime::contracts: Execution finished with debug buffer: Hello

Make sure your contract exists.

You should see it in https://polkadot.js.org/apps/#/contracts

Also, try deleting your contract and re-deploying. You may have an old contract there.

Your Answer

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

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