I could find the JS code to deploy an ink contract here. The code however, seems to be using a fixed gas limit to deploy the contract.
Is there a way to estimate the gas limit that is required to deploy the contract before actually deploying it?
Update:
I managed to find the instantiate
methods under the contractsApi
runtime calls that would provide the gas limit and storage deposit charge for contract deployment. However, I am not sure what data I am supposed to provide for data
and salt
params.
0x00
. Try putting the.wasm
as the data. You'll get a gas output in the resultsalt
. I assume something different than the contract wasm needs to go into thedata
field tho, since the wasm is already provided forcode:CodeSource