Simulate Call as ContractID from WalletUnlocked?

I have a contract A that is restricted to be called by another contract B which is of type ‘ContractID’.

But I want to test it quickly without spinning up both A and B, currently, I am only aware of making calls as ‘Identity::Address’.

Is there a way to pretend to be a ContractID in a rust integration test instead of just a wallet identity?

This will greatly simplify the testing process without needing to get B to the proper state to call A.

Ethereum doesn’t make a strong distinction between contracts and eoa’s wrt to testing, so I’m wondering if Fuel has plans to do this as well

Hi there!

You may take a look into this

https://rust.fuel.network/v0.41.0/testing/the-setup-program-test-macro.html

Please let me know if it solves your question.
:fuelpump:

1 Like

I don’t believe this solves the issue, can you check this github issue for more context I could be wrong, but that suggestions is more or less what I’m doing currently