0

Gas estimation failed Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force sending? Invalid JSON RPC response:

Contract source code

trying to call mint function.

9
  • Could you transaction you are going to send and smart contract you are going to sent your transaction to? Most probably your transaction is about to fail, that's why node cannot estimate its gas cost. Mar 26, 2019 at 6:52
  • sorry, i'm not sure about what you mean. The contract has already been deployed, i want to call a function now. It's on the main net by the way
    – adi
    Mar 26, 2019 at 7:07
  • Could you post a link to contract's source code and tell what function are you trying to call and what are parameter values you are passing to it? Mar 26, 2019 at 7:11
  • etherscan.io/address/…
    – adi
    Mar 26, 2019 at 7:15
  • trying to call mint function. It takes an address and amount
    – adi
    Mar 26, 2019 at 7:16

1 Answer 1

1

You are trying to call mint function on Allocation smart contract, but it does not have such function. That's why your transaction is going to fail.

You probably need to call mint on OPUCoin smart contract. This function may only be called by smart contract owner, and the owner of OPUCoin smart contract is Allocation smart contract, so you need to somehow make Allocation smart contract to call mint on OPUCoin. There are several method in Allocation smart contract that are able to call mint on OPUToken, e.g. allocate, allocateIntoHolding, finalizeHoldingAndTeamTokens, optAddressIntoHolding. You may try calling some of these methods.

Explanation

You have two smart contracts deployed: Allocation and OPUCoin and these smart contracts are mutually relative in many ways:

  1. OPUCoin smart contract was deployed by Allocation smart contract.
  2. Property token of Allocation smart contract holds a reference to OPUCoin smart contract.
  3. Property owner of OPUCoint smart contract holds a reference to Allocation smart contract.
  4. Many function Allocation smart contract call functions of OPUCoin smart contract.
9
  • Can you please provide the specifics? I want to mint some coins, should I call "allocate"? thanks
    – adi
    Mar 26, 2019 at 8:09
  • You may try calling allocate from address 0x54650daf32afbfe0fff592f249e0652e539749dc (the only address authorized to call allocate), but there is quite complicated logic inside and I'm not sure it will allow you to mint any tokens. Mar 26, 2019 at 8:13
  • tried calling 'allocate', transaction failed and got the following: JsonRpcEngine - response has no error or result for request: { "jsonrpc": "2.0", "id": 1243108505, "method": "eth_estimateGas", "params": [ { "from": "0x1acfb64c2ec4c3bad94e4667fe66e39e3617c4ad", "to": "0x55f359A60D458D3D215E7A51539084FC3F65DaAD", "data": "0x79ba5097", "value": "0x0" } ] } transact to OPUCoin.mint pending ... [block:7451130 txIndex:1]from:0x1ac...7c4adto:0x55f...5daadvalue:0 wei
    – adi
    Mar 27, 2019 at 16:35
  • you're saying there's no way to mint tokens with this contract now?
    – adi
    Mar 27, 2019 at 16:37
  • I didn't say this. I sad that in order to mint tokens you have to convince Allocation contract to call mint on OPUCoin contract. Whether it is possible or not depends on Allocation smart contract logic. Mar 27, 2019 at 16:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.