About the safeTransfer function on openethereum poa chain

I am testing erc20 using open ethereum poa chain. While testing, the following function does not work and an error occurs.

Has anyone tested the openethereum poa chain regarding the safeTransfer part? I know this has nothing to do with eip, but when I tried it, it didn't work.

openethereum version : https://github.com/openethereum/openethereum/releases/tag/v3.3.5

Please elaborate......

  1. based on the above link, you can set up the poa chain and run the chain. -> blockchain is running.
  2. you deploy any openzepline example contracts including safeTransfer.
  3. using remix to call safeTransfer or other tools, then the function returns fail. transfer is ok but safeTransfer only return fail.
  • openethereum daemon version : OpenEthereum v3.3.5
  • pragma solidity ^0.8.0

openethereum poa test params based on the above link
"params": {
"gasLimitBoundDivisor": "0x400",
"maximumExtraDataSize": "0x20",
"minGasLimit": "0x1388",
"networkID" : "0x1004",

    "eip155Transition": "0x0",
    "validateChainIdTransition": "0x0",
    "validateReceiptsTransition": "0x0",
    "eip140Transition": "0x0",
    "eip214Transition": "0x0",
    "eip658Transition": "0x0",
    "eip145Transition": "0x0",
    "eip1014Transition": "0x0",
    "eip1052Transition": "0x0",
    "eip98Transition": "0x0",
    "eip210Transition": "0x0",
    "eip211Transition": "0x0",
    "eip1283Transition": "0x0",
    "eip150Transition": "0x0",
    "eip160Transition": "0x0",
    "eip161abcTransition": "0x0",
    "wasmActivationTransition": "0x0",
    "eip161dTransition": "0x0",
    "kip4Transition": "0x0",
    "kip6Transition": "0x0"

How do you call transfer?
How do you call safeTransfer?
What error-message do you get?

function buy(address erc20) external nonReentrant {
iERC20.safeTransfer(owner, iERC20.balanceOf(address(this)));

I omitted the rest of the code in the function and put only that part. Metamask does not show the error itself. It just says failed.

I know that the open Ethereum poa itself supports Istanbul, but it is strange that the function call gives an fail on the metamask.

Do you declare using SafeERC20 for IERC20; in your contract?

More generally, does your contract compile successfully?

contract all successfully compiled. problem is the when execute the safeTransfer only return fail. other code works well.

What is iERC20 initialized to?

IERC20 iON20 = IERC20(on20);
iON20.safeTransfer(owner, iON20.balanceOf(address(this)));

What is the value of on20?

yep. all is intialized.

That doesn't answer the question.

if you run on that poa chain, try then you can see the same result on poa chain. i am asking you about the architecture level for it, not the code level.

The value of on20 is required in order to determine why transfer works correctly for it, while safeTransfer doesn't.

I asked a question because I wanted to know why this part didn't work in the poa chain. metamask just give fail when i run this one.

This value is required in order to answer your question!

i only show that part. all the other code deployed and interfacing i mean. do not focus on that . all is worked on other testnet on ether.

OK, good luck.
Keep in mind that the key to get answers to your questions lies in providing the relevant details.

Try deploying your code to the ethereum testnet and see if it works there or not,

Technically it shouldn't give an error, but alot of things can go wrong, however OpenEthereum has been deprecated since May last year so who knows what might be wrong in the client itself.

Have you tried using it running your code on go-ethereum
using Clique? Thats the official Geth client using PoA, which should cause less issues then an deprecated client thats not developed or supported anymore.