Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration to Apothem not working #390

Open
SumerRana opened this issue Jan 11, 2024 · 26 comments
Open

Migration to Apothem not working #390

SumerRana opened this issue Jan 11, 2024 · 26 comments

Comments

@SumerRana
Copy link

I used truffle and hardhat to deploy smart contracts on the apothem testnet, everything was working fine but suddenly it stopped working a few days ago and has not worked since, the code is working on local ganache and mumbai network, no problems there, but Apothem is not working.

truffle migrate --network apothem

Compiling your contracts...

\tradingContractsSystem\build\contracts

Compiled successfully using:

  • solc: 0.8.16+commit.07a7930e.Emscripten.clang

Starting migrations...

Network name: 'apothem'
Network id: 51
Block gas limit: 420000000 (0x1908b100)

1_boss_migration.js

Deploying 'Boss'

*** Deployment Failed ***

"Boss" -- Unknown Error:

<title>500 Internal Server Error</title>

500 Internal Server Error


nginx/1.18.0 (Ubuntu) .

Exiting: Review successful transactions manually by checking the transaction hashes above on Etherscan.

Error: *** Deployment Failed ***

"Boss" -- Unknown Error:

<title>500 Internal Server Error</title>

500 Internal Server Error


nginx/1.18.0 (Ubuntu) .
at <Location>\node_modules\truffle\build\webpack:\packages\deployer\src\deployment.js:330:1

Truffle v5.11.5 (core: 5.11.5)
Node v18.19.0

@gzliudan
Copy link
Collaborator

Could you please share your codes? So we can make tests.

@SumerRana
Copy link
Author

SumerRana commented Jan 14, 2024 via email

@SumerRana
Copy link
Author

SumerRana commented Jan 18, 2024 via email

@SumerRana
Copy link
Author

Could you please share your codes? So we can make tests.

I have shared the code, please check

@gzliudan
Copy link
Collaborator

gzliudan commented Feb 6, 2024

Sorry, it will take time to resolve this issue. We will keep you updated on the progress.

@SumerRana
Copy link
Author

SumerRana commented Feb 6, 2024 via email

@gzliudan
Copy link
Collaborator

gzliudan commented Feb 7, 2024

Please change https://erpc.apothem.network to https://earpc.apothem.network in file truffle-config.js. It will resolve this issue. Here is my result of commnad npx truffle migrate --network apothem:

Compiling your contracts...
===========================
> Everything is up to date, there is nothing to compile.


Starting migrations...
======================
> Network name:    'apothem'
> Network id:      51
> Block gas limit: 420000000 (0x1908b100)


1_token_migration.js
====================

   Deploying 'MyToken'
   -------------------
   > transaction hash:    0xad597c763d9f89293aab8fa3ec96da1be968f466db4256e6b6fca8d40e44584e
   > Blocks: 0            Seconds: 0
   > contract address:    0x93d3696B291cBd4E3A5652B6db09aDEa826DbC2D
   > block number:        59686641
   > block timestamp:     1707274287
   > account:             0xD4CE02705041F04135f1949Bc835c1Fe0885513c
   > balance:             21187.38345780825
   > gas used:            2745148 (0x29e33c)
   > gas price:           12.5 gwei
   > value sent:          0 ETH
   > total cost:          0.03431435 ETH


   Deploying 'MyToken2'
   --------------------
   > transaction hash:    0x099ffe5924617da1bce1865a57c98b73ecf2781fe5d6afd1fc7e001dbc6aa9b7
   > Blocks: 0            Seconds: 0
   > contract address:    0x1E067E85c4269CC8165044Bc0DBb29FE8B19B38B
   > block number:        59686642
   > block timestamp:     1707274290
   > account:             0xD4CE02705041F04135f1949Bc835c1Fe0885513c
   > balance:             21187.34914345825
   > gas used:            2745148 (0x29e33c)
   > gas price:           12.5 gwei
   > value sent:          0 ETH
   > total cost:          0.03431435 ETH


   Deploying 'MyToken3'
   --------------------
   > transaction hash:    0x6afbed63bec0a69dd16ba31a64f05bb55de6eea2e9e928223815b32ace29022e
   > Blocks: 0            Seconds: 0
   > contract address:    0x9cd806c0fe2eE2F1e38FEB712A68194a950CA796
   > block number:        59686643
   > block timestamp:     1707274292
   > account:             0xD4CE02705041F04135f1949Bc835c1Fe0885513c
   > balance:             21187.31482910825
   > gas used:            2745148 (0x29e33c)
   > gas price:           12.5 gwei
   > value sent:          0 ETH
   > total cost:          0.03431435 ETH


   Deploying 'MyToken4'
   --------------------
   > transaction hash:    0xf1fd3cb418ef561abfd269108b7baa9cf11177973c169c9170f79bf83f030a16
   > Blocks: 0            Seconds: 0
   > contract address:    0xB742b9e0dec511Cc01E6F18f1357f8b19CEDC154
   > block number:        59686644
   > block timestamp:     1707274295
   > account:             0xD4CE02705041F04135f1949Bc835c1Fe0885513c
   > balance:             21187.28051475825
   > gas used:            2745148 (0x29e33c)
   > gas price:           12.5 gwei
   > value sent:          0 ETH
   > total cost:          0.03431435 ETH

   > Saving artifacts
   -------------------------------------
   > Total cost:           0.1372574 ETH

Summary
=======
> Total deployments:   4
> Final cost:          0.1372574 ETH

@gzliudan
Copy link
Collaborator

gzliudan commented Feb 7, 2024

This issue was just fixed. Both of RPC node erpc.apothem.network and earpc.apothem.network works fine now.

@SumerRana
Copy link
Author

SumerRana commented Feb 7, 2024 via email

@gzliudan
Copy link
Collaborator

gzliudan commented Feb 8, 2024

closed as the problem is solved.

@gzliudan gzliudan closed this as completed Feb 8, 2024
@SumerRana
Copy link
Author

SumerRana commented Feb 22, 2024 via email

@gzliudan
Copy link
Collaborator

I tested your project just now, but found no problem:

npx truffle migrate --network apothem
Need to install the following packages:
[email protected]
Ok to proceed? (y) y
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: testrpc has been renamed to ganache-cli, please use this package from now on.
npm WARN deprecated [email protected]: The `apollo-server-types` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.
npm WARN deprecated [email protected]: This package is broken and no longer maintained. 'mkdirp' itself supports promises now, please switch to that.
npm WARN deprecated [email protected]: The `apollo-server-plugin-base` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.
npm WARN deprecated [email protected]: The `apollo-server-errors` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.
npm WARN deprecated [email protected]: The `apollo-datasource` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: This module has been superseded by the multiformats module
npm WARN deprecated [email protected]: The `apollo-server-env` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/utils.fetcher` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: This module has been superseded by the multiformats module
npm WARN deprecated [email protected]: The `apollo-reporting-protobuf` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/usage-reporting-protobuf` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.
npm WARN deprecated [email protected]: This module has been superseded by the multiformats module
npm WARN deprecated [email protected]: This module has been superseded by the multiformats module
npm WARN deprecated [email protected]: This module has been superseded by the multiformats module
npm WARN deprecated @ensdomains/[email protected]: Please use @ensdomains/ens-contracts
npm WARN deprecated @ensdomains/[email protected]: Please use @ensdomains/ens-contracts

Compiling your contracts...
===========================
✓ Fetching solc version list from solc-bin. Attempt #1
✓ Downloading compiler. Attempt #1.
> Compiling ./contracts/MyToken.sol
> Compiling ./contracts/MyToken2.sol
> Compiling ./contracts/MyToken3.sol
> Compiling ./contracts/MyToken4.sol
> Compiling @openzeppelin/contracts/interfaces/IERC5267.sol
> Compiling @openzeppelin/contracts/token/ERC20/ERC20.sol
> Compiling @openzeppelin/contracts/token/ERC20/IERC20.sol
> Compiling @openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol
> Compiling @openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol
> Compiling @openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol
> Compiling @openzeppelin/contracts/utils/Context.sol
> Compiling @openzeppelin/contracts/utils/Counters.sol
> Compiling @openzeppelin/contracts/utils/ShortStrings.sol
> Compiling @openzeppelin/contracts/utils/StorageSlot.sol
> Compiling @openzeppelin/contracts/utils/Strings.sol
> Compiling @openzeppelin/contracts/utils/cryptography/ECDSA.sol
> Compiling @openzeppelin/contracts/utils/cryptography/EIP712.sol
> Compiling @openzeppelin/contracts/utils/math/Math.sol
> Compiling @openzeppelin/contracts/utils/math/SignedMath.sol
> Artifacts written to /home/me/apothemFailureTest/build/contracts
> Compiled successfully using:
   - solc: 0.8.16+commit.07a7930e.Emscripten.clang


Starting migrations...
======================
> Network name:    'apothem'
> Network id:      51
> Block gas limit: 420000000 (0x1908b100)


