Hello everyone,
I'm facing a couple of issues with my smart contract deployment and interaction process and would appreciate any guidance you could offer. I am trying on testnet.
Contract Verification Issue: When trying to verify my contract using Solidity (Multi-file), I'm encountering the following error: Cannot POST /smart-contracts/0x5454f0766b879fcd0497f77a6d46276e9e47ec9e/verification/via/multi-part. I've followed the typical steps for multi-file verification but can't seem to get past this error.
-
Interaction Issue with Metamask: When attempting to interact with my contract using my application, I've tried using the contract address in both formats: "xdc........" and "0x........". Unfortunately, neither of them seem to work, and I'm unable to transact through Metamask.
The error messages indicate invalid Ethereum addresses and mention that the network doesn't support EIP-1559. I've double-checked the addresses and am sure they are correct. Here's a snippet of the error message for context (not verbatim):
- Invalid address error for "0xdc........"
- Invalid value error for EIP-1559, indicating network incompatibility
Has anyone faced similar issues or have any insights on how to resolve these problems? Any advice on the next steps would be greatly appreciated.
Thank you!
Discussion (12)
What's address of your RPC server ?
We're using metamask on our frontend code, and it is working on other chains.
this is the code, which works fine for all other chains like arbitrum and eth:
if (window.ethereum) {
try {
const web3 = new Web3(window.ethereum);
await window.ethereum.request({ method: "eth_requestAccounts" }); // Request account access
const accounts = await web3.eth.getAccounts();
const fromAddress = accounts[0];
};
const pinJobDetailsToIPFS = async (jobDetails) => {
const url = api.pinata.cloud/pinning/pinJSONTo...;
const headers = {
"Content-Type": "application/json",
pinata_api_key: pinataApiKey,
pinata_secret_api_key: pinataSecretApiKey,
};
};
We're using metamask on our frontend code, and it is working on other chains. Other chains do not require us to,
Do you have sample frontend code to call a writefunction on xdc, that would help?
Try this NPM package -> npmjs.com/package/react-solidity-xdc3
Which has a boilerplate for you to kick-start the dapp development on XDC. Also note that, you may have to change the RPC URl's that's mentioned below
Hi Lokesh, I'm from the same team who posted this thread. I tried this package and still doesn't work, this package has too many warnings and is too complex to use compared to achieving similar functionality with other chains. Do you have react or JS code which is working currently or has worked in the recent past? Or any other approach I should try and yes I did try the different RPCs
Try this RPC's
erpc.apothem.network Or publicnexus.xdcchain.xyz/apothem-0...
tried but error not resolved and the 2nd link is not even working
Hi team, any update on my query above??
Hi Lokesh, I'm from the same team who posted this thread. I tried this package and still doesn't work, this package has too many warnings and is too complex to use compared to achieving similar functionality with other chains. Do you have react or JS code which is working currently or has worked in the recent past? Or any other approach I should try and yes I did try the different RPCs
Interesting!, that package has been helpful for quite number of dapps. Neverthless, we will address your feedback, thanks for raising that.
Meanwhile, have you tried XDCPay chrome extension to transact with your contract. If not, can you try that out and share your feedback here?
List of active RPC's, you can get it from chainlist.org/?search=xdc
Also, pls note the address "- Invalid address error for "0xdc........" occurs when you use the RPC's which doesn't support 0x conversion.
How to validate?-
RPC address prefixed with "e" should be the right one to convert the address from xdc to 0x. For example -- erpc.apothem.network for testnet
and erpc.xinfin.network for mainnet.
Try this out and let us know your feedback..
Thanks for the reply Lokesh. Was curious if you can consult for like an hour, I think it should be more than enough to solve my problem. Let me know what you would charge. This will save my time too.
Thanks so much for your help guys, I figured it. I had to just modify the transaction to use the legacy transaction format instead of EIP-1559
one has to be guiDed a lot of sc.mmers are out there taking money from innocent traders. I was a victim to this sc.m crypto broker the made me loss my hard earn funds.
I rep0rted to Jeffsilbert 3 9 g ma!l c0m and He was able to fight back for my funds now I have my fvnds fully rec0 vered.