Developers Forum for XinFin XDC Network

Arturo Cantera Carrasco
Arturo Cantera Carrasco

Posted on

Bugs / Errors / Wrong Info

I want to say that this is my experience and personal opinion, sorry if I sound arrogant. I'm just trying to help.


Testnet is not working well. Our NFT marketplace smart contract only works on mainnet or other networks.

Due XDCpay being outdated, XDCpay also doesn't work with the following smart contract.
XDCpay is missing some functions that Metamask's last version has.

You have here the smart contract we make it free to use for everyone on the xdc blockchain. With this, you can also bridge NFTs from other networks to XDC.

Smart contract:
The main network not working with "String reverts", for example when you have a revert on the smart contract. The network doesn't indicate what revert happened. (This is mandatory to fix it or most of the applications will not work if a revert happens)

`function stake(uint256 tokenId, uint256 amountToStake) public nonReentrant {

    require(_exists(tokenId), "Invalid tokenId");       
    require(amountToStake <= _levels[_nfts[tokenId].level].dailymax, "Daily limit reached");
    require(_nfts[tokenId].laststake == 0 || _nfts[tokenId].laststake + 1 days < block.timestamp, "Daily limit reached");
    require(prnt.allowance(msg.sender, address(this)) >= amountToStake,"Insuficient Allowance");
    require(prnt.transferFrom(msg.sender,address(this),amountToStake),"transfer Failed");

    if (_nfts[tokenId].prnt==0){
        stakeValues.multiplierTotal +=  _nfts[tokenId].nftmultiplier;
        stakeValues.totalweight -= _nfts[tokenId].weight;

    stakeValues.totalPRNT += amountToStake;
    _nfts[tokenId].laststake = block.timestamp;
    if ( _nfts[tokenId].stakeinlevel >= _levels[_nfts[tokenId].level].tolevelup && _nfts[tokenId].level < 20){
        _nfts[tokenId].level += 1;
        _nfts[tokenId].stakeinlevel = 0;
        stakeValues.multiplierTotal +=  _levels[_nfts[tokenId].level].levelmultiplier;
        if (_nfts[tokenId].level > 1){
            stakeValues.multiplierTotal -=  _levels[_nfts[tokenId].level-1].levelmultiplier;
Enter fullscreen mode Exit fullscreen mode

The requires don't work, the network only tells you that it's an error.


XDCpay is super old, and web3modal does not support it. We needed to build a web3modal custom for adding xdcpay. XDCpay doesn't connect with I suggest to fork the last version of metamask and adding the custom logos and information.

—------------------------- is not working with NFT DApps. You need to use

xdc.observatory is not working, lots of missing info, no nfts... Lots of missing txs


XinFin's website is outdated. This is super old also outdated info...

We have the message of begin innovative and super powerful, we shouldn't have these errors, outdated info, problems... no posts since months. Medium is one of the most used media platforms, in my opinion, you should publish all the updates here.

If you want a call with me or something just contact me on telegram @Arturo_Cantera or email:

Discussion (6)

akhekade profile image
Atul Khekade

This does not sound arrogant at all.

Metamask has 1300 issues open. Just that they are properly reported and resolved on github.

Request you to use github and both to report any issues.

xcantera profile image
Arturo Cantera Carrasco Author

Another example for the "require()" error.

I was developing/testing something:

Im creating a jackpot game smartcontract on the XDC network. - > Smartcontract on XDC - > 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;
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!

walterblueu profile image
Jon McBee

Hey Arturo, thank you for your feedback. With regard to XDCPay we are working on web3 Modal support right now and will have a new release shortly.

akhekade profile image
Atul Khekade

This would be a good example of how bugs should be reported properly on Github

xcantera profile image
Arturo Cantera Carrasco Author
s_xdc profile image

Thanks for sharing feedback, Arturo. This is exactly what is for.