1_token_migration.js
====================

   Deploying 'MyToken'
   -------------------
   > transaction hash:    0x04433f973d8b45f69580a4912e56df207a58b675c401c30067a8f66da256c3de
   > Blocks: 4            Seconds: 10
   > contract address:    0x420d7DC21458bbc04D4f07BE1A6b82e61E69dc76
   > block number:        60266587
   > block timestamp:     1708599056
   > account:             0xD4CE02705041F04135f1949Bc835c1Fe0885513c
   > balance:             21186.97168560825
   > gas used:            2745148 (0x29e33c)
   > gas price:           12.5 gwei
   > value sent:          0 ETH
   > total cost:          0.03431435 ETH


   Deploying 'MyToken2'
   --------------------
   > transaction hash:    0x10ffe38005eebdc8628bdd977600faba901e2410e0a6729213afeb995cdea29e
   > Blocks: 4            Seconds: 9
   > contract address:    0x71f18cF12E871BA6f6324d087217B0adB356fd2a
   > block number:        60266594
   > block timestamp:     1708599072
   > account:             0xD4CE02705041F04135f1949Bc835c1Fe0885513c
   > balance:             21186.93737125825
   > gas used:            2745148 (0x29e33c)
   > gas price:           12.5 gwei
   > value sent:          0 ETH
   > total cost:          0.03431435 ETH


   Deploying 'MyToken3'
   --------------------
   > transaction hash:    0x0ae8a35ef41ed105d18630526615879fdc762b8f6891457e3b3e6b15f088489d
   > Blocks: 4            Seconds: 9
   > contract address:    0x4434a6FE0f233B2D38Faf39483EdaF319c850178
   > block number:        60266601
   > block timestamp:     1708599089
   > account:             0xD4CE02705041F04135f1949Bc835c1Fe0885513c
   > balance:             21186.90305690825
   > gas used:            2745148 (0x29e33c)
   > gas price:           12.5 gwei
   > value sent:          0 ETH
   > total cost:          0.03431435 ETH


   Deploying 'MyToken4'
   --------------------
   > transaction hash:    0x42c9ef01703eaa94bcf21974462bb62c30c781c28e1e506cce16ec0377d0f398
   > Blocks: 4            Seconds: 9
   > contract address:    0x802F8e5A3dEfE64BdB84Df45A34ff0c901602031
   > block number:        60266608
   > block timestamp:     1708599104
   > account:             0xD4CE02705041F04135f1949Bc835c1Fe0885513c
   > balance:             21186.86874255825
   > gas used:            2745148 (0x29e33c)
   > gas price:           12.5 gwei
   > value sent:          0 ETH
   > total cost:          0.03431435 ETH

   > Saving artifacts
   -------------------------------------
   > Total cost:           0.1372574 ETH

Summary
=======
> Total deployments:   4
> Final cost:          0.1372574 ETH

@gzliudan gzliudan reopened this Feb 22, 2024
@SumerRana
Copy link
Author

SumerRana commented Feb 22, 2024 via email

@SumerRana
Copy link
Author

SumerRana commented Apr 20, 2024 via email

@SumerRana
Copy link
Author

SumerRana commented Apr 20, 2024 via email

@SumerRana
Copy link
Author

SumerRana commented Sep 8, 2024 via email

@SumerRana
Copy link
Author

SumerRana commented Sep 18, 2024 via email

@SumerRana
Copy link
Author

SumerRana commented Jan 14, 2025 via email

@AnilChinchawale
Copy link
Member

AnilChinchawale commented Jan 14, 2025

Hello @SumerRana,

I’ve verified that the Apothem Network is up and running without any issues, as shown in the screenshot below:

Screenshot 2025-01-14 at 10 50 22 PM

Could you kindly share the RPC endpoint you’ve configured in your code along with the specific error you’re encountering? This will help us troubleshoot the issue more effectively.

@SumerRana
Copy link
Author

SumerRana commented Jan 14, 2025 via email

@AnilChinchawale
Copy link
Member

Hey,

Can you share steps to reproduce error that you are facing , You can share it here or post over xdc.dev

@SumerRana
Copy link
Author

SumerRana commented Jan 14, 2025 via email

@AnilChinchawale
Copy link
Member

Attachment is not visible as you might sending it from email , I suggest you share script here and error in text.

@SumerRana
Copy link
Author

SumerRana commented Jan 14, 2025 via email

@AnilChinchawale
Copy link
Member

Hello @SumerRana,

Could you confirm if the testing was performed using the code available at the following repository?

https://github.com/SumerRana/apothemFailureTest

Additionally, you can review the XDC Explorer to verify contract interactions for other tokens at this link:
https://testnet.xdcscan.com/tokentxns
https://apothem.xdcscan.io/txs

Side Note:
The shared images are currently not visible. If you need further assistance, feel free to reach out to me via Telegram at https://t.me/AnilChinchawale.

@gzliudan
Copy link
Collaborator

gzliudan commented Jan 15, 2025

@SumerRana Sorry, all of your images can't be displayed on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants