I am trying to use conseiljs for gas estimations of a contract invocation transaction. More specifically, the contract involved has some kind of chain_id related check and gas estimation always fails with ConseilJS testContractInvocation.
When I inspected the problem, I found that conseiljs always tries to set the fake_chain_id during runOperation RPC call. Whereas, the contract expects the chain_id to be that of the corr. network it is deployed on (delphinet or mainnet). This is probably why I am always getting a scipt_rejected_error, when it should not have been the case.
Override with fake_chain_id is supposedly here:
|
const response = await performPostRequest(server, `chains/${chainid}/blocks/head/helpers/scripts/run_operation`, { chain_id: fake_chainid, operation: { branch: fake_branch, contents: operations, signature: fake_signature } }); |
If needed, I can share more details on the smartpy, JS code here.
I am trying to use
conseiljsfor gas estimations of a contract invocation transaction. More specifically, the contract involved has some kind ofchain_idrelated check and gas estimation always fails with ConseilJStestContractInvocation.When I inspected the problem, I found that conseiljs always tries to set the
fake_chain_idduringrunOperationRPC call. Whereas, the contract expects the chain_id to be that of the corr. network it is deployed on (delphinetormainnet). This is probably why I am always getting ascipt_rejected_error, when it should not have been the case.Override with
fake_chain_idis supposedly here:ConseilJS/src/chain/tezos/TezosNodeWriter.ts
Line 712 in 8146def
If needed, I can share more details on the
smartpy, JS code here.