Skip to content

Instantly share code, notes, and snippets.

View z0r0z's full-sized avatar
💭
codin qualia 🪄

ross z0r0z

💭
codin qualia 🪄
View GitHub Profile
@z0r0z
z0r0z / HODLPACGovernor.sol
Created November 3, 2021 18:00
HODLPACGovernor
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
import "@openzeppelin/contracts@4.3.2/governance/Governor.sol";
import "@openzeppelin/contracts@4.3.2/governance/compatibility/GovernorCompatibilityBravo.sol";
import "@openzeppelin/contracts@4.3.2/governance/extensions/GovernorVotes.sol";
import "@openzeppelin/contracts@4.3.2/governance/extensions/GovernorVotesQuorumFraction.sol";
import "@openzeppelin/contracts@4.3.2/governance/extensions/GovernorTimelockControl.sol";
contract HODLPACGovernor is Governor, GovernorCompatibilityBravo, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {
@z0r0z
z0r0z / LexRegistry.sol
Last active November 3, 2021 20:07 — forked from nerderlyne/LexRegistry.sol
LexDAO Lawyer Registry Contract
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity >=0.8.0;
contract LexRegistry {
address public owner;
mapping(address => Lawyer) lawyers;
struct Lawyer {
@z0r0z
z0r0z / LexRegistry.sol
Last active November 3, 2021 20:32
iykyk
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity >=0.8.0;
contract LexRegistry {
address public owner;
mapping(address => Lawyer) public lawyers;
struct Lawyer {
@z0r0z
z0r0z / VoteToken.sol
Created November 5, 2021 07:42
minimalist, optimized governance token for DAOz
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity >=0.8.0;
/// @notice Modern and gas efficient ERC20 + EIP-2612 implementation with COMP-style governance,
/// @author Adapted from RariCapital, https://github.com/Rari-Capital/solmate/blob/main/src/erc20/ERC20.sol,
/// License-Identifier: AGPL-3.0-only.
contract VoteToken {
/*///////////////////////////////////////////////////////////////
EVENTS
@z0r0z
z0r0z / LiteDAO.sol
Created November 5, 2021 08:09
minimalist voting module that plugs into voting token
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity >=0.8.0;
/// @notice Vote Token interface.
interface IVoteToken {
function balanceOf(address account) external view returns (uint256);
function getPriorVotes(address account, uint256 timestamp) external view returns (uint256);
function mint(address to, uint256 amount) external;
function burn(address from, uint256 amount) external;
@z0r0z
z0r0z / NFTWrapper.sol
Created November 5, 2021 16:12
derivatives yay
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity >=0.8.0;
/// @notice Modern and gas efficient ERC-721 + ERC-20/EIP-2612-like implementation.
contract LexNFT {
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
event Approval(address indexed owner, address indexed spender, uint256 indexed tokenId);
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity >=0.8.0;
/// @notice Modern and gas efficient ERC-721 + ERC-20/EIP-2612-like implementation.
contract LexNFT {
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
event Approval(address indexed owner, address indexed spender, uint256 indexed tokenId);
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
@z0r0z
z0r0z / combining token into dao
Last active November 8, 2021 01:07
LiteDAOfactory.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity >=0.8.0;
/// @notice Modern and gas efficient ERC20 + EIP-2612 implementation with COMP-style governance,
/// @author Adapted from RariCapital, https://github.com/Rari-Capital/solmate/blob/main/src/erc20/ERC20.sol,
/// License-Identifier: AGPL-3.0-only.
contract LiteDAOtoken {
/*///////////////////////////////////////////////////////////////
EVENTS
@z0r0z
z0r0z / LiteDAO.sol
Created November 8, 2021 09:00
collapsing into dao file
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity >=0.8.0;
/// @notice Modern and gas efficient ERC20 + EIP-2612 implementation with COMP-style governance,
/// @author Adapted from RariCapital, https://github.com/Rari-Capital/solmate/blob/main/src/erc20/ERC20.sol,
/// License-Identifier: AGPL-3.0-only.
contract LiteDAOtoken {
/*///////////////////////////////////////////////////////////////
EVENTS
@z0r0z
z0r0z / DAO.sol
Created November 12, 2021 17:29
simplest dao ever
// SPDX-License-Identifier: MIT
pragma solidity 0.8.0;
contract DAO {
address[] public members;
mapping(address => bool) public verified;
function addMember(address newMember) external {