Contract code:

pragma solidity ^0.8.4;

contract TestContract {
    uint public variable;
    address public owner;
    event VarSet(uint from, uint to);

    function set_variable(uint num) public {
        require(msg.sender == owner);
        emit VarSet(variable, num);
        variable = num;

    constructor() {
        owner = msg.sender;


let Web3 = require('web3');    
let net = require('net');
var test_abi = [{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},
let w3 = new Web3('/path/to/geth/goerli/geth.ipc', net);
const test_contract_addr = 'address of contract';
var test_contract = new w3.eth.Contract(test_abi, test_contract_addr);
    from: "myWallet",
    gasPrice: '50',
    gas: 35000
}).on('error', console.error)

I'm trying to call the set_variable function on a simple smart contract with the above web 3 javascript, and I am repeatedly getting the error 'validation failed: Transaction contains data, but the ABI signature could not be found: signature 11858ea3 not found'.

I've double checked with web3.eth.abi.encodeFunctionSignature that this is indeed the right function signature for set_varible(uint256).

I'm wondering if anyone would be able to replicate this issue? I've searched online for this error message and I've had no luck.

I'm running the web3.js in node and using a local geth provider over IPC.


  • How did you get that error message? – Ismael Jun 24 at 5:40

Your Answer

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

Browse other questions tagged or ask your own question.