-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
35 changed files
with
14,941 additions
and
8,155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
{ | ||
"require": "ts-node/register", | ||
"timeout": "10000", | ||
"timeout": 10000, | ||
"watch-files": ["test/**/*.ts"], | ||
"mochaOptions": { | ||
"exit": true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"singleQuote": true, | ||
"printWidth": 155 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
configureYulOptimizer: true | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"plugins": ["prettier"], | ||
"rules": { | ||
"prettier/prettier": "error" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,18 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.18; | ||
|
||
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; | ||
import '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol'; | ||
|
||
contract DAOVerifier { | ||
|
||
bytes32 public merkleRoot; | ||
|
||
constructor(bytes32 _merkleRoot) { | ||
merkleRoot = _merkleRoot; | ||
} | ||
|
||
function verifyIsIncluded(bytes32[] calldata proof, uint64 maxAllowanceToMint) view public returns (bool) { | ||
function verifyIsIncluded(bytes32[] calldata proof, uint64 maxAllowanceToMint) public view returns (bool) { | ||
bytes32 leaf = keccak256(abi.encode(msg.sender, maxAllowanceToMint)); | ||
bool verified = MerkleProof.verify(proof, merkleRoot, leaf); | ||
return verified; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.18; | ||
|
||
import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | ||
import '@openzeppelin/contracts/token/ERC20/ERC20.sol'; | ||
|
||
contract ERC20Development is ERC20 { | ||
|
||
constructor(string memory _name, string memory _symbol, uint256 _totalSupply) ERC20(_name, _symbol) { | ||
_mint(msg.sender, _totalSupply); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,23 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.18; | ||
|
||
import "./Dao.sol"; | ||
import "../pool/ERC20DaoPool.sol"; | ||
import './Dao.sol'; | ||
import '../pool/ERC20DaoPool.sol'; | ||
|
||
contract ERC20Dao is Dao { | ||
|
||
ERC20DaoPool public daoPool; | ||
|
||
constructor(address _daoTokenAddress, uint256 _tokenCollateral, uint256 _challengePeriodSeconds, uint256 _nativeCollateral) | ||
Dao(_tokenCollateral, _challengePeriodSeconds, _nativeCollateral) { | ||
constructor( | ||
address _daoTokenAddress, | ||
uint256 _tokenCollateral, | ||
uint256 _challengePeriodSeconds, | ||
uint256 _nativeCollateral | ||
) Dao(_tokenCollateral, _challengePeriodSeconds, _nativeCollateral) { | ||
daoPool = new ERC20DaoPool(_daoTokenAddress); | ||
emit DaoPoolCreated(address(daoPool)); | ||
} | ||
|
||
function getDaoPool() override view internal returns (DaoPool) { | ||
function getDaoPool() internal view override returns (DaoPool) { | ||
return daoPool; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,23 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.18; | ||
|
||
import "./Dao.sol"; | ||
import "../pool/NFTDaoPool.sol"; | ||
import './Dao.sol'; | ||
import '../pool/NFTDaoPool.sol'; | ||
|
||
contract NFTDao is Dao { | ||
|
||
NFTDaoPool public daoPool; | ||
|
||
constructor(address _daoTokenAddress, uint256 _tokenCollateral, uint256 _challengePeriodSeconds, uint256 _nativeCollateral) | ||
Dao(_tokenCollateral, _challengePeriodSeconds, _nativeCollateral) { | ||
constructor( | ||
address _daoTokenAddress, | ||
uint256 _tokenCollateral, | ||
uint256 _challengePeriodSeconds, | ||
uint256 _nativeCollateral | ||
) Dao(_tokenCollateral, _challengePeriodSeconds, _nativeCollateral) { | ||
daoPool = new NFTDaoPool(_daoTokenAddress); | ||
emit DaoPoolCreated(address(daoPool)); | ||
} | ||
|
||
function getDaoPool() override view internal returns (DaoPool) { | ||
function getDaoPool() internal view override returns (DaoPool) { | ||
return daoPool; | ||
} | ||
} | ||
} |
Oops, something went wrong.