https://github.com/syscoin/nevmregistry
NEVM Registry for Sentry node registration to the NEVM chain to be used within smart contracts
https://github.com/syscoin/nevmregistry
Last synced: 9 months ago
JSON representation
NEVM Registry for Sentry node registration to the NEVM chain to be used within smart contracts
- Host: GitHub
- URL: https://github.com/syscoin/nevmregistry
- Owner: syscoin
- Created: 2025-03-11T22:10:15.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-12T00:00:54.000Z (about 1 year ago)
- Last Synced: 2025-03-12T01:18:38.971Z (about 1 year ago)
- Language: Solidity
- Size: 69.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NEVM Registry Contract
A highly optimized Solidity contract to query Syscoin's NEVM precompile for retrieving collateral height (seniority) of sentry nodes.
## Contract Overview
This contract interacts directly with a Syscoin-specific precompile to retrieve the collateral height of sentry nodes, which is crucial for determining node seniority.
## Usage
The primary function is:
```solidity
function getCollateralHeight(address node) external view returns (uint256 collateralHeight);
```
## Setup (Foundry)
### Install Foundry
```bash
curl -L https://foundry.paradigm.xyz | bash
foundryup
```
## Deployment and Verification Scripts
### Usage
Deploy and verify on Tanenbaum:
```bash
npm run deploy:tanenbaum
npm run verify:tanenbaum
```
Deploy and verify on Mainnet:
```bash
npm run deploy:mainnet
npm run verify:mainnet
```
Deploy and verify locally:
```bash
npm run deploy:local
npm run verify:local
```
## Networks
Configured networks include:
- `tanenbaum` (Syscoin test network, chainId: 5700)
- `mainnet` (Syscoin mainnet, chainId: 57)
- `local` (Local development, chainId: 1337)
## License
MIT License