Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ node_modules/
build/
artifacts/
cache/
flattened/
flattened/
out/
9 changes: 9 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[submodule "lib/openzeppelin-contracts"]
path = lib/openzeppelin-contracts
url = https://github.com/OpenZeppelin/openzeppelin-contracts
[submodule "lib/solady"]
path = lib/solady
url = https://github.com/vectorized/solady
[submodule "lib/forge-std"]
path = lib/forge-std
url = https://github.com/foundry-rs/forge-std
49 changes: 29 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,38 +18,49 @@ A smart contract suite for actionable governance within NFT communities.

## Prerequisites

* npm
* hardhat
* Foundry (forge, cast, anvil)
* Git

`npm install`
## Installation

## Compile

`npx hardhat compile`

## Build Go Bindings
1. Install Foundry:
```bash
curl -L https://foundry.paradigm.xyz | bash
foundryup
```

solc --abi contracts/OGREDAO.sol
solc --bin contracts/OGREDAO.sol
abigen --bin=Store_sol_Store.bin --abi=Store_sol_Store.abi --pkg=dao --out=go/OGREDAO.go
2. Clone the repository:
```bash
git clone https://github.com/craigbranscom/OGRE.git
cd OGRE
```

`docker run -v ~/GitHub/OGRE/:/sources ethereum/solc:0.8.17 -o sources/go --abi --bin /sources/contracts/OGREDAO.sol`
3. Install dependencies:
```bash
forge install
```

`abigen --abi=./output/OGREDAO.abi --pkg=dao --out=go/OGREDAO.go`
## Compile

## Run Hardhat Tasks and Scripts
```bash
forge build
```

`npx hardhat balance --account 0x...`
## Test

`npx hardhat run --network localhost scripts/populate.js`
```bash
forge test
```

## Deploy Contract Factories

The `factories` folder contains simple factory contracts that deploy copies of their respective contracts. The `OGREDAOFactory` produces `OGREDAOs`, `OGRE721Factory` produces `OGRE721s`, etc.

Run `npx hardhat run scripts/deployFactories.js` to deploy all factory contracts. This only needs to be done once per network, per factory version. New factory contracts should be deployed that produce updated versions of their respective contracts.
To deploy a factory contract:

For example, if the `OGREProposal` contract is updated from v1.0 to v1.1 then a new `OGREProposalFactory` contract should also be deployed that will produce the new v1.1 proposals. Of course older factories will always remain on chain, so DAOs can choose which factory will produce a given proposal.
```bash
forge create src/factories/OGREDAOFactory.sol:OGREDAOFactory --rpc-url <RPC_URL> --private-key <PRIVATE_KEY>
```

## Create a DAO

Expand All @@ -71,8 +82,6 @@ DAO members can draft new proposals for the DAO, which can include an array of A

### Configure Proposal



# Contracts Breakdown

## Base Contracts
Expand Down
33 changes: 0 additions & 33 deletions contracts/OGRE721.sol

This file was deleted.

Loading