├── .eslintrc ├── .gitattributes ├── .github └── workflows │ ├── lint.yml │ ├── npm.yml │ └── solidity-test.yml ├── .gitignore ├── .pre-commit-config.yaml ├── .prettierrc ├── .python-version ├── .solhint.json ├── .solhintignore ├── CONTRIBUTING.adoc ├── README.adoc ├── buidler.config.js ├── contracts ├── Branch.sol ├── Chaosnet.sol ├── Constants.sol ├── Leaf.sol ├── Migrations.sol ├── Position.sol ├── RNG.sol ├── Rewards.sol ├── SortitionPool.sol ├── SortitionTree.sol └── test │ ├── BranchStub.sol │ ├── LeafStub.sol │ ├── PositionStub.sol │ ├── RNGStub.sol │ ├── RewardsStub.sol │ ├── SortitionTreeStub.sol │ ├── TestBranch.sol │ └── TokenStub.sol ├── docs ├── building-intuition.md ├── implementation-details.md └── rewards.md ├── hardhat.config.ts ├── migrations ├── 1_initial_migration.js ├── 2_deploy_contracts.js └── scripts │ └── deployContracts.js ├── package.json ├── test ├── branchTest.js ├── leafTest.js ├── params.js ├── positionTest.js ├── rewardsTest.js ├── rngTest.js ├── sortitionPoolTest.js ├── sortitionTreeTest.js └── utils.js └── truffle-config.js /.eslintrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keep-network/sortition-pools/HEAD/.eslintrc -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.sol linguist-language=Solidity 2 | -------------------------------------------------------------------------------- /.github/workflows/lint.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keep-network/sortition-pools/HEAD/.github/workflows/lint.yml -------------------------------------------------------------------------------- /.github/workflows/npm.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keep-network/sortition-pools/HEAD/.github/workflows/npm.yml -------------------------------------------------------------------------------- /.github/workflows/solidity-test.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keep-network/sortition-pools/HEAD/.github/workflows/solidity-test.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | build/ 3 | cache/ 4 | .vscode 5 | .envrc 6 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keep-network/sortition-pools/HEAD/.pre-commit-config.yaml -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keep-network/sortition-pools/HEAD/.prettierrc -------------------------------------------------------------------------------- /.python-version: -------------------------------------------------------------------------------- 1 | 3.10.9 2 | -------------------------------------------------------------------------------- /.solhint.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keep-network/sortition-pools/HEAD/.solhint.json -------------------------------------------------------------------------------- /.solhintignore: -------------------------------------------------------------------------------- 1 | node_modules/ -------------------------------------------------------------------------------- /CONTRIBUTING.adoc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keep-network/sortition-pools/HEAD/CONTRIBUTING.adoc -------------------------------------------------------------------------------- /README.adoc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keep-network/sortition-pools/HEAD/README.adoc -------------------------------------------------------------------------------- /buidler.config.js: -------------------------------------------------------------------------------- 1 | module.exports = {}; 2 | -------------------------------------------------------------------------------- /contracts/Branch.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keep-network/sortition-pools/HEAD/contracts/Branch.sol -------------------------------------------------------------------------------- /contracts/Chaosnet.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keep-network/sortition-pools/HEAD/contracts/Chaosnet.sol -------------------------------------------------------------------------------- /contracts/Constants.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keep-network/sortition-pools/HEAD/contracts/Constants.sol -------------------------------------------------------------------------------- /contracts/Leaf.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keep-network/sortition-pools/HEAD/contracts/Leaf.sol -------------------------------------------------------------------------------- /contracts/Migrations.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keep-network/sortition-pools/HEAD/contracts/Migrations.sol -------------------------------------------------------------------------------- /contracts/Position.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keep-network/sortition-pools/HEAD/contracts/Position.sol -------------------------------------------------------------------------------- /contracts/RNG.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keep-network/sortition-pools/HEAD/contracts/RNG.sol -------------------------------------------------------------------------------- /contracts/Rewards.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keep-network/sortition-pools/HEAD/contracts/Rewards.sol -------------------------------------------------------------------------------- /contracts/SortitionPool.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keep-network/sortition-pools/HEAD/contracts/SortitionPool.sol -------------------------------------------------------------------------------- /contracts/SortitionTree.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keep-network/sortition-pools/HEAD/contracts/SortitionTree.sol -------------------------------------------------------------------------------- /contracts/test/BranchStub.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keep-network/sortition-pools/HEAD/contracts/test/BranchStub.sol -------------------------------------------------------------------------------- /contracts/test/LeafStub.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keep-network/sortition-pools/HEAD/contracts/test/LeafStub.sol -------------------------------------------------------------------------------- /contracts/test/PositionStub.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keep-network/sortition-pools/HEAD/contracts/test/PositionStub.sol -------------------------------------------------------------------------------- /contracts/test/RNGStub.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keep-network/sortition-pools/HEAD/contracts/test/RNGStub.sol -------------------------------------------------------------------------------- /contracts/test/RewardsStub.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keep-network/sortition-pools/HEAD/contracts/test/RewardsStub.sol -------------------------------------------------------------------------------- /contracts/test/SortitionTreeStub.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keep-network/sortition-pools/HEAD/contracts/test/SortitionTreeStub.sol -------------------------------------------------------------------------------- /contracts/test/TestBranch.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keep-network/sortition-pools/HEAD/contracts/test/TestBranch.sol -------------------------------------------------------------------------------- /contracts/test/TokenStub.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keep-network/sortition-pools/HEAD/contracts/test/TokenStub.sol -------------------------------------------------------------------------------- /docs/building-intuition.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keep-network/sortition-pools/HEAD/docs/building-intuition.md -------------------------------------------------------------------------------- /docs/implementation-details.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keep-network/sortition-pools/HEAD/docs/implementation-details.md -------------------------------------------------------------------------------- /docs/rewards.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keep-network/sortition-pools/HEAD/docs/rewards.md -------------------------------------------------------------------------------- /hardhat.config.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keep-network/sortition-pools/HEAD/hardhat.config.ts -------------------------------------------------------------------------------- /migrations/1_initial_migration.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keep-network/sortition-pools/HEAD/migrations/1_initial_migration.js -------------------------------------------------------------------------------- /migrations/2_deploy_contracts.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keep-network/sortition-pools/HEAD/migrations/2_deploy_contracts.js -------------------------------------------------------------------------------- /migrations/scripts/deployContracts.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keep-network/sortition-pools/HEAD/migrations/scripts/deployContracts.js -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keep-network/sortition-pools/HEAD/package.json -------------------------------------------------------------------------------- /test/branchTest.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keep-network/sortition-pools/HEAD/test/branchTest.js -------------------------------------------------------------------------------- /test/leafTest.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keep-network/sortition-pools/HEAD/test/leafTest.js -------------------------------------------------------------------------------- /test/params.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keep-network/sortition-pools/HEAD/test/params.js -------------------------------------------------------------------------------- /test/positionTest.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keep-network/sortition-pools/HEAD/test/positionTest.js -------------------------------------------------------------------------------- /test/rewardsTest.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keep-network/sortition-pools/HEAD/test/rewardsTest.js -------------------------------------------------------------------------------- /test/rngTest.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keep-network/sortition-pools/HEAD/test/rngTest.js -------------------------------------------------------------------------------- /test/sortitionPoolTest.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keep-network/sortition-pools/HEAD/test/sortitionPoolTest.js -------------------------------------------------------------------------------- /test/sortitionTreeTest.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keep-network/sortition-pools/HEAD/test/sortitionTreeTest.js -------------------------------------------------------------------------------- /test/utils.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keep-network/sortition-pools/HEAD/test/utils.js -------------------------------------------------------------------------------- /truffle-config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keep-network/sortition-pools/HEAD/truffle-config.js --------------------------------------------------------------------------------