Developers Forum for XinFin XDC Network

Rishav
Rishav

Posted on

Not able to deploy smart contract on the Apothem network and don't know how to query it

Hey team,

We are participating in the ongoing XDC hackathon. Majorly we are trying to use XDC to host our smart contracts. But there are some problems that we are facing right now.

Ques: The documentation doesn't have proper tutorials to explain how to use XDC to deploy smart contracts and to query them. Please enlighten us if there are any proper tutorial which can guide us to understand the deployment and query part.

Ques: We tried to deploy the smart contract with our previous hardhat setup after changing the config file and updating the private key in the .env file but we are getting an error. We have attached the screenshot below.The deployment with the same setup deployed the smart contract on other networks but not able to replicate it on Apothem.
Image description

Ques: We also tried to deploy the smart contract using https://remix.xinfin.network/ but we aren't getting any popup from XDC Pay here and we are getting an error which says: "creation of MsmeTransactionReq errored: [TIMEOUT] Timeout for call deployMetadataOf from udapp".

When we try to use Metamask to sign the transactions the popup happens and we pay the gas as well but the transaction doesn't get included in a block. Till now the two transactions we made using Metamask are in pending status. We have also included the screenshot of this error.
Image description

Discussion (4)

Collapse
ruslan_wing profile image
ruslan wing

Please use the following RPC apothem.xdcrpc.com/ while using hardhat

Collapse
force_equi profile image
Rishav Author • Edited on

Hey Ruslan,
We deployed the contract successfully.

We have some other queries as well, can you please help us solve them?

  1. The process to query the smart contract deployed is similar to the testnets of Ethereum, right?
    Or we have to make some changes or use some other library?

  2. How can we create tokens ERC20 tokens on Apothem network, can you please share some documentation for that as well?

Collapse
ruslan_wing profile image
ruslan wing

Please note XDC Network is an EVM compatible network

To create a XRC-20 token please check out the detail guide ruslanwing100.medium.com/how-to-cr...

Collapse
force_equi profile image
Rishav Author

Thank you Ruslan.
Will get back to you after trying.