-
Notifications
You must be signed in to change notification settings - Fork 35
Description
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:
ConseilJS/src/chain/tezos/TezosNodeWriter.ts
Line 712 in 8146def
| 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.