Contract 0x1aAF0d0305B8e5685bCA94F35409547fA4bCD548

Contract Overview

Balance:
0 Ether
Txn Hash
Method
Block
From
To
Value
0x39c5e3fe49ec769c5c9453ecbdab4ed3bb3674ef13e331494b8439d1c06648f8Deploy Kali DAO114648922022-09-29 13:02:181 day 9 hrs ago0xf1eac43905c4b8412a8c747f1f6eccac17eb9b04 IN  0x1aaf0d0305b8e5685bca94f35409547fa4bcd5480 Ether0.00085405 1.5
0x5a2e0b794ff73e81d703ced8ba08ce02e1526ead1cfc764dbfdb734473f6d9c1Deploy Kali DAO114521362022-09-27 7:26:113 days 14 hrs ago0x0f51399fff3c9705ba6d4380ba483bb791c505c5 IN  0x1aaf0d0305b8e5685bca94f35409547fa4bcd5480 Ether0.0009997 1.5
0x780fed7c8b70c8cb61feff003923f7a42838fdec43f8a60cbb085ebb77d780ddDeploy Kali DAO114270752022-09-22 22:20:307 days 23 hrs ago0x18cd3c1ba94d45853851ba7ddc19e0d142ad2f75 IN  0x1aaf0d0305b8e5685bca94f35409547fa4bcd5480 Ether0.00155217 1.5
0x3c1ab449ac9be23748e3022ecfb61ba99068b587a58bed5c90ab03ad775ca91bDeploy Kali DAO114264562022-09-22 19:44:548 days 2 hrs ago0xbe9bd66bbeadb6c2459de837dfd56e8ac0695650 IN  0x1aaf0d0305b8e5685bca94f35409547fa4bcd5480 Ether0.00250934 2.425
0x5adc004e447f7c16a2a7f6955ddc3b0e10acec50602ba0eed8ba6ff4e2b8dbf9Deploy Kali DAO114226532022-09-22 3:45:228 days 18 hrs ago0x4a625d7030bd63bb1063587be4cff6db5f60aa77 IN  0x1aaf0d0305b8e5685bca94f35409547fa4bcd5480 Ether0.00155217 1.5
0x762fc99693ff17d8e7c71370cafdea038db00e08cca7913edc86438a79278078Deploy Kali DAO114226452022-09-22 3:43:228 days 18 hrs ago0x4a625d7030bd63bb1063587be4cff6db5f60aa77 IN  0x1aaf0d0305b8e5685bca94f35409547fa4bcd5480 Ether0.00155217 1.5
0x9b1490b622c1c779550a7e267f01118e2222839a7a6a302a378c8226c8e9111eDeploy Kali DAO114078132022-09-19 13:29:1911 days 8 hrs ago0xb2cd14f4f505161bc79f9f28571993721c564132 IN  0x1aaf0d0305b8e5685bca94f35409547fa4bcd5480 Ether0.00155201 1.5
0xbd292ca411d0d2d5cc7df628f8a0b2fe5f4bf1be8b08450aeb2e07deee0b62beDeploy Kali DAO114077992022-09-19 13:25:4711 days 8 hrs ago0xb2cd14f4f505161bc79f9f28571993721c564132 IN  0x1aaf0d0305b8e5685bca94f35409547fa4bcd5480 Ether0.00099973 1.5
0x44ce374f48e0db04c59bce3cf8496149b718f3888241835f2283f0db939f4140Deploy Kali DAO112519762022-08-23 9:04:5138 days 13 hrs ago0x1a2d045380ee3bff01a244882cefdb805ade7267 IN  0x1aaf0d0305b8e5685bca94f35409547fa4bcd5480 Ether0.0010009 1.50193676
0x0a359b9365fb445217c85829d1bd169cb55c10d39a3a3df94d85dbfc864db5a6Deploy Kali DAO112517732022-08-23 8:13:4938 days 14 hrs ago0x1a2d045380ee3bff01a244882cefdb805ade7267 IN  0x1aaf0d0305b8e5685bca94f35409547fa4bcd5480 Ether0.00100541 1.50867653
0xf272b2f9b78395cd0d40028c2a580c8152cd46a42553c10a7d82d55410694179Deploy Kali DAO112460032022-08-22 8:10:1939 days 14 hrs ago0xfe383519e6113593884de4a36794768261fda477 IN  0x1aaf0d0305b8e5685bca94f35409547fa4bcd5480 Ether0.0011273 1.52009095
0x4f2b77dfd2315e7576a004c575ce255daa3d05954b2099e9d8336ce5d3d9f09dDeploy Kali DAO112191102022-08-17 15:59:4744 days 6 hrs ago0xa87bb815ec87dfef4d40fe3a0d4d5e2676cd1586 IN  0x1aaf0d0305b8e5685bca94f35409547fa4bcd5480 Ether0.00245777 3.00000005
0x5a154be97b5d6df0acb78fc76ea13248806bf86542cea8e16ce23d5a8d2d21d2Deploy Kali DAO112190132022-08-17 15:35:3144 days 6 hrs ago0xa87bb815ec87dfef4d40fe3a0d4d5e2676cd1586 IN  0x1aaf0d0305b8e5685bca94f35409547fa4bcd5480 Ether0.00233364 3.0000005
0x9b9c0be87da4fcf6ed114d25aae441d210fa6bdf6af1d5f83b27423bd73dad32Deploy Kali DAO112146182022-08-16 21:14:0245 days 1 hr ago0x3119de19323d2f173f3e104271679eb7322aa589 IN  0x1aaf0d0305b8e5685bca94f35409547fa4bcd5480 Ether0.00148115 1.5
0xbed10b0c595f458d49329249574dc91a0364afea4f4ca2db0803edf226f28b5eDeploy Kali DAO111333402022-08-02 17:36:2859 days 4 hrs ago0x1c0aa8ccd568d90d61659f060d1bfb1e6f855a20 IN  0x1aaf0d0305b8e5685bca94f35409547fa4bcd5480 Ether0.00101424 1.56848067
0x24f3df613346ed0c8a00eefeaf1b3c75c68f2eafc3103f8eba99d520f4bafc8aDeploy Kali DAO111332402022-08-02 17:11:2359 days 5 hrs ago0x1c0aa8ccd568d90d61659f060d1bfb1e6f855a20 IN  0x1aaf0d0305b8e5685bca94f35409547fa4bcd5480 Ether0.00137324 1.94000324
0x7b519885477b10149bf7eaf282f18077923050a7a4efbcae45b721397dd8bfc3Deploy Kali DAO111332222022-08-02 17:06:5359 days 5 hrs ago0x1c0aa8ccd568d90d61659f060d1bfb1e6f855a20 IN  0x1aaf0d0305b8e5685bca94f35409547fa4bcd5480 Ether0.00099966 1.50000001
0xc6e5a3fddd992475fc183529aaf71eb678a84858b4391c3e28571ffa4488b8c5Deploy Kali DAO111331022022-08-02 16:36:5159 days 5 hrs ago0x1c0aa8ccd568d90d61659f060d1bfb1e6f855a20 IN  0x1aaf0d0305b8e5685bca94f35409547fa4bcd5480 Ether0.00099966 1.5
0xdac8bbd314d950233cf70500518c4e61b2ac744543cc96fc11054e8a74c10df4Deploy Kali DAO111136092022-07-30 7:13:5762 days 15 hrs ago0xc316f415096223561e2077c30a26043499d579ad IN  0x1aaf0d0305b8e5685bca94f35409547fa4bcd5480 Ether0.00139819 1.5
0xf9aa8dd25ebc4ccd852b0818d308280165199ecdfc21a5187cdeee6b57d719efDeploy Kali DAO111097382022-07-29 15:02:1263 days 7 hrs ago0xd5b3988ed0ab5ec375e51bb6fd10e205cec16a2e IN  0x1aaf0d0305b8e5685bca94f35409547fa4bcd5480 Ether0.00099999 1.50000002
0x8c5ec2a7f9a47c0eda1784f4ad6e8f2b81b3b3ee9553566a3e73d66666696398Deploy Kali DAO110634452022-07-21 13:45:2471 days 8 hrs ago0x87ea07a35db6872340c07afbf3e305a7d829d42d IN  0x1aaf0d0305b8e5685bca94f35409547fa4bcd5480 Ether0.00099973 1.50000001
0xec59d3e129bc6eecfbb19bc41f9d24f8a48d1b181b73ce83f0039cd3e3ecc461Deploy Kali DAO110299922022-07-15 18:09:2277 days 4 hrs ago0x9b53bed0d62028c0fc5d2006c076cb33e6e6cecd IN  0x1aaf0d0305b8e5685bca94f35409547fa4bcd5480 Ether0.00117453 1.5
0xbabcf86eec91cda102823601b7c7030f8632a93ec404492e1ff612148af66905Deploy Kali DAO110260722022-07-15 1:47:3677 days 20 hrs ago0x4744cda32be7b3e75b9334001da9ed21789d4c0d IN  0x1aaf0d0305b8e5685bca94f35409547fa4bcd5480 Ether0.00139828 1.5
0xdcd33a24523619c7f8ff315e4814d311d5e44fb588c1b86eff8663a6ada5801aDeploy Kali DAO110107562022-07-12 9:52:0980 days 12 hrs ago0xcf9192559c45c7ebdd2c4e3369d8e5cde0647d7b IN  0x1aaf0d0305b8e5685bca94f35409547fa4bcd5480 Ether0.00099977 1.50000001
0xb1fcfa0998f9ea90025ffcc94c87c53e5c66237578b92764bd559edcbbfc60dfDeploy Kali DAO109855722022-07-08 0:45:4384 days 21 hrs ago0xbdd6b378da2a36f7c394cdd84ebde8292145e967 IN  0x1aaf0d0305b8e5685bca94f35409547fa4bcd5480 Ether0.00099977 1.5
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x39c5e3fe49ec769c5c9453ecbdab4ed3bb3674ef13e331494b8439d1c06648f8114648922022-09-29 13:02:181 day 9 hrs ago 0x1aaf0d0305b8e5685bca94f35409547fa4bcd548 0x071a4fcd864568cf7af32089f8d9503dc6b44fe70 Ether
0x39c5e3fe49ec769c5c9453ecbdab4ed3bb3674ef13e331494b8439d1c06648f8114648922022-09-29 13:02:181 day 9 hrs ago 0x1aaf0d0305b8e5685bca94f35409547fa4bcd548  Contract Creation0 Ether
0x5a2e0b794ff73e81d703ced8ba08ce02e1526ead1cfc764dbfdb734473f6d9c1114521362022-09-27 7:26:113 days 14 hrs ago 0x1aaf0d0305b8e5685bca94f35409547fa4bcd548 0xaed210630002f44bfb30b252f3de2ab3db07f53a0 Ether
0x5a2e0b794ff73e81d703ced8ba08ce02e1526ead1cfc764dbfdb734473f6d9c1114521362022-09-27 7:26:113 days 14 hrs ago 0x1aaf0d0305b8e5685bca94f35409547fa4bcd548  Contract Creation0 Ether
0xbd292ca411d0d2d5cc7df628f8a0b2fe5f4bf1be8b08450aeb2e07deee0b62be114077992022-09-19 13:25:4711 days 8 hrs ago 0x1aaf0d0305b8e5685bca94f35409547fa4bcd548 0x208bfad2f0d5ec522d6a03fe549d27e38b3adf250 Ether
0xbd292ca411d0d2d5cc7df628f8a0b2fe5f4bf1be8b08450aeb2e07deee0b62be114077992022-09-19 13:25:4711 days 8 hrs ago 0x1aaf0d0305b8e5685bca94f35409547fa4bcd548  Contract Creation0 Ether
0x44ce374f48e0db04c59bce3cf8496149b718f3888241835f2283f0db939f4140112519762022-08-23 9:04:5138 days 13 hrs ago 0x1aaf0d0305b8e5685bca94f35409547fa4bcd548 0xed7c70be676d9462b81ee7f56290fbfe8a7b626a0 Ether
0x44ce374f48e0db04c59bce3cf8496149b718f3888241835f2283f0db939f4140112519762022-08-23 9:04:5138 days 13 hrs ago 0x1aaf0d0305b8e5685bca94f35409547fa4bcd548  Contract Creation0 Ether
0x0a359b9365fb445217c85829d1bd169cb55c10d39a3a3df94d85dbfc864db5a6112517732022-08-23 8:13:4938 days 14 hrs ago 0x1aaf0d0305b8e5685bca94f35409547fa4bcd548 0xc558e49a95cb60c339dd8aa9d50bb2e21ee788100 Ether
0x0a359b9365fb445217c85829d1bd169cb55c10d39a3a3df94d85dbfc864db5a6112517732022-08-23 8:13:4938 days 14 hrs ago 0x1aaf0d0305b8e5685bca94f35409547fa4bcd548  Contract Creation0 Ether
0xf272b2f9b78395cd0d40028c2a580c8152cd46a42553c10a7d82d55410694179112460032022-08-22 8:10:1939 days 14 hrs ago 0x1aaf0d0305b8e5685bca94f35409547fa4bcd548 0x39e0a54ac7a6c2e3cad4cb52cf8e2c4e70d432fa0 Ether
0xf272b2f9b78395cd0d40028c2a580c8152cd46a42553c10a7d82d55410694179112460032022-08-22 8:10:1939 days 14 hrs ago 0x1aaf0d0305b8e5685bca94f35409547fa4bcd548  Contract Creation0 Ether
0x4f2b77dfd2315e7576a004c575ce255daa3d05954b2099e9d8336ce5d3d9f09d112191102022-08-17 15:59:4744 days 6 hrs ago 0x1aaf0d0305b8e5685bca94f35409547fa4bcd548 0xd45f8734539792619b3c4be0e24639845371a4810 Ether
0x4f2b77dfd2315e7576a004c575ce255daa3d05954b2099e9d8336ce5d3d9f09d112191102022-08-17 15:59:4744 days 6 hrs ago 0x1aaf0d0305b8e5685bca94f35409547fa4bcd548 0x1d7cf3cf7884666d2f385c2ed7460dd01a9eba4c0 Ether
0x4f2b77dfd2315e7576a004c575ce255daa3d05954b2099e9d8336ce5d3d9f09d112191102022-08-17 15:59:4744 days 6 hrs ago 0x1aaf0d0305b8e5685bca94f35409547fa4bcd548  Contract Creation0 Ether
0x5a154be97b5d6df0acb78fc76ea13248806bf86542cea8e16ce23d5a8d2d21d2112190132022-08-17 15:35:3144 days 6 hrs ago 0x1aaf0d0305b8e5685bca94f35409547fa4bcd548 0x4a23ae78c69b2fe59514dd0f7aea7c858ac54c780 Ether
0x5a154be97b5d6df0acb78fc76ea13248806bf86542cea8e16ce23d5a8d2d21d2112190132022-08-17 15:35:3144 days 6 hrs ago 0x1aaf0d0305b8e5685bca94f35409547fa4bcd548  Contract Creation0 Ether
0x9b9c0be87da4fcf6ed114d25aae441d210fa6bdf6af1d5f83b27423bd73dad32112146182022-08-16 21:14:0245 days 1 hr ago 0x1aaf0d0305b8e5685bca94f35409547fa4bcd548 0x77e7cc3c953ffb47b08b1d66a36dd9e8ea983d790 Ether
0x9b9c0be87da4fcf6ed114d25aae441d210fa6bdf6af1d5f83b27423bd73dad32112146182022-08-16 21:14:0245 days 1 hr ago 0x1aaf0d0305b8e5685bca94f35409547fa4bcd548  Contract Creation0 Ether
0xbed10b0c595f458d49329249574dc91a0364afea4f4ca2db0803edf226f28b5e111333402022-08-02 17:36:2859 days 4 hrs ago 0x1aaf0d0305b8e5685bca94f35409547fa4bcd548 0x4c5b050349257ef41981b32b6f859345083f1f880 Ether
0xbed10b0c595f458d49329249574dc91a0364afea4f4ca2db0803edf226f28b5e111333402022-08-02 17:36:2859 days 4 hrs ago 0x1aaf0d0305b8e5685bca94f35409547fa4bcd548  Contract Creation0 Ether
0x24f3df613346ed0c8a00eefeaf1b3c75c68f2eafc3103f8eba99d520f4bafc8a111332402022-08-02 17:11:2359 days 5 hrs ago 0x1aaf0d0305b8e5685bca94f35409547fa4bcd548 0xd45f8734539792619b3c4be0e24639845371a4810 Ether
0x24f3df613346ed0c8a00eefeaf1b3c75c68f2eafc3103f8eba99d520f4bafc8a111332402022-08-02 17:11:2359 days 5 hrs ago 0x1aaf0d0305b8e5685bca94f35409547fa4bcd548 0x5277b872896b0b9bef02ac29b3feaa0b564344650 Ether
0x24f3df613346ed0c8a00eefeaf1b3c75c68f2eafc3103f8eba99d520f4bafc8a111332402022-08-02 17:11:2359 days 5 hrs ago 0x1aaf0d0305b8e5685bca94f35409547fa4bcd548  Contract Creation0 Ether
0x7b519885477b10149bf7eaf282f18077923050a7a4efbcae45b721397dd8bfc3111332222022-08-02 17:06:5359 days 5 hrs ago 0x1aaf0d0305b8e5685bca94f35409547fa4bcd548 0xe5161b7ae4509299d4475c217c8ba1893ca6286a0 Ether
[ Download CSV Export 
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.

Contract Source Code Verified (Exact Match)

Contract Name:
KaliDAOfactory

Compiler Version
v0.8.11+commit.d7f03943

Optimization Enabled:
Yes with 11111 runs

Other Settings:
default evmVersion, GNU GPLv3 license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2022-02-14
*/

// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity >=0.8.4;

/// @notice Modern and gas-optimized ERC-20 + EIP-2612 implementation with COMP-style governance and pausing.
/// @author Modified from Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/erc20/ERC20.sol)
/// License-Identifier: AGPL-3.0-only
abstract contract KaliDAOtoken {
    /*///////////////////////////////////////////////////////////////
                            EVENTS
    //////////////////////////////////////////////////////////////*/

    event Transfer(address indexed from, address indexed to, uint256 amount);

    event Approval(address indexed owner, address indexed spender, uint256 amount);

    event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);

    event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance);

    event PauseFlipped(bool paused);

    /*///////////////////////////////////////////////////////////////
                            ERRORS
    //////////////////////////////////////////////////////////////*/

    error NoArrayParity();

    error Paused();

    error SignatureExpired();

    error NullAddress();

    error InvalidNonce();

    error NotDetermined();

    error InvalidSignature();

    error Uint32max();

    error Uint96max();

    /*///////////////////////////////////////////////////////////////
                            METADATA STORAGE
    //////////////////////////////////////////////////////////////*/

    string public name;

    string public symbol;

    uint8 public constant decimals = 18;

    /*///////////////////////////////////////////////////////////////
                            ERC-20 STORAGE
    //////////////////////////////////////////////////////////////*/

    uint256 public totalSupply;

    mapping(address => uint256) public balanceOf;

    mapping(address => mapping(address => uint256)) public allowance;

    /*///////////////////////////////////////////////////////////////
                            EIP-2612 STORAGE
    //////////////////////////////////////////////////////////////*/

    bytes32 public constant PERMIT_TYPEHASH =
        keccak256('Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)');

    uint256 internal INITIAL_CHAIN_ID;

    bytes32 internal INITIAL_DOMAIN_SEPARATOR;

    mapping(address => uint256) public nonces;

    /*///////////////////////////////////////////////////////////////
                            DAO STORAGE
    //////////////////////////////////////////////////////////////*/

    bool public paused;

    bytes32 public constant DELEGATION_TYPEHASH = 
        keccak256('Delegation(address delegatee,uint256 nonce,uint256 deadline)');

    mapping(address => address) internal _delegates;

    mapping(address => mapping(uint256 => Checkpoint)) public checkpoints;

    mapping(address => uint256) public numCheckpoints;

    struct Checkpoint {
        uint32 fromTimestamp;
        uint96 votes;
    }

    /*///////////////////////////////////////////////////////////////
                            CONSTRUCTOR
    //////////////////////////////////////////////////////////////*/

    function _init(
        string memory name_,
        string memory symbol_,
        bool paused_,
        address[] memory voters_,
        uint256[] memory shares_
    ) internal virtual {
        if (voters_.length != shares_.length) revert NoArrayParity();

        name = name_;
        
        symbol = symbol_;
        
        paused = paused_;

        INITIAL_CHAIN_ID = block.chainid;
        
        INITIAL_DOMAIN_SEPARATOR = _computeDomainSeparator();
        
        // cannot realistically overflow on human timescales
        unchecked {
            for (uint256 i; i < voters_.length; i++) {
                _mint(voters_[i], shares_[i]);
            }
        }
    }

    /*///////////////////////////////////////////////////////////////
                            ERC-20 LOGIC
    //////////////////////////////////////////////////////////////*/

    function approve(address spender, uint256 amount) public payable virtual returns (bool) {
        allowance[msg.sender][spender] = amount;

        emit Approval(msg.sender, spender, amount);

        return true;
    }

    function transfer(address to, uint256 amount) public payable notPaused virtual returns (bool) {
        balanceOf[msg.sender] -= amount;

        // cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value
        unchecked {
            balanceOf[to] += amount;
        }
        
        _moveDelegates(delegates(msg.sender), delegates(to), amount);

        emit Transfer(msg.sender, to, amount);

        return true;
    }

    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public payable notPaused virtual returns (bool) {
        if (allowance[from][msg.sender] != type(uint256).max) 
            allowance[from][msg.sender] -= amount;

        balanceOf[from] -= amount;

        // cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value
        unchecked {
            balanceOf[to] += amount;
        }
        
        _moveDelegates(delegates(from), delegates(to), amount);

        emit Transfer(from, to, amount);

        return true;
    }

    /*///////////////////////////////////////////////////////////////
                            EIP-2612 LOGIC
    //////////////////////////////////////////////////////////////*/
    
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public payable virtual {
        if (block.timestamp > deadline) revert SignatureExpired();

        // cannot realistically overflow on human timescales
        unchecked {
            bytes32 digest = keccak256(
                abi.encodePacked(
                    '\x19\x01',
                    DOMAIN_SEPARATOR(),
                    keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, nonces[owner]++, deadline))
                )
            );

            address recoveredAddress = ecrecover(digest, v, r, s);

            if (recoveredAddress == address(0) || recoveredAddress != owner) revert InvalidSignature();

            allowance[recoveredAddress][spender] = value;
        }

        emit Approval(owner, spender, value);
    }

    function DOMAIN_SEPARATOR() public view virtual returns (bytes32) {
        return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : _computeDomainSeparator();
    }

    function _computeDomainSeparator() internal view virtual returns (bytes32) {
        return 
            keccak256(
                abi.encode(
                    keccak256('EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)'),
                    keccak256(bytes(name)),
                    keccak256('1'),
                    block.chainid,
                    address(this)
                )
            );
    }

    /*///////////////////////////////////////////////////////////////
                            DAO LOGIC
    //////////////////////////////////////////////////////////////*/

    modifier notPaused() {
        if (paused) revert Paused();

        _;
    }
    
    function delegates(address delegator) public view virtual returns (address) {
        address current = _delegates[delegator];
        
        return current == address(0) ? delegator : current;
    }

    function getCurrentVotes(address account) public view virtual returns (uint256) {
        // this is safe from underflow because decrement only occurs if `nCheckpoints` is positive
        unchecked {
            uint256 nCheckpoints = numCheckpoints[account];

            return nCheckpoints != 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;
        }
    }

    function delegate(address delegatee) public payable virtual {
        _delegate(msg.sender, delegatee);
    }

    function delegateBySig(
        address delegatee, 
        uint256 nonce, 
        uint256 deadline, 
        uint8 v, 
        bytes32 r, 
        bytes32 s
    ) public payable virtual {
        if (block.timestamp > deadline) revert SignatureExpired();

        bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, deadline));

        bytes32 digest = keccak256(abi.encodePacked('\x19\x01', DOMAIN_SEPARATOR(), structHash));

        address signatory = ecrecover(digest, v, r, s);

        if (signatory == address(0)) revert NullAddress();
        
        // cannot realistically overflow on human timescales
        unchecked {
            if (nonce != nonces[signatory]++) revert InvalidNonce();
        }

        _delegate(signatory, delegatee);
    }

    function getPriorVotes(address account, uint256 timestamp) public view virtual returns (uint96) {
        if (block.timestamp <= timestamp) revert NotDetermined();

        uint256 nCheckpoints = numCheckpoints[account];

        if (nCheckpoints == 0) return 0;
        
        // this is safe from underflow because decrement only occurs if `nCheckpoints` is positive
        unchecked {
            if (checkpoints[account][nCheckpoints - 1].fromTimestamp <= timestamp)
                return checkpoints[account][nCheckpoints - 1].votes;

            if (checkpoints[account][0].fromTimestamp > timestamp) return 0;

            uint256 lower;
            
            // this is safe from underflow because decrement only occurs if `nCheckpoints` is positive
            uint256 upper = nCheckpoints - 1;

            while (upper > lower) {
                // this is safe from underflow because `upper` ceiling is provided
                uint256 center = upper - (upper - lower) / 2;

                Checkpoint memory cp = checkpoints[account][center];

                if (cp.fromTimestamp == timestamp) {
                    return cp.votes;
                } else if (cp.fromTimestamp < timestamp) {
                    lower = center;
                } else {
                    upper = center - 1;
                }
            }

        return checkpoints[account][lower].votes;

        }
    }

    function _delegate(address delegator, address delegatee) internal virtual {
        address currentDelegate = delegates(delegator);

        _delegates[delegator] = delegatee;

        _moveDelegates(currentDelegate, delegatee, balanceOf[delegator]);

        emit DelegateChanged(delegator, currentDelegate, delegatee);
    }

    function _moveDelegates(
        address srcRep, 
        address dstRep, 
        uint256 amount
    ) internal virtual {
        if (srcRep != dstRep && amount != 0) 
            if (srcRep != address(0)) {
                uint256 srcRepNum = numCheckpoints[srcRep];
                
                uint256 srcRepOld = srcRepNum != 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;

                uint256 srcRepNew = srcRepOld - amount;

                _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);
            }
            
            if (dstRep != address(0)) {
                uint256 dstRepNum = numCheckpoints[dstRep];

                uint256 dstRepOld = dstRepNum != 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;

                uint256 dstRepNew = dstRepOld + amount;

                _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);
            }
    }

    function _writeCheckpoint(
        address delegatee, 
        uint256 nCheckpoints, 
        uint256 oldVotes, 
        uint256 newVotes
    ) internal virtual {
        unchecked {
            // this is safe from underflow because decrement only occurs if `nCheckpoints` is positive
            if (nCheckpoints != 0 && checkpoints[delegatee][nCheckpoints - 1].fromTimestamp == block.timestamp) {
                checkpoints[delegatee][nCheckpoints - 1].votes = _safeCastTo96(newVotes);
            } else {
                checkpoints[delegatee][nCheckpoints] = Checkpoint(_safeCastTo32(block.timestamp), _safeCastTo96(newVotes));
                
                // cannot realistically overflow on human timescales
                numCheckpoints[delegatee] = nCheckpoints + 1;
            }
        }

        emit DelegateVotesChanged(delegatee, oldVotes, newVotes);
    }

    /*///////////////////////////////////////////////////////////////
                            MINT/BURN LOGIC
    //////////////////////////////////////////////////////////////*/

    function _mint(address to, uint256 amount) internal virtual {
        totalSupply += amount;

        // cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value
        unchecked {
            balanceOf[to] += amount;
        }

        _moveDelegates(address(0), delegates(to), amount);

        emit Transfer(address(0), to, amount);
    }

    function _burn(address from, uint256 amount) internal virtual {
        balanceOf[from] -= amount;

        // cannot underflow because a user's balance
        // will never be larger than the total supply
        unchecked {
            totalSupply -= amount;
        }

        _moveDelegates(delegates(from), address(0), amount);

        emit Transfer(from, address(0), amount);
    }
    
    function burn(uint256 amount) public payable virtual {
        _burn(msg.sender, amount);
    }

    function burnFrom(address from, uint256 amount) public payable virtual {
        if (allowance[from][msg.sender] != type(uint256).max) 
            allowance[from][msg.sender] -= amount;

        _burn(from, amount);
    }

    /*///////////////////////////////////////////////////////////////
                            PAUSE LOGIC
    //////////////////////////////////////////////////////////////*/

    function _flipPause() internal virtual {
        paused = !paused;

        emit PauseFlipped(paused);
    }
    
    /*///////////////////////////////////////////////////////////////
                            SAFECAST LOGIC
    //////////////////////////////////////////////////////////////*/
    
    function _safeCastTo32(uint256 x) internal pure virtual returns (uint32) {
        if (x > type(uint32).max) revert Uint32max();

        return uint32(x);
    }
    
    function _safeCastTo96(uint256 x) internal pure virtual returns (uint96) {
        if (x > type(uint96).max) revert Uint96max();

        return uint96(x);
    }
}

/// @notice Helper utility that enables calling multiple local methods in a single call.
/// @author Modified from Uniswap (https://github.com/Uniswap/v3-periphery/blob/main/contracts/base/Multicall.sol)
abstract contract Multicall {
    function multicall(bytes[] calldata data) public payable virtual returns (bytes[] memory results) {
        results = new bytes[](data.length);
        
        // cannot realistically overflow on human timescales
        unchecked {
            for (uint256 i = 0; i < data.length; i++) {
                (bool success, bytes memory result) = address(this).delegatecall(data[i]);

                if (!success) {
                    if (result.length < 68) revert();
                    
                    assembly {
                        result := add(result, 0x04)
                    }
                    
                    revert(abi.decode(result, (string)));
                }
                results[i] = result;
            }
        }
    }
}

/// @notice Helper utility for NFT 'safe' transfers.
abstract contract NFThelper {
    function onERC721Received(
        address,
        address,
        uint256,
        bytes calldata
    ) external pure returns (bytes4 sig) {
        sig = 0x150b7a02; // 'onERC721Received(address,address,uint256,bytes)'
    }

    function onERC1155Received(
        address,
        address,
        uint256,
        uint256,
        bytes calldata
    ) external pure returns (bytes4 sig) {
        sig = 0xf23a6e61; // 'onERC1155Received(address,address,uint256,uint256,bytes)'
    }
    
    function onERC1155BatchReceived(
        address,
        address,
        uint256[] calldata,
        uint256[] calldata,
        bytes calldata
    ) external pure returns (bytes4 sig) {
        sig = 0xbc197c81; // 'onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)'
    }
}

/// @notice Gas-optimized reentrancy protection.
/// @author Modified from OpenZeppelin 
/// (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/ReentrancyGuard.sol)
/// License-Identifier: MIT
abstract contract ReentrancyGuard {
    error Reentrancy();

    uint256 private constant NOT_ENTERED = 1;

    uint256 private constant ENTERED = 2;

    uint256 private status = NOT_ENTERED;

    modifier nonReentrant() {
        if (status == ENTERED) revert Reentrancy();

        status = ENTERED;

        _;

        status = NOT_ENTERED;
    }
}

/// @notice Kali DAO membership extension interface.
interface IKaliDAOextension {
    function setExtension(bytes calldata extensionData) external;

    function callExtension(
        address account, 
        uint256 amount, 
        bytes calldata extensionData
    ) external payable returns (bool mint, uint256 amountOut);
}

/// @notice Simple gas-optimized Kali DAO core module.
contract KaliDAO is KaliDAOtoken, Multicall, NFThelper, ReentrancyGuard {
    /*///////////////////////////////////////////////////////////////
                            EVENTS
    //////////////////////////////////////////////////////////////*/

    event NewProposal(
        address indexed proposer, 
        uint256 indexed proposal, 
        ProposalType indexed proposalType, 
        string description, 
        address[] accounts, 
        uint256[] amounts, 
        bytes[] payloads
    );

    event ProposalCancelled(address indexed proposer, uint256 indexed proposal);

    event ProposalSponsored(address indexed sponsor, uint256 indexed proposal);
    
    event VoteCast(address indexed voter, uint256 indexed proposal, bool indexed approve);

    event ProposalProcessed(uint256 indexed proposal, bool indexed didProposalPass);

    /*///////////////////////////////////////////////////////////////
                            ERRORS
    //////////////////////////////////////////////////////////////*/

    error Initialized();

    error PeriodBounds();

    error QuorumMax();

    error SupermajorityBounds();

    error InitCallFail();

    error TypeBounds();

    error NotProposer();

    error Sponsored();

    error NotMember();

    error NotCurrentProposal();

    error AlreadyVoted();

    error NotVoteable();

    error VotingNotEnded();

    error PrevNotProcessed();

    error NotExtension();

    /*///////////////////////////////////////////////////////////////
                            DAO STORAGE
    //////////////////////////////////////////////////////////////*/

    string public docs;

    uint256 private currentSponsoredProposal;
    
    uint256 public proposalCount;

    uint32 public votingPeriod;

    uint32 public gracePeriod;

    uint32 public quorum; // 1-100

    uint32 public supermajority; // 1-100
    
    bytes32 public constant VOTE_HASH = 
        keccak256('SignVote(address signer,uint256 proposal,bool approve)');
    
    mapping(address => bool) public extensions;

    mapping(uint256 => Proposal) public proposals;

    mapping(uint256 => ProposalState) public proposalStates;

    mapping(ProposalType => VoteType) public proposalVoteTypes;
    
    mapping(uint256 => mapping(address => bool)) public voted;

    mapping(address => uint256) public lastYesVote;

    enum ProposalType {
        MINT, // add membership
        BURN, // revoke membership
        CALL, // call contracts
        VPERIOD, // set `votingPeriod`
        GPERIOD, // set `gracePeriod`
        QUORUM, // set `quorum`
        SUPERMAJORITY, // set `supermajority`
        TYPE, // set `VoteType` to `ProposalType`
        PAUSE, // flip membership transferability
        EXTENSION, // flip `extensions` whitelisting
        ESCAPE, // delete pending proposal in case of revert
        DOCS // amend org docs
    }

    enum VoteType {
        SIMPLE_MAJORITY,
        SIMPLE_MAJORITY_QUORUM_REQUIRED,
        SUPERMAJORITY,
        SUPERMAJORITY_QUORUM_REQUIRED
    }

    struct Proposal {
        ProposalType proposalType;
        string description;
        address[] accounts; // member(s) being added/kicked; account(s) receiving payload
        uint256[] amounts; // value(s) to be minted/burned/spent; gov setting [0]
        bytes[] payloads; // data for CALL proposals
        uint256 prevProposal;
        uint96 yesVotes;
        uint96 noVotes;
        uint32 creationTime;
        address proposer;
    }

    struct ProposalState {
        bool passed;
        bool processed;
    }

    /*///////////////////////////////////////////////////////////////
                            CONSTRUCTOR
    //////////////////////////////////////////////////////////////*/

    function init(
        string memory name_,
        string memory symbol_,
        string memory docs_,
        bool paused_,
        address[] memory extensions_,
        bytes[] memory extensionsData_,
        address[] calldata voters_,
        uint256[] calldata shares_,
        uint32[16] memory govSettings_
    ) public payable nonReentrant virtual {
        if (extensions_.length != extensionsData_.length) revert NoArrayParity();

        if (votingPeriod != 0) revert Initialized();

        if (govSettings_[0] == 0 || govSettings_[0] > 365 days) revert PeriodBounds();

        if (govSettings_[1] > 365 days) revert PeriodBounds();

        if (govSettings_[2] > 100) revert QuorumMax();

        if (govSettings_[3] <= 51 || govSettings_[3] > 100) revert SupermajorityBounds();

        KaliDAOtoken._init(name_, symbol_, paused_, voters_, shares_);

        if (extensions_.length != 0) {
            // cannot realistically overflow on human timescales
            unchecked {
                for (uint256 i; i < extensions_.length; i++) {
                    extensions[extensions_[i]] = true;

                    if (extensionsData_[i].length > 3) {
                        (bool success, ) = extensions_[i].call(extensionsData_[i]);

                        if (!success) revert InitCallFail();
                    }
                }
            }
        }

        docs = docs_;
        
        votingPeriod = govSettings_[0];

        gracePeriod = govSettings_[1];
        
        quorum = govSettings_[2];
        
        supermajority = govSettings_[3];

        // set initial vote types
        proposalVoteTypes[ProposalType.MINT] = VoteType(govSettings_[4]);

        proposalVoteTypes[ProposalType.BURN] = VoteType(govSettings_[5]);

        proposalVoteTypes[ProposalType.CALL] = VoteType(govSettings_[6]);

        proposalVoteTypes[ProposalType.VPERIOD] = VoteType(govSettings_[7]);

        proposalVoteTypes[ProposalType.GPERIOD] = VoteType(govSettings_[8]);
        
        proposalVoteTypes[ProposalType.QUORUM] = VoteType(govSettings_[9]);
        
        proposalVoteTypes[ProposalType.SUPERMAJORITY] = VoteType(govSettings_[10]);

        proposalVoteTypes[ProposalType.TYPE] = VoteType(govSettings_[11]);
        
        proposalVoteTypes[ProposalType.PAUSE] = VoteType(govSettings_[12]);
        
        proposalVoteTypes[ProposalType.EXTENSION] = VoteType(govSettings_[13]);

        proposalVoteTypes[ProposalType.ESCAPE] = VoteType(govSettings_[14]);

        proposalVoteTypes[ProposalType.DOCS] = VoteType(govSettings_[15]);
    }

    /*///////////////////////////////////////////////////////////////
                            PROPOSAL LOGIC
    //////////////////////////////////////////////////////////////*/

    function getProposalArrays(uint256 proposal) public view virtual returns (
        address[] memory accounts, 
        uint256[] memory amounts, 
        bytes[] memory payloads
    ) {
        Proposal storage prop = proposals[proposal];
        
        (accounts, amounts, payloads) = (prop.accounts, prop.amounts, prop.payloads);
    }

    function propose(
        ProposalType proposalType,
        string calldata description,
        address[] calldata accounts,
        uint256[] calldata amounts,
        bytes[] calldata payloads
    ) public payable nonReentrant virtual returns (uint256 proposal) {
        if (accounts.length != amounts.length || amounts.length != payloads.length) revert NoArrayParity();
        
        if (proposalType == ProposalType.VPERIOD) if (amounts[0] == 0 || amounts[0] > 365 days) revert PeriodBounds();

        if (proposalType == ProposalType.GPERIOD) if (amounts[0] > 365 days) revert PeriodBounds();
        
        if (proposalType == ProposalType.QUORUM) if (amounts[0] > 100) revert QuorumMax();
        
        if (proposalType == ProposalType.SUPERMAJORITY) if (amounts[0] <= 51 || amounts[0] > 100) revert SupermajorityBounds();

        if (proposalType == ProposalType.TYPE) if (amounts[0] > 11 || amounts[1] > 3 || amounts.length != 2) revert TypeBounds();

        bool selfSponsor;

        // if member or extension is making proposal, include sponsorship
        if (balanceOf[msg.sender] != 0 || extensions[msg.sender]) selfSponsor = true;

        // cannot realistically overflow on human timescales
        unchecked {
            proposalCount++;
        }

        proposal = proposalCount;

        proposals[proposal] = Proposal({
            proposalType: proposalType,
            description: description,
            accounts: accounts,
            amounts: amounts,
            payloads: payloads,
            prevProposal: selfSponsor ? currentSponsoredProposal : 0,
            yesVotes: 0,
            noVotes: 0,
            creationTime: selfSponsor ? _safeCastTo32(block.timestamp) : 0,
            proposer: msg.sender
        });

        if (selfSponsor) currentSponsoredProposal = proposal;

        emit NewProposal(msg.sender, proposal, proposalType, description, accounts, amounts, payloads);
    }

    function cancelProposal(uint256 proposal) public payable nonReentrant virtual {
        Proposal storage prop = proposals[proposal];

        if (msg.sender != prop.proposer) revert NotProposer();

        if (prop.creationTime != 0) revert Sponsored();

        delete proposals[proposal];

        emit ProposalCancelled(msg.sender, proposal);
    }

    function sponsorProposal(uint256 proposal) public payable nonReentrant virtual {
        Proposal storage prop = proposals[proposal];

        if (balanceOf[msg.sender] == 0) revert NotMember();

        if (prop.proposer == address(0)) revert NotCurrentProposal();

        if (prop.creationTime != 0) revert Sponsored();

        prop.prevProposal = currentSponsoredProposal;

        currentSponsoredProposal = proposal;

        prop.creationTime = _safeCastTo32(block.timestamp);

        emit ProposalSponsored(msg.sender, proposal);
    } 

    function vote(uint256 proposal, bool approve) public payable nonReentrant virtual {
        _vote(msg.sender, proposal, approve);
    }
    
    function voteBySig(
        address signer, 
        uint256 proposal, 
        bool approve, 
        uint8 v, 
        bytes32 r, 
        bytes32 s
    ) public payable nonReentrant virtual {
        bytes32 digest =
            keccak256(
                abi.encodePacked(
                    '\x19\x01',
                    DOMAIN_SEPARATOR(),
                    keccak256(
                        abi.encode(
                            VOTE_HASH,
                            signer,
                            proposal,
                            approve
                        )
                    )
                )
            );
            
        address recoveredAddress = ecrecover(digest, v, r, s);

        if (recoveredAddress == address(0) || recoveredAddress != signer) revert InvalidSignature();
        
        _vote(signer, proposal, approve);
    }
    
    function _vote(
        address signer, 
        uint256 proposal, 
        bool approve
    ) internal virtual {
        Proposal storage prop = proposals[proposal];

        if (voted[proposal][signer]) revert AlreadyVoted();
        
        // this is safe from overflow because `votingPeriod` is capped so it will not combine
        // with unix time to exceed the max uint256 value
        unchecked {
            if (block.timestamp > prop.creationTime + votingPeriod) revert NotVoteable();
        }

        uint96 weight = getPriorVotes(signer, prop.creationTime);
        
        // this is safe from overflow because `yesVotes` and `noVotes` are capped by `totalSupply`
        // which is checked for overflow in `KaliDAOtoken` contract
        unchecked { 
            if (approve) {
                prop.yesVotes += weight;

                lastYesVote[signer] = proposal;
            } else {
                prop.noVotes += weight;
            }
        }
        
        voted[proposal][signer] = true;
        
        emit VoteCast(signer, proposal, approve);
    }

    function processProposal(uint256 proposal) public payable nonReentrant virtual returns (
        bool didProposalPass, bytes[] memory results
    ) {
        Proposal storage prop = proposals[proposal];

        VoteType voteType = proposalVoteTypes[prop.proposalType];

        if (prop.creationTime == 0) revert NotCurrentProposal();
        
        // this is safe from overflow because `votingPeriod` and `gracePeriod` are capped so they will not combine
        // with unix time to exceed the max uint256 value
        unchecked {
            if (block.timestamp <= prop.creationTime + votingPeriod + gracePeriod) revert VotingNotEnded();
        }

        // skip previous proposal processing requirement in case of escape hatch
        if (prop.proposalType != ProposalType.ESCAPE) 
            if (proposals[prop.prevProposal].creationTime != 0) revert PrevNotProcessed();

        didProposalPass = _countVotes(voteType, prop.yesVotes, prop.noVotes);
        
        if (didProposalPass) {
            // cannot realistically overflow on human timescales
            unchecked {
                if (prop.proposalType == ProposalType.MINT) 
                    for (uint256 i; i < prop.accounts.length; i++) {
                        _mint(prop.accounts[i], prop.amounts[i]);
                    }
                    
                if (prop.proposalType == ProposalType.BURN) 
                    for (uint256 i; i < prop.accounts.length; i++) {
                        _burn(prop.accounts[i], prop.amounts[i]);
                    }
                    
                if (prop.proposalType == ProposalType.CALL) 
                    for (uint256 i; i < prop.accounts.length; i++) {
                        results = new bytes[](prop.accounts.length);
                        
                        (, bytes memory result) = prop.accounts[i].call{value: prop.amounts[i]}
                            (prop.payloads[i]);
                        
                        results[i] = result;
                    }
                    
                // governance settings
                if (prop.proposalType == ProposalType.VPERIOD) 
                    if (prop.amounts[0] != 0) votingPeriod = uint32(prop.amounts[0]);
                
                if (prop.proposalType == ProposalType.GPERIOD) 
                    if (prop.amounts[0] != 0) gracePeriod = uint32(prop.amounts[0]);
                
                if (prop.proposalType == ProposalType.QUORUM) 
                    if (prop.amounts[0] != 0) quorum = uint32(prop.amounts[0]);
                
                if (prop.proposalType == ProposalType.SUPERMAJORITY) 
                    if (prop.amounts[0] != 0) supermajority = uint32(prop.amounts[0]);
                
                if (prop.proposalType == ProposalType.TYPE) 
                    proposalVoteTypes[ProposalType(prop.amounts[0])] = VoteType(prop.amounts[1]);
                
                if (prop.proposalType == ProposalType.PAUSE) 
                    _flipPause();
                
                if (prop.proposalType == ProposalType.EXTENSION) 
                    for (uint256 i; i < prop.accounts.length; i++) {
                        if (prop.amounts[i] != 0) 
                            extensions[prop.accounts[i]] = !extensions[prop.accounts[i]];
                    
                        if (prop.payloads[i].length > 3) IKaliDAOextension(prop.accounts[i])
                            .setExtension(prop.payloads[i]);
                    }
                
                if (prop.proposalType == ProposalType.ESCAPE)
                    delete proposals[prop.amounts[0]];

                if (prop.proposalType == ProposalType.DOCS)
                    docs = prop.description;
                
                proposalStates[proposal].passed = true;
            }
        }

        delete proposals[proposal];

        proposalStates[proposal].processed = true;

        emit ProposalProcessed(proposal, didProposalPass);
    }

    function _countVotes(
        VoteType voteType,
        uint256 yesVotes,
        uint256 noVotes
    ) internal view virtual returns (bool didProposalPass) {
        // fail proposal if no participation
        if (yesVotes == 0 && noVotes == 0) return false;

        // rule out any failed quorums
        if (voteType == VoteType.SIMPLE_MAJORITY_QUORUM_REQUIRED || voteType == VoteType.SUPERMAJORITY_QUORUM_REQUIRED) {
            uint256 minVotes = (totalSupply * quorum) / 100;
            
            // this is safe from overflow because `yesVotes` and `noVotes` 
            // supply are checked in `KaliDAOtoken` contract
            unchecked {
                uint256 votes = yesVotes + noVotes;

                if (votes < minVotes) return false;
            }
        }
        
        // simple majority check
        if (voteType == VoteType.SIMPLE_MAJORITY || voteType == VoteType.SIMPLE_MAJORITY_QUORUM_REQUIRED) {
            if (yesVotes > noVotes) return true;
        // supermajority check
        } else {
            // example: 7 yes, 2 no, supermajority = 66
            // ((7+2) * 66) / 100 = 5.94; 7 yes will pass
            uint256 minYes = ((yesVotes + noVotes) * supermajority) / 100;

            if (yesVotes >= minYes) return true;
        }
    }
    
    /*///////////////////////////////////////////////////////////////
                            EXTENSIONS 
    //////////////////////////////////////////////////////////////*/

    receive() external payable virtual {}

    modifier onlyExtension {
        if (!extensions[msg.sender]) revert NotExtension();

        _;
    }

    function callExtension(
        address extension, 
        uint256 amount, 
        bytes calldata extensionData
    ) public payable nonReentrant virtual returns (bool mint, uint256 amountOut) {
        if (!extensions[extension]) revert NotExtension();
        
        (mint, amountOut) = IKaliDAOextension(extension).callExtension{value: msg.value}
            (msg.sender, amount, extensionData);
        
        if (mint) {
            if (amountOut != 0) _mint(msg.sender, amountOut); 
        } else {
            if (amountOut != 0) _burn(msg.sender, amount);
        }
    }

    function mintShares(address to, uint256 amount) public payable onlyExtension virtual {
        _mint(to, amount);
    }

    function burnShares(address from, uint256 amount) public payable onlyExtension virtual {
        _burn(from, amount);
    }
}

/// @notice Ricardian LLC formation interface.
interface IRicardianLLC {
    function mintLLC(address to) external payable;
}

/// @notice Factory to deploy Kali DAO.
contract KaliDAOfactory is Multicall {
    event DAOdeployed(
        KaliDAO indexed kaliDAO, 
        string name, 
        string symbol, 
        string docs, 
        bool paused, 
        address[] extensions, 
        bytes[] extensionsData,
        address[] voters,
        uint256[] shares,
        uint32[16] govSettings
    );

    error NullDeploy();

    address payable private immutable kaliMaster;

    IRicardianLLC private immutable ricardianLLC;

    constructor(address payable kaliMaster_, IRicardianLLC ricardianLLC_) {
        kaliMaster = kaliMaster_;

        ricardianLLC = ricardianLLC_;
    }
    
    function deployKaliDAO(
        string memory name_,
        string memory symbol_,
        string memory docs_,
        bool paused_,
        address[] memory extensions_,
        bytes[] memory extensionsData_,
        address[] calldata voters_,
        uint256[] calldata shares_,
        uint32[16] memory govSettings_
    ) public payable virtual returns (KaliDAO kaliDAO) {
        kaliDAO = KaliDAO(_cloneAsMinimalProxy(kaliMaster, name_));
        
        kaliDAO.init(
            name_, 
            symbol_, 
            docs_,
            paused_, 
            extensions_,
            extensionsData_,
            voters_, 
            shares_,  
            govSettings_
        );

        bytes memory docs = bytes(docs_);

        if (docs.length == 0) {
            ricardianLLC.mintLLC{value: msg.value}(address(kaliDAO));
        }

        emit DAOdeployed(kaliDAO, name_, symbol_, docs_, paused_, extensions_, extensionsData_, voters_, shares_, govSettings_);
    }

    /// @dev modified from Aelin (https://github.com/AelinXYZ/aelin/blob/main/contracts/MinimalProxyFactory.sol)
    function _cloneAsMinimalProxy(address payable base, string memory name_) internal virtual returns (address payable clone) {
        bytes memory createData = abi.encodePacked(
            // constructor
            bytes10(0x3d602d80600a3d3981f3),
            // proxy code
            bytes10(0x363d3d373d3d3d363d73),
            base,
            bytes15(0x5af43d82803e903d91602b57fd5bf3)
        );

        bytes32 salt = keccak256(bytes(name_));

        assembly {
            clone := create2(
                0, // no value
                add(createData, 0x20), // data
                mload(createData),
                salt
            )
        }
        // if CREATE2 fails for some reason, address(0) is returned
        if (clone == address(0)) revert NullDeploy();
    }
}

Contract ABI

[{"inputs":[{"internalType":"address payable","name":"kaliMaster_","type":"address"},{"internalType":"contract IRicardianLLC","name":"ricardianLLC_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"NullDeploy","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract KaliDAO","name":"kaliDAO","type":"address"},{"indexed":false,"internalType":"string","name":"name","type":"string"},{"indexed":false,"internalType":"string","name":"symbol","type":"string"},{"indexed":false,"internalType":"string","name":"docs","type":"string"},{"indexed":false,"internalType":"bool","name":"paused","type":"bool"},{"indexed":false,"internalType":"address[]","name":"extensions","type":"address[]"},{"indexed":false,"internalType":"bytes[]","name":"extensionsData","type":"bytes[]"},{"indexed":false,"internalType":"address[]","name":"voters","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"shares","type":"uint256[]"},{"indexed":false,"internalType":"uint32[16]","name":"govSettings","type":"uint32[16]"}],"name":"DAOdeployed","type":"event"},{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"string","name":"docs_","type":"string"},{"internalType":"bool","name":"paused_","type":"bool"},{"internalType":"address[]","name":"extensions_","type":"address[]"},{"internalType":"bytes[]","name":"extensionsData_","type":"bytes[]"},{"internalType":"address[]","name":"voters_","type":"address[]"},{"internalType":"uint256[]","name":"shares_","type":"uint256[]"},{"internalType":"uint32[16]","name":"govSettings_","type":"uint32[16]"}],"name":"deployKaliDAO","outputs":[{"internalType":"contract KaliDAO","name":"kaliDAO","type":"address"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicall","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"stateMutability":"payable","type":"function"}]

60c060405234801561001057600080fd5b50604051610eaf380380610eaf83398101604081905261002f9161005e565b6001600160a01b039182166080521660a052610098565b6001600160a01b038116811461005b57600080fd5b50565b6000806040838503121561007157600080fd5b825161007c81610046565b602084015190925061008d81610046565b809150509250929050565b60805160a051610df36100bc60003960006101a20152600060920152610df36000f3fe6080604052600436106100295760003560e01c806309ef16021461002e578063ac9650d81461006b575b600080fd5b61004161003c36600461085f565b61008b565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b61007e6100793660046109ae565b610273565b6040516100629190610abf565b60006100b77f00000000000000000000000000000000000000000000000000000000000000008d6103e3565b6040517f97b55f8100000000000000000000000000000000000000000000000000000000815290915073ffffffffffffffffffffffffffffffffffffffff8216906397b55f8190610120908f908f908f908f908f908f908f908f908f908f908f90600401610b9e565b600060405180830381600087803b15801561013a57600080fd5b505af115801561014e573d6000803e3d6000fd5b50508b518c925015159050610201576040517f6f0a5e7100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301527f00000000000000000000000000000000000000000000000000000000000000001690636f0a5e719034906024016000604051808303818588803b1580156101e757600080fd5b505af11580156101fb573d6000803e3d6000fd5b50505050505b8173ffffffffffffffffffffffffffffffffffffffff167f0712ea2ebe8ee974f78171c5f86c898cc0e2858fb69ed676083f8c60ee84ab128e8e8e8e8e8e8e8e8e8e8e60405161025b9b9a99989796959493929190610b9e565b60405180910390a2509b9a5050505050505050505050565b60608167ffffffffffffffff81111561028e5761028e61050a565b6040519080825280602002602001820160405280156102c157816020015b60608152602001906001900390816102ac5790505b50905060005b828110156103dc57600080308686858181106102e5576102e5610c8f565b90506020028101906102f79190610cbe565b604051610305929190610d23565b600060405180830381855af49150503d8060008114610340576040519150601f19603f3d011682016040523d82523d6000602084013e610345565b606091505b5091509150816103b45760448151101561035e57600080fd5b600481019050808060200190518101906103789190610d33565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103ab9190610daa565b60405180910390fd5b808484815181106103c7576103c7610c8f565b602090810291909101015250506001016102c7565b5092915050565b6040517f3d602d80600a3d3981f30000000000000000000000000000000000000000000060208201527f363d3d373d3d3d363d7300000000000000000000000000000000000000000000602a8201527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606084901b1660348201527f5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000604882015260009081906057016040516020818303038152906040529050600083805190602001209050808251602084016000f5925073ffffffffffffffffffffffffffffffffffffffff8316610502576040517f8b1f004000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156105805761058061050a565b604052919050565b600067ffffffffffffffff8211156105a2576105a261050a565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b60006105e16105dc84610588565b610539565b90508281528383830111156105f557600080fd5b828260208301376000602084830101529392505050565b600082601f83011261061d57600080fd5b61062c838335602085016105ce565b9392505050565b8035801515811461064357600080fd5b919050565b600067ffffffffffffffff8211156106625761066261050a565b5060051b60200190565b803573ffffffffffffffffffffffffffffffffffffffff8116811461064357600080fd5b600082601f8301126106a157600080fd5b813560206106b16105dc83610648565b82815260059290921b840181019181810190868411156106d057600080fd5b8286015b848110156106f2576106e58161066c565b83529183019183016106d4565b509695505050505050565b600082601f83011261070e57600080fd5b8135602061071e6105dc83610648565b82815260059290921b8401810191818101908684111561073d57600080fd5b8286015b848110156106f257803567ffffffffffffffff8111156107615760008081fd5b8701603f810189136107735760008081fd5b6107848986830135604084016105ce565b845250918301918301610741565b60008083601f8401126107a457600080fd5b50813567ffffffffffffffff8111156107bc57600080fd5b6020830191508360208260051b85010111156107d757600080fd5b9250929050565b600082601f8301126107ef57600080fd5b60405161020080820182811067ffffffffffffffff821117156108145761081461050a565b6040528301818582111561082757600080fd5b845b8281101561085457803563ffffffff811681146108465760008081fd5b825260209182019101610829565b509195945050505050565b60008060008060008060008060008060006103008c8e03121561088157600080fd5b67ffffffffffffffff808d35111561089857600080fd5b6108a58e8e358f0161060c565b9b508060208e013511156108b857600080fd5b6108c88e60208f01358f0161060c565b9a508060408e013511156108db57600080fd5b6108eb8e60408f01358f0161060c565b99506108f960608e01610633565b98508060808e0135111561090c57600080fd5b61091c8e60808f01358f01610690565b97508060a08e0135111561092f57600080fd5b61093f8e60a08f01358f016106fd565b96508060c08e0135111561095257600080fd5b6109628e60c08f01358f01610792565b909650945060e08d013581101561097857600080fd5b506109898d60e08e01358e01610792565b909350915061099c8d6101008e016107de565b90509295989b509295989b9093969950565b600080602083850312156109c157600080fd5b823567ffffffffffffffff8111156109d857600080fd5b6109e485828601610792565b90969095509350505050565b60005b83811015610a0b5781810151838201526020016109f3565b83811115610a1a576000848401525b50505050565b60008151808452610a388160208601602086016109f0565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b600081518084526020808501808196508360051b8101915082860160005b85811015610ab2578284038952610aa0848351610a20565b98850198935090840190600101610a88565b5091979650505050505050565b60208152600061062c6020830184610a6a565b8183526000602080850194508260005b85811015610b1b5773ffffffffffffffffffffffffffffffffffffffff610b088361066c565b1687529582019590820190600101610ae2565b509495945050505050565b81835260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831115610b5857600080fd5b8260051b8083602087013760009401602001938452509192915050565b8060005b6010811015610a1a57815163ffffffff16845260209384019390910190600101610b79565b6000610300808352610bb28184018f610a20565b9050602083820381850152610bc7828f610a20565b91508382036040850152610bdb828e610a20565b8c1515606086015284810360808601528b51808252828d0193509082019060005b81811015610c2e57845173ffffffffffffffffffffffffffffffffffffffff1683529383019391830191600101610bfc565b505084810360a0860152610c42818c610a6a565b9250505082810360c0840152610c5981888a610ad2565b905082810360e0840152610c6e818688610b26565b915050610c7f610100830184610b75565b9c9b505050505050505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112610cf357600080fd5b83018035915067ffffffffffffffff821115610d0e57600080fd5b6020019150368190038213156107d757600080fd5b8183823760009101908152919050565b600060208284031215610d4557600080fd5b815167ffffffffffffffff811115610d5c57600080fd5b8201601f81018413610d6d57600080fd5b8051610d7b6105dc82610588565b818152856020838501011115610d9057600080fd5b610da18260208301602086016109f0565b95945050505050565b60208152600061062c6020830184610a2056fea26469706673582212201e8e196b35ac1eda4c5829f7be93ce2442c6d948a2356d222927276bd4bb32f464736f6c634300080b003300000000000000000000000055967de5ae91f6e1d98b813b9dca3946be9f5c20000000000000000000000000d45f8734539792619b3c4be0e24639845371a481

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

00000000000000000000000055967de5ae91f6e1d98b813b9dca3946be9f5c20000000000000000000000000d45f8734539792619b3c4be0e24639845371a481

-----Decoded View---------------
Arg [0] : kaliMaster_ (address): 0x55967de5aE91F6E1D98b813b9Dca3946bE9f5C20
Arg [1] : ricardianLLC_ (address): 0xd45f8734539792619B3C4BE0e24639845371A481

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000055967de5ae91f6e1d98b813b9dca3946be9f5c20
Arg [1] : 000000000000000000000000d45f8734539792619b3c4be0e24639845371a481


Deployed ByteCode Sourcemap

37073:2611:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;37730:1021;;;;;;:::i;:::-;;:::i;:::-;;;7064:42:1;7052:55;;;7034:74;;7022:2;7007:18;37730:1021:0;;;;;;;;15319:777;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;37730:1021::-;38102:15;38148:39;38169:10;38181:5;38148:20;:39::i;:::-;38209:240;;;;;38130:58;;-1:-1:-1;38209:12:0;;;;;;:240;;38236:5;;38257:7;;38280:5;;38300:7;;38323:11;;38349:15;;38379:7;;;;38402;;;;38426:12;;38209:240;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;38511:11:0;;38488:5;;-1:-1:-1;38511:16:0;38507:105;;-1:-1:-1;38507:105:0;;38544:56;;;;;:20;7052:55:1;;;38544:56:0;;;7034:74:1;38544:12:0;:20;;;;38572:9;;7007:18:1;;38544:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;38507:105;38641:7;38629:114;;;38650:5;38657:7;38666:5;38673:7;38682:11;38695:15;38712:7;;38721;;38730:12;38629:114;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;38119:632;37730:1021;;;;;;;;;;;;;:::o;15319:777::-;15393:22;15450:4;15438:24;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15428:34;;15575:9;15570:508;15590:15;;;15570:508;;;15632:12;;15677:4;15696;;15701:1;15696:7;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;15669:35;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15631:73;;;;15730:7;15725:300;;15782:2;15766:6;:13;:18;15762:32;;;15786:8;;;15762:32;15897:4;15889:6;15885:17;15875:27;;15987:6;15976:28;;;;;;;;;;;;:::i;:::-;15969:36;;;;;;;;;;;:::i;:::-;;;;;;;;15725:300;16056:6;16043:7;16051:1;16043:10;;;;;;;;:::i;:::-;;;;;;;;;;:19;-1:-1:-1;;15607:3:0;;15570:508;;;;15319:777;;;;:::o;38873:808::-;39032:249;;39091:31;39032:249;;;14779:28:1;39164:31:0;14823:12:1;;;14816:37;14904:66;14891:2;14887:15;;;14883:88;14869:12;;;14862:110;39229:41:0;14988:12:1;;;14981:101;38972:21:0;;;;15098:12:1;;39032:249:0;;;;;;;;;;;;39006:275;;39294:12;39325:5;39309:23;;;;;;39294:38;;39520:4;39490:10;39484:17;39452:4;39440:10;39436:21;39404:1;39378:161;39369:170;-1:-1:-1;39633:19:0;;;39629:44;;39661:12;;;;;;;;;;;;;;39629:44;38995:686;;38873:808;;;;:::o;14:184:1:-;66:77;63:1;56:88;163:4;160:1;153:15;187:4;184:1;177:15;203:334;274:2;268:9;330:2;320:13;;335:66;316:86;304:99;;433:18;418:34;;454:22;;;415:62;412:88;;;480:18;;:::i;:::-;516:2;509:22;203:334;;-1:-1:-1;203:334:1:o;542:246::-;591:4;624:18;616:6;613:30;610:56;;;646:18;;:::i;:::-;-1:-1:-1;703:2:1;691:15;708:66;687:88;777:4;683:99;;542:246::o;793:338::-;858:5;887:53;903:36;932:6;903:36;:::i;:::-;887:53;:::i;:::-;878:62;;963:6;956:5;949:21;1003:3;994:6;989:3;985:16;982:25;979:45;;;1020:1;1017;1010:12;979:45;1069:6;1064:3;1057:4;1050:5;1046:16;1033:43;1123:1;1116:4;1107:6;1100:5;1096:18;1092:29;1085:40;793:338;;;;;:::o;1136:222::-;1179:5;1232:3;1225:4;1217:6;1213:17;1209:27;1199:55;;1250:1;1247;1240:12;1199:55;1272:80;1348:3;1339:6;1326:20;1319:4;1311:6;1307:17;1272:80;:::i;:::-;1263:89;1136:222;-1:-1:-1;;;1136:222:1:o;1363:160::-;1428:20;;1484:13;;1477:21;1467:32;;1457:60;;1513:1;1510;1503:12;1457:60;1363:160;;;:::o;1528:183::-;1588:4;1621:18;1613:6;1610:30;1607:56;;;1643:18;;:::i;:::-;-1:-1:-1;1688:1:1;1684:14;1700:4;1680:25;;1528:183::o;1716:196::-;1784:20;;1844:42;1833:54;;1823:65;;1813:93;;1902:1;1899;1892:12;1917:668;1971:5;2024:3;2017:4;2009:6;2005:17;2001:27;1991:55;;2042:1;2039;2032:12;1991:55;2078:6;2065:20;2104:4;2128:60;2144:43;2184:2;2144:43;:::i;2128:60::-;2222:15;;;2308:1;2304:10;;;;2292:23;;2288:32;;;2253:12;;;;2332:15;;;2329:35;;;2360:1;2357;2350:12;2329:35;2396:2;2388:6;2384:15;2408:148;2424:6;2419:3;2416:15;2408:148;;;2490:23;2509:3;2490:23;:::i;:::-;2478:36;;2534:12;;;;2441;;2408:148;;;-1:-1:-1;2574:5:1;1917:668;-1:-1:-1;;;;;;1917:668:1:o;2590:1088::-;2642:5;2695:3;2688:4;2680:6;2676:17;2672:27;2662:55;;2713:1;2710;2703:12;2662:55;2749:6;2736:20;2775:4;2799:60;2815:43;2855:2;2815:43;:::i;2799:60::-;2893:15;;;2979:1;2975:10;;;;2963:23;;2959:32;;;2924:12;;;;3003:15;;;3000:35;;;3031:1;3028;3021:12;3000:35;3067:2;3059:6;3055:15;3079:570;3095:6;3090:3;3087:15;3079:570;;;3181:3;3168:17;3217:18;3204:11;3201:35;3198:125;;;3277:1;3306:2;3302;3295:14;3198:125;3346:24;;3405:2;3397:11;;3393:21;-1:-1:-1;3383:119:1;;3456:1;3485:2;3481;3474:14;3383:119;3527:79;3602:3;3596:2;3592;3588:11;3575:25;3570:2;3566;3562:11;3527:79;:::i;:::-;3515:92;;-1:-1:-1;3627:12:1;;;;3112;;3079:570;;3683:367;3746:8;3756:6;3810:3;3803:4;3795:6;3791:17;3787:27;3777:55;;3828:1;3825;3818:12;3777:55;-1:-1:-1;3851:20:1;;3894:18;3883:30;;3880:50;;;3926:1;3923;3916:12;3880:50;3963:4;3955:6;3951:17;3939:29;;4023:3;4016:4;4006:6;4003:1;3999:14;3991:6;3987:27;3983:38;3980:47;3977:67;;;4040:1;4037;4030:12;3977:67;3683:367;;;;;:::o;4055:842::-;4104:5;4157:3;4150:4;4142:6;4138:17;4134:27;4124:55;;4175:1;4172;4165:12;4124:55;4208:2;4202:9;4230:3;4272:2;4264:6;4260:15;4341:6;4329:10;4326:22;4305:18;4293:10;4290:34;4287:62;4284:88;;;4352:18;;:::i;:::-;4388:2;4381:22;4452:15;;4423:6;4479:15;;;4476:35;;;4507:1;4504;4497:12;4476:35;4531:6;4546:321;4562:6;4557:3;4554:15;4546:321;;;4644:3;4631:17;4692:10;4685:5;4681:22;4674:5;4671:33;4661:131;;4746:1;4775:2;4771;4764:14;4661:131;4805:18;;4852:4;4843:14;;;;4579;4546:321;;;-1:-1:-1;4885:6:1;;4055:842;-1:-1:-1;;;;;4055:842:1:o;4902:1957::-;5196:6;5204;5212;5220;5228;5236;5244;5252;5260;5268;5276:7;5330:3;5318:9;5309:7;5305:23;5301:33;5298:53;;;5347:1;5344;5337:12;5298:53;5370:18;5428:2;5416:9;5403:23;5400:31;5397:51;;;5444:1;5441;5434:12;5397:51;5467:67;5526:7;5513:9;5500:23;5489:9;5485:39;5467:67;:::i;:::-;5457:77;;5583:2;5577;5566:9;5562:18;5549:32;5546:40;5543:60;;;5599:1;5596;5589:12;5543:60;5622:76;5690:7;5683:2;5672:9;5668:18;5655:32;5644:9;5640:48;5622:76;:::i;:::-;5612:86;;5747:2;5741;5730:9;5726:18;5713:32;5710:40;5707:60;;;5763:1;5760;5753:12;5707:60;5786:76;5854:7;5847:2;5836:9;5832:18;5819:32;5808:9;5804:48;5786:76;:::i;:::-;5776:86;;5881:35;5912:2;5901:9;5897:18;5881:35;:::i;:::-;5871:45;;5966:2;5959:3;5948:9;5944:19;5931:33;5928:41;5925:61;;;5982:1;5979;5972:12;5925:61;6005:88;6085:7;6077:3;6066:9;6062:19;6049:33;6038:9;6034:49;6005:88;:::i;:::-;5995:98;;6143:2;6136:3;6125:9;6121:19;6108:33;6105:41;6102:61;;;6159:1;6156;6149:12;6102:61;6182:86;6260:7;6252:3;6241:9;6237:19;6224:33;6213:9;6209:49;6182:86;:::i;:::-;6172:96;;6318:2;6311:3;6300:9;6296:19;6283:33;6280:41;6277:61;;;6334:1;6331;6324:12;6277:61;6373:97;6462:7;6454:3;6443:9;6439:19;6426:33;6415:9;6411:49;6373:97;:::i;:::-;6489:8;;-1:-1:-1;6516:8:1;-1:-1:-1;6567:3:1;6552:19;;6539:33;6536:41;-1:-1:-1;6533:61:1;;;6590:1;6587;6580:12;6533:61;;6629:97;6718:7;6710:3;6699:9;6695:19;6682:33;6671:9;6667:49;6629:97;:::i;:::-;6745:8;;-1:-1:-1;6772:8:1;-1:-1:-1;6800:53:1;6845:7;6839:3;6824:19;;6800:53;:::i;:::-;6789:64;;4902:1957;;;;;;;;;;;;;;:::o;7119:448::-;7216:6;7224;7277:2;7265:9;7256:7;7252:23;7248:32;7245:52;;;7293:1;7290;7283:12;7245:52;7333:9;7320:23;7366:18;7358:6;7355:30;7352:50;;;7398:1;7395;7388:12;7352:50;7437:70;7499:7;7490:6;7479:9;7475:22;7437:70;:::i;:::-;7526:8;;7411:96;;-1:-1:-1;7119:448:1;-1:-1:-1;;;;7119:448:1:o;7572:258::-;7644:1;7654:113;7668:6;7665:1;7662:13;7654:113;;;7744:11;;;7738:18;7725:11;;;7718:39;7690:2;7683:10;7654:113;;;7785:6;7782:1;7779:13;7776:48;;;7820:1;7811:6;7806:3;7802:16;7795:27;7776:48;;7572:258;;;:::o;7835:316::-;7876:3;7914:5;7908:12;7941:6;7936:3;7929:19;7957:63;8013:6;8006:4;8001:3;7997:14;7990:4;7983:5;7979:16;7957:63;:::i;:::-;8065:2;8053:15;8070:66;8049:88;8040:98;;;;8140:4;8036:109;;7835:316;-1:-1:-1;;7835:316:1:o;8156:614::-;8207:3;8245:5;8239:12;8272:6;8267:3;8260:19;8298:4;8339:2;8334:3;8330:12;8364:11;8391;8384:18;;8441:6;8438:1;8434:14;8427:5;8423:26;8411:38;;8483:2;8476:5;8472:14;8504:1;8514:230;8528:6;8525:1;8522:13;8514:230;;;8599:5;8593:4;8589:16;8584:3;8577:29;8627:37;8659:4;8650:6;8644:13;8627:37;:::i;:::-;8722:12;;;;8619:45;-1:-1:-1;8687:15:1;;;;8550:1;8543:9;8514:230;;;-1:-1:-1;8760:4:1;;8156:614;-1:-1:-1;;;;;;;8156:614:1:o;8775:277::-;8972:2;8961:9;8954:21;8935:4;8992:54;9042:2;9031:9;9027:18;9019:6;8992:54;:::i;9057:470::-;9157:6;9152:3;9145:19;9127:3;9183:4;9212:2;9207:3;9203:12;9196:19;;9238:5;9261:1;9271:231;9285:6;9282:1;9279:13;9271:231;;;9378:42;9350:26;9369:6;9350:26;:::i;:::-;9346:75;9334:88;;9442:12;;;;9477:15;;;;9307:1;9300:9;9271:231;;;-1:-1:-1;9518:3:1;;9057:470;-1:-1:-1;;;;;9057:470:1:o;9532:401::-;9632:6;9627:3;9620:19;9602:3;9662:66;9654:6;9651:78;9648:98;;;9742:1;9739;9732:12;9648:98;9778:6;9775:1;9771:14;9830:8;9823:5;9816:4;9811:3;9807:14;9794:45;9907:1;9862:18;;9882:4;9858:29;9896:13;;;-1:-1:-1;9858:29:1;;9532:401;-1:-1:-1;;9532:401:1:o;9938:342::-;10030:5;10053:1;10063:211;10077:4;10074:1;10071:11;10063:211;;;10140:13;;10155:10;10136:30;10124:43;;10190:4;10214:12;;;;10249:15;;;;10097:1;10090:9;10063:211;;10285:2029;10940:4;10969:3;10999:2;10988:9;10981:21;11025:44;11065:2;11054:9;11050:18;11042:6;11025:44;:::i;:::-;11011:58;;11088:2;11138:9;11130:6;11126:22;11121:2;11110:9;11106:18;11099:50;11172:32;11197:6;11189;11172:32;:::i;:::-;11158:46;;11252:9;11244:6;11240:22;11235:2;11224:9;11220:18;11213:50;11286:32;11311:6;11303;11286:32;:::i;:::-;11361:14;;11354:22;11349:2;11334:18;;11327:50;11414:22;;;11408:3;11393:19;;11386:51;11486:13;;11508:22;;;11584:15;;;;-1:-1:-1;11546:15:1;;;;-1:-1:-1;11627:218:1;11641:6;11638:1;11635:13;11627:218;;;11706:13;;11721:42;11702:62;11690:75;;11820:15;;;;11785:12;;;;11663:1;11656:9;11627:218;;;11631:3;;11891:9;11886:3;11882:19;11876:3;11865:9;11861:19;11854:48;11925:39;11960:3;11952:6;11925:39;:::i;:::-;11911:53;;;;12013:9;12005:6;12001:22;11995:3;11984:9;11980:19;11973:51;12047:61;12101:6;12093;12085;12047:61;:::i;:::-;12033:75;;12157:9;12149:6;12145:22;12139:3;12128:9;12124:19;12117:51;12185:61;12239:6;12231;12223;12185:61;:::i;:::-;12177:69;;;12255:53;12303:3;12292:9;12288:19;12279:7;12255:53;:::i;:::-;10285:2029;;;;;;;;;;;;;;:::o;12550:184::-;12602:77;12599:1;12592:88;12699:4;12696:1;12689:15;12723:4;12720:1;12713:15;12739:580;12816:4;12822:6;12882:11;12869:25;12972:66;12961:8;12945:14;12941:29;12937:102;12917:18;12913:127;12903:155;;13054:1;13051;13044:12;12903:155;13081:33;;13133:20;;;-1:-1:-1;13176:18:1;13165:30;;13162:50;;;13208:1;13205;13198:12;13162:50;13241:4;13229:17;;-1:-1:-1;13272:14:1;13268:27;;;13258:38;;13255:58;;;13309:1;13306;13299:12;13324:271;13507:6;13499;13494:3;13481:33;13463:3;13533:16;;13558:13;;;13533:16;13324:271;-1:-1:-1;13324:271:1:o;13600:636::-;13680:6;13733:2;13721:9;13712:7;13708:23;13704:32;13701:52;;;13749:1;13746;13739:12;13701:52;13782:9;13776:16;13815:18;13807:6;13804:30;13801:50;;;13847:1;13844;13837:12;13801:50;13870:22;;13923:4;13915:13;;13911:27;-1:-1:-1;13901:55:1;;13952:1;13949;13942:12;13901:55;13981:2;13975:9;14006:49;14022:32;14051:2;14022:32;:::i;14006:49::-;14078:2;14071:5;14064:17;14118:7;14113:2;14108;14104;14100:11;14096:20;14093:33;14090:53;;;14139:1;14136;14129:12;14090:53;14152:54;14203:2;14198;14191:5;14187:14;14182:2;14178;14174:11;14152:54;:::i;:::-;14225:5;13600:636;-1:-1:-1;;;;;13600:636:1:o;14241:219::-;14390:2;14379:9;14372:21;14353:4;14410:44;14450:2;14439:9;14435:18;14427:6;14410:44;:::i

Swarm Source

ipfs://1e8e196b35ac1eda4c5829f7be93ce2442c6d948a2356d222927276bd4bb32f4
Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.