Developers Forum for XinFin XDC Network
Another example for the "require()" error.
I was developing/testing something:
Im creating a jackpot game smartcontract on the XDC network.
xdc.blocksscan.io/address/xdc4de3f... - > Smartcontract on XDC
polygonscan.com/address/0x22568f35... - > Smartcontract on Polygon
As you can see, you cant write the smartcontract with Blockscan(You cant write also with remix). Im doing the play buttons(functions) with requires.
function buttonClick() public payable { require(msg.value == 1 ether, "1 XDC required to bet!"); if (activeGame) require(msg.sender != getLast(), "You are already winning!"); currentTimeWin = now + 5 minutes; addressArr.push(msg.sender); activeGame = true; }
We know XDC network have a problem and require().... is not working in the network.
On polygon works perfect, on xdc network is not working.
You can get the smartcontract code from the explorers, its verified!
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
Another example for the "require()" error.
I was developing/testing something:
Im creating a jackpot game smartcontract on the XDC network.
xdc.blocksscan.io/address/xdc4de3f... - > Smartcontract on XDC
polygonscan.com/address/0x22568f35... - > Smartcontract on Polygon
As you can see, you cant write the smartcontract with Blockscan(You cant write also with remix). Im doing the play buttons(functions) with requires.
function buttonClick() public payable {
require(msg.value == 1 ether, "1 XDC required to bet!");
if (activeGame)
require(msg.sender != getLast(), "You are already winning!");
currentTimeWin = now + 5 minutes;
addressArr.push(msg.sender);
activeGame = true;
}
We know XDC network have a problem and require().... is not working in the network.
On polygon works perfect, on xdc network is not working.
You can get the smartcontract code from the explorers, its verified!