Skip to content

neonevm/neon-contracts

Repository files navigation

Neon EVM contracts

This repository is a set of various contracts and integrations that aim to help developers building on Neon EVM.

Note

This repository includes Hardhat 3 which requires the support of Node.js v22 or later installed on your system, along with a package manager such as npm or pnpm.

Integrations on Neon EVM

Precompiles on Neon EVM

Neon EVM provides a set of custom precompiles which are built to connect Solidity developers with Solana. The list of the precompiles and their code can be found here.

Helpers

Helper libraries which could be used to prepare and validate data being passed to and return from Solana can be found here.

Secret values setup

Secret values (such as private keys) used in tests and scripts should be stored using Hardhat's encrypted keystore file. This keystore file is specific to this Hardhat project, you can run the following command in the CLI to display the keystore file path for this Hardhat project:

npx hardhat keystore path

To store encrypted secret values into this project's Hardhat keystore file, run the following commands in the CLI:

npx hardhat keystore set PRIVATE_KEY_OWNER
npx hardhat keystore set PRIVATE_KEY_USER_1
npx hardhat keystore set PRIVATE_KEY_USER_2
npx hardhat keystore set PRIVATE_KEY_USER_3
npx hardhat keystore set PRIVATE_KEY_SOLANA
npx hardhat keystore set PRIVATE_KEY_SOLANA_2
npx hardhat keystore set PRIVATE_KEY_SOLANA_3
npx hardhat keystore set PRIVATE_KEY_SOLANA_4

You will be asked to choose a password (which will be used to encrypt provided secrets) and to enter the secret values to be encrypted. The keystore password can be added to the .env file (as KEYSTORE_PASSWORD) which allows secrets to be decrypted automatically when running Hardhat tests and scripts. Otherwise, each running Hardhat test and script will have the CLI prompt a request to enter the keystore password manually.

Caution

Although it is not recommended (as it involves risks of leaking secrets) it is possible to store plain-text secrets in .env file using the same keys as listed above. When doing so, user will be asked to confirm wanting to use plain-text secrets found in .env file when running Hardhat tests and scripts.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •