Skip to content
Discussion options

You must be logged in to vote

If anyone is searching for a solution, here it is one way to achieve it.

const account = accounts.activeAccount; // implemented by myself
const address = environmentVariables.ANY_ADDRESS;

    const contract = new ethers.Contract(address, [
        "function unknown_jd72hzsj(uint256 _param1) payable" // name doesn't matter as it gets converted to 8 hexadecimal digit representation
    ]); // maybe you need to add signer as third argument here, not sure

    const tx = await contract.populateTransaction.unknown_jd72hzsj("8372427");
    tx.data = "0xjd72hzsj" + tx.data.slice(10); //  (8 hexadecimal digit).length == 10

    const result = await account.provider.call(tx);
    console.log(resu…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by teneko
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant