Compare commits

..

2 Commits

Author SHA1 Message Date
439fe17371
make gatekeeper part of the deployment strategy
Signed-off-by: Uncle Fatso <uncle.fatso@ghostchain.io>
2025-07-23 22:28:44 +03:00
6e6b64a61b
add information to the readme
Signed-off-by: Uncle Fatso <uncle.fatso@ghostchain.io>
2025-07-23 22:26:52 +03:00
3 changed files with 71 additions and 64 deletions

View File

@ -84,6 +84,9 @@ STINKY_TOKEN_SYMBOL=
GHOST_TOKEN_NAME= GHOST_TOKEN_NAME=
GHOST_TOKEN_SYMBOL= GHOST_TOKEN_SYMBOL=
## Initial ghosted supply on gatekeeper
INITIAL_GHOSTED_SUPPLY=
SEPOLIA_TEST_RPC_URL= SEPOLIA_TEST_RPC_URL=
SEPOLIA_TEST_API_KEY= SEPOLIA_TEST_API_KEY=
SEPOLIA_TEST_ENDPOINT= SEPOLIA_TEST_ENDPOINT=

117
README.md
View File

@ -1,6 +1,63 @@
## Foundry ## Ghost DAO protocol
**Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.** [ghostDAO](https://app.dao.ghostchain.io/) is a decentralized multi-chain reserve currency protocol. ghostDAO protocol is powered by [GHOST native blockchain](https://ghostchain.io/) enabling anonymous cross-chain transactions of GHST. Each eGHST token is backed by a basket of stablecoins in the ghostDAO treasury, giving it an intrinsic value that it cannot fall below.
## Usage
You need to install [foundry](https://getfoundry.sh/) or use contracts from `/src` folder with any tool you are comfortable with.
### Clone
```shell
git clone https://git.ghostchain.io/ghostchain/ghost-dao-contracts.git
```
### Foundry preparation
```shell
git submodule init
git submodule update
forge soldeer install
```
### Build contracts
```shell
$ forge build
```
### Test contracts
```shell
$ forge test
```
### Environment
```shell
$ cp .env.template .env
# populate the .env file with specific values for environment variables
```
### Local deployment
```shell
# in first terminal
$ anvil
# in second terminal
$ ./deployer.sh --network anvil-localnet
```
### Deployer help
```shell
$ ./deployer.sh --help
```
## Technologies Used
[Foundry](https://getfoundry.sh/) is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.
Foundry consists of: Foundry consists of:
@ -8,59 +65,3 @@ Foundry consists of:
- **Cast**: Swiss army knife for interacting with EVM smart contracts, sending transactions and getting chain data. - **Cast**: Swiss army knife for interacting with EVM smart contracts, sending transactions and getting chain data.
- **Anvil**: Local Ethereum node, akin to Ganache, Hardhat Network. - **Anvil**: Local Ethereum node, akin to Ganache, Hardhat Network.
- **Chisel**: Fast, utilitarian, and verbose solidity REPL. - **Chisel**: Fast, utilitarian, and verbose solidity REPL.
## Documentation
https://book.getfoundry.sh/
## Usage
### Build
```shell
$ forge build
```
### Test
```shell
$ forge test
```
### Format
```shell
$ forge fmt
```
### Gas Snapshots
```shell
$ forge snapshot
```
### Anvil
```shell
$ anvil
```
### Deploy
```shell
$ forge script script/Counter.s.sol:CounterScript --rpc-url <your_rpc_url> --private-key <your_private_key>
```
### Cast
```shell
$ cast <subcommand>
```
### Help
```shell
$ forge --help
$ anvil --help
$ cast --help
```

View File

@ -3,7 +3,7 @@ set -e
AVAILIABLE_NETWORKS=(anvil-localnet sepolia-testnet hoodi-testnet) AVAILIABLE_NETWORKS=(anvil-localnet sepolia-testnet hoodi-testnet)
NETWORK="${AVAILIABLE_NETWORKS[0]}" NETWORK="${AVAILIABLE_NETWORKS[0]}"
START=1 START=1
END=12 END=13
VERIFY_NEEDED="--verify" VERIFY_NEEDED="--verify"
usage() { usage() {
@ -24,9 +24,10 @@ usage() {
echo "7) BondDepository" echo "7) BondDepository"
echo "8) StakingDistributor" echo "8) StakingDistributor"
echo "9) BondingCalculator" echo "9) BondingCalculator"
echo "10) AfterPartyFirst" echo "10) Gatekeeper"
echo "11) AfterPartySecond" echo "11) AfterPartyFirst"
echo "12) AfterPartyThird" echo "12) AfterPartySecond"
echo "13) AfterPartyThird"
exit 1 exit 1
} }
@ -105,10 +106,12 @@ for i in $(seq $START $END); do
elif [ "9" == "$i" ]; then elif [ "9" == "$i" ]; then
CONTRACT="BondingCalculator" CONTRACT="BondingCalculator"
elif [ "10" == "$i" ]; then elif [ "10" == "$i" ]; then
CONTRACT="AfterPartyFirst" CONTRACT="Gatekeeper"
elif [ "11" == "$i" ]; then elif [ "11" == "$i" ]; then
CONTRACT="AfterPartySecond" CONTRACT="AfterPartyFirst"
elif [ "12" == "$i" ]; then elif [ "12" == "$i" ]; then
CONTRACT="AfterPartySecond"
elif [ "13" == "$i" ]; then
CONTRACT="AfterPartyThird" CONTRACT="AfterPartyThird"
else else
echo "No contract found for index $i" echo "No contract found for index $i"