0

I have set up a private POA Network according to the tutorial from the parity homepage. I have two nodes running on localhost:8540 and localhost:8541. I have connected MetaMask to my first node and am able to send transactions between test accounts and even deploy a smart contract from remix. Unfortunately I am not able to call the functions from the deployed contract as the gas estimation always fails and the transaction gets mined but execution fails.

Here are my configurations:

Spec.json

{
"name": "OraclePOA",
"engine": {
    "authorityRound": {
        "params": {
            "stepDuration": "5",
            "validators" : {
                "list": [
                    "0x0038ba71301213d9508ce44fd25272d83b1c5dae",
                    "0x002e9ac8fef5ab0d0591488860562438ab154bd4"
                ]
            }
        }
    }
},
"params": {
    "gasLimitBoundDivisor": "0x400",
    "maximumExtraDataSize": "0x20",
    "minGasLimit": "0x1388",
    "networkID" : "0x2323",
    "maxCodeSize": "0x6000",
    "eip155Transition": 0,
    "validateChainIdTransition": 0,
    "eip140Transition": 0,
    "eip211Transition": 0,
    "eip214Transition": 0,
    "eip658Transition": 0
},
"genesis": {
    "seal": {
        "authorityRound": {
            "step": "0x0",
            "signature": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        }
    },
    "difficulty": "0x100000",
    "gasLimit": "0x1000000"
},
"accounts": {
    "0x0000000000000000000000000000000000000001": { "balance": "1", "builtin": { "name": "ecrecover", "pricing": { "linear": { "base": 3000, "word": 0 } } } },
    "0x0000000000000000000000000000000000000002": { "balance": "1", "builtin": { "name": "sha256", "pricing": { "linear": { "base": 60, "word": 12 } } } },
    "0x0000000000000000000000000000000000000003": { "balance": "1", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } },
    "0x0000000000000000000000000000000000000004": { "balance": "1", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } },
    "0x00d695cd9b0ff4edc8ce55b493aec495b597e235": { "balance": "10000000000000000000000" },
    "0x001ca0bb54fcc1d736ccd820f14316dedaafd772": { "balance": "10000000000000000000000" }
}
}

The configuration of the node connected to MetaMask:

[parity]
chain = "oracle-spec.json"
base_path = "/myOracle/parity0"
[network]
port = 30300
[rpc]
port = 8540
apis = ["web3", "eth", "net", "personal", "parity", "parity_set", "traces", "rpc", "parity_accounts"]
[websockets]
port = 8450
[account]
password = ["authNode0.pwds"]
[mining]
engine_signer = "0x0038ba71301213d9508ce44fd25272d83b1c5dae"
reseal_on_txs = "none"
usd_per_tx = "0"

here is my sample contract:

pragma solidity 0.5.7;
contract Sample{
    //address of owner
    address payable owner;

    //whoever deploys contract is the owner
   constructor() public{
        owner = msg.sender;
   }

    function doSomething() external payable {
        int i = 10 + 10;
        i++;
   }
}

Screenshot of the Transaction via Remix

Help would be much appreciated!

1

I figured it out. The problem was the compiler version of solidity. The smart contract only works with a solidity version below 0.5.4. There is already a Ticket in Github. For more information check: https://github.com/paritytech/parity-ethereum/issues/10502

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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