An ERC20 token called Ethereum Settler
(SETTLER) and an ERC721 NFT token called Ethereum Settlement
(SETTLEMENT).
Minting a Settlement NFT is free and can be done by anyone. The only cost is the gas fee for the transaction.
Holding a Settlement NFT gives the holder a newly minted SETTLER tokens every second.
Invariant: A Settlement NFT can only be held by one address at a time.
There is nothing stopping multiple addresses from each holding different Settlement NFTs. E.g. Mint ➜ Send ➜ Mint ➜ Send, etc. This means that the SETTLER token can have no monetary value, as it is not a scarce resource and an unlimited amount can be created simply by minting more Settlement NFTs.
The ViewAggregator contract is used to perform batch queries on the Settlement contract to get sequential or random data. This is a view only helper contract that is deployed separately from the Settlement contract.
Live on https://settlers.eridian.xyz
git clone https://github.com/EridianAlpha/ethereum-settlers.git
This should happen automatically when first running a command, but the installation can be manually triggered with the following commands:
git submodule init
git submodule update
make install
Use the .env.example
file as a template to create a .env
file.
make test
make test-fork
make test-v
make test-v-fork
make test-summary
make test-summary-fork
make coverage
make coverage-fork
make coverage-report
make coverage-report-fork
Deploy the SettlementNft contract which deploys the SettlerTokens contract.
Chain | Command |
---|---|
Anvil | make deploy anvil |
Holesky | make deploy holesky |
Mainnet | make deploy mainnet |
Base Sepolia | make deploy base-sepolia |
Base Mainnet | make deploy base-mainnet |
Deploy the ViewAggregator contract.
Input value as a the Settlement contract deployment address e.g. 0x123...
.
Chain | Command |
---|---|
Anvil | make deployViewAggregator anvil |
Holesky | make deployViewAggregator holesky |
Mainnet | make deployViewAggregator mainnet |
Base Sepolia | make deployViewAggregator base-sepolia |
Base Mainnet | make deployViewAggregator base-mainnet |
Interactions are defined in ./script/Interactions.s.sol
Call the mint()
function on the SettlementNft contract.
Chain | Command |
---|---|
Anvil | make mintNft anvil |
Holesky | make mintNft holesky |
Mainnet | make mintNft mainnet |
Base Sepolia | make mintNft base-sepolia |
Base Mainnet | make mintNft base-mainnet |
Call the getMintTimestamp()
function on the SettlementNft contract.
Input value as a token ID e.g. 1
.
Chain | Command |
---|---|
Anvil | make getMintTimestamp anvil |
Holesky | make getMintTimestamp holesky |
Mainnet | make getMintTimestamp mainnet |
Base Sepolia | make getMintTimestamp base-sepolia |
Base Mainnet | make getMintTimestamp base-mainnet |
Call the getSettlerBalance()
function on the SettlementNft contract.
Input value as an address e.g. 0x123...
.
Chain | Command |
---|---|
Anvil | make getSettlerBalance anvil |
Holesky | make getSettlerBalance holesky |
Mainnet | make getSettlerBalance mainnet |
Base Sepolia | make getSettlerBalance base-sepolia |
Base Mainnet | make getSettlerBalance base-mainnet |
Call the getSequentialData()
function on the ViewAggregator contract.
Input value 1 as the starting token ID e.g. 1
.
Input value 2 as the ending token ID e.g. 10
.
Chain | Command |
---|---|
Anvil | make getSequentialData anvil |
Holesky | make getSequentialData holesky |
Mainnet | make getSequentialData mainnet |
Base Sepolia | make getSequentialData base-sepolia |
Base Mainnet | make getSequentialData base-mainnet |
Call the getRandomData()
function on the ViewAggregator contract.
Input value as a number of NFTs to return e.g. 20
.
Chain | Command |
---|---|
Anvil | make getRandomData anvil |
Holesky | make getRandomData holesky |
Mainnet | make getRandomData mainnet |
Base Sepolia | make getRandomData base-sepolia |
Base Mainnet | make getRandomData base-mainnet |