I have a funny problem, hopefully, someone can help.

I have an environment similar to the delegator example contract: one delegator-like contract, one accumulator-like contract, and one adder-like contract. I'm running a local test node. I can't deploy my contracts on the contracts UI interface.

I can't compile the delegator contract because I get "ERROR: No 'ink_lang' dependency found". So I changed my dependencies on my contracts such that they look like this: https://gist.github.com/RafaelAPB/5b0d36f56dfc3d83c55ca857f38e8d85

Code compiles for my three contracts. When deploying the adder-like and accumulator-like (in this order). However, when invoking the method from the accumulator contract that calls the adder contract, I obtain:

calling "delegator-add"
panicked at 'encountered error while calling Adder::add: NotCallable', 

Why wouldn't it be callable? Of course, the delegator contract also does not work (and in fact breaks the interface) I thought that the first problem could be a code problem, but i follow the tutorial very closely and it compiles. So I thought the dependencies might be the problem.

How can i change the dependency ink = { path = "../../crates/ink", default-features = false } to a non-local reference, such that I can have it instead of lines 8-13 of the gist I shared?

Unfortunately, this similar question does not answer my question because I can't run the original delegator code nor use my version (fails on the mentioned occasion, but can call any function that is not doing a cross-contract call). I'm also not trying to explore the usage of ink_env::call::Call::new(), but rather instantiate a delegator contract with references to deployed contracts so that I can call them directly.

Bonus points if you can point me to other smart contracts using the delegator design pattern.

Any help would be greatly appreciated!

1 Answer 1


Please refer to our recently published delegator example which depends on the latest official ink! release. Make sure you also use latest cargo-contract version and substrate-contracts-node

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.