Questions tagged [cross-contract-call]
The cross-contract-call tag has no usage guidance.
14
questions
1
vote
0
answers
40
views
Upload and Deploy code in Rococo Contract (Testnet) and Shibuya Testnet not working?
I am experimenting with cross contract with a combination of psp22 and psp37 in my project. But there is a problem when uploading json file and wasm file and deploying. It just shows the "...
3
votes
1
answer
51
views
How do I call a diamond facet ink message with PolkadotJS?
_fallback method panics with the following error when attempting to execute a delegate call to the diamond facet contract:
2023-05-20 16:16:58.992 DEBUG tokio-runtime-worker runtime::contracts: ...
1
vote
2
answers
29
views
How to get the ContractRef from AccountId or codehash with Ink!
From the ink! cross-contract docs, contract references give developers a type-safe way of interacting with a contract. However, this is not only available when the contract is already instantiated.
My ...
4
votes
1
answer
46
views
Cross contract calls - Difference between {Contract}Ref and build_call().delegate()
What is the difference in these two approaches for cross contract calls? One uses the {Contract}Ref and the other uses the build_call().delegate() method. Both methods do not require the contract to ...
2
votes
1
answer
36
views
Cross-contract instantiation failed with TransferFailed
I am getting an error attempting to deploy my delegator smart contract. Not sure how to debug this issue.
I use the deploy.sh to upload all smart contract code hashes and pass it afterwards to the ...
3
votes
1
answer
54
views
Call a smart contract ink! as a argument of another smart contract
I have a question about ink!. Is it possible from a smart contract A to manage the transfer of tokens of contract B IF contract B will be deployed later ?
I want a user to call a function of smart ...
2
votes
1
answer
47
views
What should the end-user expect after a cross contract call failure
I was attempting to comprehend the workings of cross-contract calling in substrate ink contracts using this particular sample code.
If I provide u64::MAX as the calls_count value, it will result in a ...
5
votes
1
answer
79
views
How to properly handle cross contract call errors
In the scenario where a cross-contract call from contract A to contract B fails, how can we manage the resulting errors? Specifically, if the call from A to B is unsuccessful, what are the options for ...
2
votes
1
answer
56
views
ContractTrapped, transfer_from CalleeTrapped
DispatchError: ContractTrapped
DispatchError docs: Contract trapped during execution.
Debug message:
panicked at 'encountered error while calling <AccountId as PSP22>::transfer_from: ...
1
vote
1
answer
49
views
Accessing values in cross-crontact calling
I have followed this tutorial to create a cross-contract calling in ink. There are two contracts in the example accumulator and delegator. The accumulator contract has two functions and the delegator ...
0
votes
1
answer
68
views
Cross-Contract execution in Ink contracts
#[ink(message)]
pub fn test_cross_contract_call(
&mut self,
calls_count: u64,
) {
let selector: Selector = Selector::new([0x6b, 0x25, 0xcb, 0x19]);
let ...
0
votes
1
answer
80
views
ink! cross-contract calling tutorial does not compile
Note: Having installed substrate-contracts-node and Contracts UI I can easily deploy and interact with an ink! Smart contract
I am following the ink! Tutorial here https://use.ink/basics/cross-...
0
votes
1
answer
70
views
How can we make a cross contract call to a payable message from parent contract?
Contract A has a Payable Method and contract B has ContractRef of A saved in storage. I can call other methods on Contract A but not sure how to call the payable method from Contract B.
Tried with ...
2
votes
1
answer
267
views
How to implement cross contract calls correctly?
I've been trying for a few days now to implement cross contract calls but somehow I can't seem to make it right. So here is my code and I hope one of you can point out my mistake to me.
I want to call ...