-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide better ergonomics for proxied contract calls #3145
Comments
At face value I think this should work out of the box with const myContract = new Contract('0x01', MyContractAbi, wallet);
const myProxyContract = new Contract('0x02', MyProxyAbi, wallet);
await myContract.functions.myContractXyz().addContracts([myProxyContract]).call(); The proxy and it's ABI is added to the call so can use it and it's logs. However, the ABI is only really useful for logged types. For proxy calls, we also want to be able to call methods available to The solution await myContract.functions.myProxyContractXyz().addProxyContracts([myProxyContract]).call(); I'd recommend testing this first with a proxy contract and seeing how it works with the current SDK before informing the solution. |
It turns out that proxy contracts are supported out of the box. The only thing that needs handling is proxy deployments: |
We should provide a type-safe API that can work behind proxied contracts.
This should go in tandem with:
fuels deploy
#3123Original request:
contractA.functions.someRandomFunc().call()
. However, they're saying for the proxy contract, there isn't any way to call a particular function (say, "someRandomFunc") that is defined in the implementation because the base proxy contract has essentially just a "fallback" method. They've found this, but it mentions the usage of forc that isn't ideal for their use case.The text was updated successfully, but these errors were encountered: