Compare commits
No commits in common. "439fe1737109a3abb4eeaff0d7bd3cf1229d3779" and "8e2caaba0f71b7c4950289670bbd7b617f42c6b5" have entirely different histories.
439fe17371
...
8e2caaba0f
@ -84,9 +84,6 @@ 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
117
README.md
@ -1,63 +1,6 @@
|
|||||||
## Ghost DAO protocol
|
## Foundry
|
||||||
|
|
||||||
[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.
|
**Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.**
|
||||||
|
|
||||||
## 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:
|
||||||
|
|
||||||
@ -65,3 +8,59 @@ 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
|
||||||
|
```
|
||||||
|
15
deployer.sh
15
deployer.sh
@ -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=13
|
END=12
|
||||||
VERIFY_NEEDED="--verify"
|
VERIFY_NEEDED="--verify"
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
@ -24,10 +24,9 @@ usage() {
|
|||||||
echo "7) BondDepository"
|
echo "7) BondDepository"
|
||||||
echo "8) StakingDistributor"
|
echo "8) StakingDistributor"
|
||||||
echo "9) BondingCalculator"
|
echo "9) BondingCalculator"
|
||||||
echo "10) Gatekeeper"
|
echo "10) AfterPartyFirst"
|
||||||
echo "11) AfterPartyFirst"
|
echo "11) AfterPartySecond"
|
||||||
echo "12) AfterPartySecond"
|
echo "12) AfterPartyThird"
|
||||||
echo "13) AfterPartyThird"
|
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -106,12 +105,10 @@ 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="Gatekeeper"
|
|
||||||
elif [ "11" == "$i" ]; then
|
|
||||||
CONTRACT="AfterPartyFirst"
|
CONTRACT="AfterPartyFirst"
|
||||||
elif [ "12" == "$i" ]; then
|
elif [ "11" == "$i" ]; then
|
||||||
CONTRACT="AfterPartySecond"
|
CONTRACT="AfterPartySecond"
|
||||||
elif [ "13" == "$i" ]; then
|
elif [ "12" == "$i" ]; then
|
||||||
CONTRACT="AfterPartyThird"
|
CONTRACT="AfterPartyThird"
|
||||||
else
|
else
|
||||||
echo "No contract found for index $i"
|
echo "No contract found for index $i"
|
||||||
|
Loading…
Reference in New Issue
Block a user