Skip to content

Commit

Permalink
Merge pull request #277 from MiltonTulli/update-v2
Browse files Browse the repository at this point in the history
Update v2 contracts
  • Loading branch information
rossneilson authored Mar 21, 2023
2 parents 694f88f + f83bb31 commit ff4e366
Show file tree
Hide file tree
Showing 39 changed files with 270 additions and 545 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/preview-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ jobs:
uses: actions/checkout@v2

- name: Cloning contracts
run: git clone -b v2.0 https://github.com/DXgovernance/dxdao-contracts packages/dxdao-contracts
run: git clone -b v2.0 https://github.com/DXgovernance/dxdao-contracts packages/dxdao-contracts && git submodule sync packages/dxdao-contracts
# TODO: Replace v2.0 to develop after https://github.com/DXgovernance/dxdao-contracts/pull/277 is merged

- name: Pnpm setup
uses: pnpm/action-setup@v2
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/tests-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ jobs:
set-safe-directory: false

- name: Cloning contracts
run: git clone -b v2.0 https://github.com/DXgovernance/dxdao-contracts packages/dxdao-contracts
run: git clone -b v2.0 https://github.com/DXgovernance/dxdao-contracts packages/dxdao-contracts && git submodule sync packages/dxdao-contracts
# TODO: Replace v2.0 to develop after https://github.com/DXgovernance/dxdao-contracts/pull/277 is merged

- name: Pnpm setup
uses: pnpm/action-setup@v2
Expand Down
3 changes: 1 addition & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[submodule "dxdao-contracts"]
path = packages/dxdao-contracts
url = https://github.com/DXgovernance/dxdao-contracts.git
branch = v2.0
url = "https://github.com/DXgovernance/dxdao-contracts.git#9dc284ce224962bd2e80e30bcdc2f863bb35a099"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
## How to setup

1. Create a fork of this repo.
2. Clone your fork installing submodules `git clone --recurse-submodules [your-github-fork-url.git]`. If you clone this repo without `--recurse-submodules` be sure to go to `packages/dxdao-contracts` and clone necesary branch pointed in `./.gitmodules` file.
2. Clone your fork installing submodules `git clone --recurse-submodules [your-github-fork-url.git]`. If you clone this repo without `--recurse-submodules` be sure to go to `packages/dxdao-contracts` and clone necesary branch/commit pointed in `./.gitmodules` file. Or do `git submodule sync packages/dxdao-contracts` sync.
3. Install dependencies `pnpm i`
4. Make an `.env` file in the `./packages/dev-scripts` folder (see `.env.example`) and write a seed phrase and deploy salt for hardhat.
5. Make an `.env` file in the `./apps/davi` folder (see `.env.example`).
Expand Down
33 changes: 7 additions & 26 deletions apps/dao-subgraph/abis/DAOController.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions apps/dao-subgraph/abis/DAOReputation.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions apps/dao-subgraph/abis/PermissionRegistry.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions apps/dao-subgraph/abis/Scheme.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@
"name": "Scheme__CallFailed",
"type": "error"
},
{
"inputs": [],
"name": "Scheme__CannotInitTwice",
"type": "error"
},
{
"inputs": [],
"name": "Scheme__ControllerAddressCannotBeZero",
Expand Down Expand Up @@ -59,6 +54,11 @@
"name": "Scheme__ProposalMustBeSubmitted",
"type": "error"
},
{
"inputs": [],
"name": "VotingMachineCallbacks__OnlyVotingMachine",
"type": "error"
},
{
"anonymous": false,
"inputs": [
Expand Down
115 changes: 56 additions & 59 deletions apps/dao-subgraph/abis/VotingMachine.json

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions apps/dao-subgraph/src/mappings/Scheme/mapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,8 @@ export function handleProposalStateChange(event: ProposalStateChange): void {
.getParamsHash()
.toHexString();
proposal.daoBounty = proposalDataFromVotingMachine.getDaoBounty();
proposal.totalStakes = proposalDataFromVotingMachine.getTotalStakes();
proposal.secondsFromTimeOutTillExecuteBoosted =
proposalDataFromVotingMachine.getSecondsFromTimeOutTillExecuteBoosted();
proposal.daoRedeemedWinnings =
proposalDataFromVotingMachine.getDaoRedeemedWinnings();
proposal.boostedPhaseTime = proposalTimes[1];
proposal.preBoostedPhaseTime = proposalTimes[2];

Expand Down
3 changes: 1 addition & 2 deletions apps/dao-subgraph/src/mappings/Scheme/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@ type Proposal @entity {
currentBoostedVotePeriodLimit: BigInt
paramsHash: String
daoBounty: BigInt
totalStakes: BigInt
secondsFromTimeOutTillExecuteBoosted: BigInt
boostedPhaseTime: BigInt
preBoostedPhaseTime: BigInt
daoRedeemedWinnings: Boolean

# Related entities
votes: [Vote!] @derivedFrom(field: "proposal")
Expand Down
14 changes: 7 additions & 7 deletions apps/davi/src/contracts/AvatarScheme.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions apps/davi/src/contracts/BaseERC20Guild.json

Large diffs are not rendered by default.

38 changes: 36 additions & 2 deletions apps/davi/src/contracts/Create2Deployer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
"contractName": "Create2Deployer",
"sourceName": "contracts/utils/Create2Deployer.sol",
"abi": [
{
"inputs": [],
"name": "Create2Deployer__InitializedFailed",
"type": "error"
},
{
"anonymous": false,
"inputs": [
Expand All @@ -17,6 +22,12 @@
"internalType": "bytes32",
"name": "bytecodeHash",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "uint256",
"name": "salt",
"type": "uint256"
}
],
"name": "Deployed",
Expand All @@ -39,10 +50,33 @@
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes",
"name": "code",
"type": "bytes"
},
{
"internalType": "uint256",
"name": "salt",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "initializeCallData",
"type": "bytes"
}
],
"name": "deployAndInitialize",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"bytecode": "0x608060405234801561001057600080fd5b506101fa806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80639c4ae2d014610030575b600080fd5b61004361003e3660046100e0565b610045565b005b6000818351602085016000f59050803b61005e57600080fd5b7f94bfd9af14ef450884c8a7ddb5734e2e1e14e70a1c84f0801cc5a29e34d2642881846040516020016100919190610195565b60408051601f1981840301815282825280516020918201206001600160a01b0390941683528201929092520160405180910390a1505050565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156100f357600080fd5b823567ffffffffffffffff8082111561010b57600080fd5b818501915085601f83011261011f57600080fd5b813581811115610131576101316100ca565b604051601f8201601f19908116603f01168101908382118183101715610159576101596100ca565b8160405282815288602084870101111561017257600080fd5b826020860160208301376000602093820184015298969091013596505050505050565b6000825160005b818110156101b6576020818601810151858301520161019c565b50600092019182525091905056fea26469706673582212200018fa486fa0dd2134571d1c76dbc445e76628b28b687cc9b56a419e1b6b765964736f6c63430008110033",
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c80639c4ae2d014610030575b600080fd5b61004361003e3660046100e0565b610045565b005b6000818351602085016000f59050803b61005e57600080fd5b7f94bfd9af14ef450884c8a7ddb5734e2e1e14e70a1c84f0801cc5a29e34d2642881846040516020016100919190610195565b60408051601f1981840301815282825280516020918201206001600160a01b0390941683528201929092520160405180910390a1505050565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156100f357600080fd5b823567ffffffffffffffff8082111561010b57600080fd5b818501915085601f83011261011f57600080fd5b813581811115610131576101316100ca565b604051601f8201601f19908116603f01168101908382118183101715610159576101596100ca565b8160405282815288602084870101111561017257600080fd5b826020860160208301376000602093820184015298969091013596505050505050565b6000825160005b818110156101b6576020818601810151858301520161019c565b50600092019182525091905056fea26469706673582212200018fa486fa0dd2134571d1c76dbc445e76628b28b687cc9b56a419e1b6b765964736f6c63430008110033",
"bytecode": "0x608060405234801561001057600080fd5b506103b9806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806384bf19d01461003b5780639c4ae2d014610050575b600080fd5b61004e6100493660046102a2565b610063565b005b61004e61005e36600461030f565b610172565b6000828451602086016000f59050803b61007c57600080fd5b6000816001600160a01b03166000846040516100989190610354565b60006040518083038185875af1925050503d80600081146100d5576040519150601f19603f3d011682016040523d82523d6000602084013e6100da565b606091505b50509050806100fc5760405163f63911b960e01b815260040160405180910390fd5b7fc877950e53df8be800e454c6b5998cc737fca2ea44c18e91aac5f37b60419fc4828660405160200161012f9190610354565b60408051601f1981840301815282825280516020918201206001600160a01b03909416835282019290925290810186905260600160405180910390a15050505050565b6000818351602085016000f59050803b61018b57600080fd5b7fc877950e53df8be800e454c6b5998cc737fca2ea44c18e91aac5f37b60419fc481846040516020016101be9190610354565b60408051601f1981840301815282825280516020918201206001600160a01b03909416835282019290925290810184905260600160405180910390a1505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261022657600080fd5b813567ffffffffffffffff80821115610241576102416101ff565b604051601f8301601f19908116603f01168101908282118183101715610269576102696101ff565b8160405283815286602085880101111561028257600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806000606084860312156102b757600080fd5b833567ffffffffffffffff808211156102cf57600080fd5b6102db87838801610215565b94506020860135935060408601359150808211156102f857600080fd5b5061030586828701610215565b9150509250925092565b6000806040838503121561032257600080fd5b823567ffffffffffffffff81111561033957600080fd5b61034585828601610215565b95602094909401359450505050565b6000825160005b81811015610375576020818601810151858301520161035b565b50600092019182525091905056fea2646970667358221220f6548198c3b1dff8afba60d690b9373dd9fe0893b45d9d13beb0c3712c89e22b64736f6c63430008110033",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c806384bf19d01461003b5780639c4ae2d014610050575b600080fd5b61004e6100493660046102a2565b610063565b005b61004e61005e36600461030f565b610172565b6000828451602086016000f59050803b61007c57600080fd5b6000816001600160a01b03166000846040516100989190610354565b60006040518083038185875af1925050503d80600081146100d5576040519150601f19603f3d011682016040523d82523d6000602084013e6100da565b606091505b50509050806100fc5760405163f63911b960e01b815260040160405180910390fd5b7fc877950e53df8be800e454c6b5998cc737fca2ea44c18e91aac5f37b60419fc4828660405160200161012f9190610354565b60408051601f1981840301815282825280516020918201206001600160a01b03909416835282019290925290810186905260600160405180910390a15050505050565b6000818351602085016000f59050803b61018b57600080fd5b7fc877950e53df8be800e454c6b5998cc737fca2ea44c18e91aac5f37b60419fc481846040516020016101be9190610354565b60408051601f1981840301815282825280516020918201206001600160a01b03909416835282019290925290810184905260600160405180910390a1505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261022657600080fd5b813567ffffffffffffffff80821115610241576102416101ff565b604051601f8301601f19908116603f01168101908282118183101715610269576102696101ff565b8160405283815286602085880101111561028257600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806000606084860312156102b757600080fd5b833567ffffffffffffffff808211156102cf57600080fd5b6102db87838801610215565b94506020860135935060408601359150808211156102f857600080fd5b5061030586828701610215565b9150509250925092565b6000806040838503121561032257600080fd5b823567ffffffffffffffff81111561033957600080fd5b61034585828601610215565b95602094909401359450505050565b6000825160005b81811015610375576020818601810151858301520161035b565b50600092019182525091905056fea2646970667358221220f6548198c3b1dff8afba60d690b9373dd9fe0893b45d9d13beb0c3712c89e22b64736f6c63430008110033",
"linkReferences": {},
"deployedLinkReferences": {}
}
4 changes: 2 additions & 2 deletions apps/davi/src/contracts/DXDGuild.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions apps/davi/src/contracts/ERC20Guild.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions apps/davi/src/contracts/ERC20GuildUpgradeable.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions apps/davi/src/contracts/ERC20GuildWithERC1271.json

Large diffs are not rendered by default.

Loading

1 comment on commit ff4e366

@vercel
Copy link

@vercel vercel bot commented on ff4e366 Mar 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.