├── .gas-report
├── .gas-snapshot
├── .github
└── workflows
│ └── CI.yml
├── .gitignore
├── .gitmodules
├── .solhint.json
├── .solhintignore
├── Makefile
├── README.md
├── blacksmith.js
├── discord-export
├── Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html
├── Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files
│ ├── 0-EB806.png
│ ├── 086cac0cb044439a9e2a3ee516e027f0-75F86.png
│ ├── 0ab6fddedfdca4dee0b54ab41ab4faad-C5611.png
│ ├── 0b64a596f11b3e1a40d41f787a7df5de-61313.png
│ ├── 1-B2132.png
│ ├── 1593f66e6459030823c373f0003a847f-54395.png
│ ├── 1be738709eab4aad67b38f40567986b5-12BAF.png
│ ├── 1f1ec-61436.svg
│ ├── 1f1f2-F133A.svg
│ ├── 1f389-5C738.svg
│ ├── 1f3c1-445DC.svg
│ ├── 1f3c6-621A1.svg
│ ├── 1f43a-EB486.svg
│ ├── 1f440-6C64D.svg
│ ├── 1f446-9CC34.svg
│ ├── 1f44b-8A059.svg
│ ├── 1f44d-27259.svg
│ ├── 1f4aa-2FD27.svg
│ ├── 1f4af-4CFF5.svg
│ ├── 1f4b8-E3468.svg
│ ├── 1f4c6-44E30.svg
│ ├── 1f4dc-AC641.svg
│ ├── 1f50d-195C0.svg
│ ├── 1f525-8FE4F.svg
│ ├── 1f602-168C5.svg
│ ├── 1f604-BF863.svg
│ ├── 1f605-42B43.svg
│ ├── 1f606-BE94E.svg
│ ├── 1f60d-BEAFF.svg
│ ├── 1f61b-EC4B5.svg
│ ├── 1f636-300DD.svg
│ ├── 1f642-83E8A.svg
│ ├── 1f64c-7C820.svg
│ ├── 1f64f-22B8D.svg
│ ├── 1f680-A35CE.svg
│ ├── 1f6a8-A8AB3.svg
│ ├── 1f911-F346C.svg
│ ├── 1f91e-2A114.svg
│ ├── 1f923-5854E.svg
│ ├── 1f929-12865.svg
│ ├── 1f978-72F6F.svg
│ ├── 1f97a-1F57B.svg
│ ├── 1f9d1-5BC80.svg
│ ├── 1f9e9-51B17.svg
│ ├── 2-ADBB4.png
│ ├── 23fb4264e9ec351ea19dcc20b23b97bc-10D12.png
│ ├── 2620-8F5D5.svg
│ ├── 2696-15F4A.svg
│ ├── 2764-A3D25.svg
│ ├── 2a9faff195fe333526cfe6ae6fce1420-927E9.png
│ ├── 2e873a89c63d14f8623488599207ffd2-FBFCE.png
│ ├── 3-FB033.png
│ ├── 30024f2eab00f1f2f2caee60d2b320a7-40E01.png
│ ├── 34807a544df04d136d013fdd0b743601-7992D.png
│ ├── 358831113533128716-759E1.png
│ ├── 373fe17aeed19bc93732305c355bd3b3-3CB34.png
│ ├── 3cc290db84d8ae57446d6411dd6e530a-B550C.png
│ ├── 4c405c8d602d7b3489d628bf20bfb843-60774.png
│ ├── 4fe9ded2c25b0a4eba61f89d2796403f-94BE7.png
│ ├── 532b87c1fe19878baaabb8a164a03d8a-AEB32.png
│ ├── 568d22b97293cdd2d9b7006198d6adbc-9738F.png
│ ├── 57169f4f9ccb72b4fdbdfc8181291fd6-0E964.png
│ ├── 58b46af47531bd5a9043cddd687d79a8-B5211.png
│ ├── 5b069e074423293b86222b4350052da5-77740.png
│ ├── 67594ee4b4d1fc03bca468327a0d145b-0C614.png
│ ├── 6bd031a83eb1bb93550583b08ec4f1fc-75312.png
│ ├── 7361e249021ebcbcb47ed83cd8a8938b-C719D.png
│ ├── 749622703937421423-A984B.gif
│ ├── 759f8cc5f5d3a90e11a0003e003aec16-8D7BB.png
│ ├── 781415a7ef0ff20e2f8e85348fbd64c1-5F911.png
│ ├── 79851a9b1b4ce964ecdf04ebd11fc58b-912CB.png
│ ├── 7bc4c839a9be7e096b3eea8bee2584bb-13BD0.png
│ ├── 82ef96e86c65cc45e7b2882c09b1376a-BC471.png
│ ├── 851893157188599838-C23B5.png
│ ├── 851893827027075142-F23DF.png
│ ├── 851893827035725825-8ED59.png
│ ├── 851893827089727568-5FD38.png
│ ├── 851893827315826708-F59C0.png
│ ├── 851893827409412118-10EE9.png
│ ├── 851893828280909886-FBF42.png
│ ├── 860472319894093835-5F120.png
│ ├── 875768404651421746-8565C.gif
│ ├── 875768832092938261-3B8B7.gif
│ ├── 8e4ad9a4555f6894053e2679edd184fd-5303B.png
│ ├── 910676187288846397-518CD.png
│ ├── 93f060e04ae9095b71d564c85c70fa36-0C755.png
│ ├── 946326ff32de5e03d9081da9d249cbb4-72340.png
│ ├── 9503f567dabd2781b3d25827ceb83075-313E1.png
│ ├── 95eb2b7da9e65670cef82d8c8f1a379a-0F6B0.png
│ ├── 970d2e2f00cd7ef2134a1a3f21326349-B9EEF.png
│ ├── C4-banner-7C19B.png
│ ├── IMG_20220907_205755-5D7EF.jpg
│ ├── a1cbe61e22b7aee35237eaa81514c39a-C9795.png
│ ├── a3543456a09e49cb364c91b15541774a-203F3.png
│ ├── a817b86643419344c1376097f1e66bb7-805C7.png
│ ├── a_26c405c08ce6d45f151153e76c2ce8fa-362D9.gif
│ ├── a_a094a89a5646b492010b63fa9207e93a-F7CC6.gif
│ ├── aba7f6b23cd80ec9e8655016ce6ef443-929E9.png
│ ├── ae70f07a06c1c7e983291bb14a1bed7f-93518.png
│ ├── b76b91d205959d3069658a4ce5fc830c-1492A.png
│ ├── c47e074275f9b2c05d095d0847bc18dd-CF0A6.png
│ ├── c78a9a082131e80da3bdc11e1229f717-2388E.png
│ ├── c9cb30134c634c9e02d0c64df4922803-1AAF2.png
│ ├── cb23e87e4eb33d228ed3294f90188951-D6A20.png
│ ├── cfbf4964bc9e2c0d547d2eac3b227cd6-4D0C9.png
│ ├── d7e24e0994d277993ed07845cac9ca8b-E4084.png
│ ├── dedb7a984677153d10beb9630a5788c9-9F840.png
│ ├── dfacc77d68962a991f5a4c3b7859b4c2-0A44D.png
│ ├── dk-nintendo-1B634.mp4
│ ├── e2171069b4b213c910837760d8ad5ae4-1519E.png
│ ├── e41314dc3b653c59e972b0ca111608e3-201EB.png
│ ├── e8e42b0753ed4170607ecff76b81d17e-80898.png
│ ├── ed7d1bfcf45cfb13a5d12c8591a5d892-7FA79.png
│ ├── foundry-0B9FE.toml
│ ├── ggsans-italic-400-E988B.woff2
│ ├── ggsans-italic-500-0777F.woff2
│ ├── ggsans-italic-600-CB411.woff2
│ ├── ggsans-italic-700-891AC.woff2
│ ├── ggsans-italic-800-D36B0.woff2
│ ├── ggsans-normal-400-1456D.woff2
│ ├── ggsans-normal-500-89CE5.woff2
│ ├── ggsans-normal-600-C1EA8.woff2
│ ├── ggsans-normal-700-1949A.woff2
│ ├── ggsans-normal-800-58487.woff2
│ ├── highlight.min-D8D27.js
│ ├── lottie.min-99657.js
│ ├── message-B45F6.txt
│ ├── solarized-dark.min-BA98F.css
│ └── unknown-7F697.png
├── Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].txt
└── Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].txt_Files
│ ├── C4-banner-7C19B.png
│ ├── IMG_20220907_205755-5D7EF.jpg
│ ├── dk-nintendo-1331B.png
│ ├── foundry-0B9FE.toml
│ ├── message-B45F6.txt
│ └── unknown-7F697.png
├── docs
├── FERC1155.md
├── Vault.md
├── VaultFactory.md
├── VaultRegistry.md
├── constants
│ ├── Memory.md
│ ├── Permit.md
│ ├── Supply.md
│ └── Transfer.md
├── interfaces
│ ├── IBaseVault.md
│ ├── IBuyout.md
│ ├── IERC1155.md
│ ├── IERC20.md
│ ├── IERC721.md
│ ├── IFERC1155.md
│ ├── IMigration.md
│ ├── IMinter.md
│ ├── IModule.md
│ ├── INFTReceiver.md
│ ├── IProtoform.md
│ ├── ISupply.md
│ ├── ITransfer.md
│ ├── IVault.md
│ ├── IVaultFactory.md
│ └── IVaultRegistry.md
├── mocks
│ ├── MockERC1155.md
│ ├── MockERC20.md
│ ├── MockERC721.md
│ ├── MockEthReceiver.md
│ ├── MockModule.md
│ ├── MockPermitter.md
│ └── MockSender.md
├── modules
│ ├── Buyout.md
│ ├── Migration.md
│ ├── Minter.md
│ └── protoforms
│ │ └── BaseVault.md
├── references
│ ├── SupplyReference.md
│ └── TransferReference.md
├── targets
│ ├── Supply.md
│ └── Transfer.md
└── utils
│ ├── MerkleBase.md
│ ├── Metadata.md
│ ├── Multicall.md
│ ├── NFTReceiver.md
│ ├── SafeSend.md
│ └── SelfPermit.md
├── foundry.toml
├── hardhat.config.js
├── package-lock.json
├── package.json
├── remappings.txt
├── scripts
├── contracts
│ └── rinkeby.json
├── deploy.js
├── factory
│ ├── deploy.js
│ └── verify.js
├── merkle
│ ├── input
│ │ └── permission.js
│ ├── output
│ │ └── permission.json
│ └── permission.js
├── modules
│ ├── deploy.js
│ └── verify.js
├── registry
│ ├── deploy.js
│ └── verify.js
├── targets
│ ├── deploy.js
│ └── verify.js
└── verify.js
├── slither.config.json
├── src
├── FERC1155.sol
├── Vault.sol
├── VaultFactory.sol
├── VaultRegistry.sol
├── constants
│ ├── Memory.sol
│ ├── Permit.sol
│ ├── Supply.sol
│ └── Transfer.sol
├── interfaces
│ ├── IBaseVault.sol
│ ├── IBuyout.sol
│ ├── IERC1155.sol
│ ├── IERC20.sol
│ ├── IERC721.sol
│ ├── IFERC1155.sol
│ ├── IMigration.sol
│ ├── IMinter.sol
│ ├── IModule.sol
│ ├── INFTReceiver.sol
│ ├── IProtoform.sol
│ ├── ISupply.sol
│ ├── ITransfer.sol
│ ├── IVault.sol
│ ├── IVaultFactory.sol
│ └── IVaultRegistry.sol
├── mocks
│ ├── MockERC1155.sol
│ ├── MockERC20.sol
│ ├── MockERC721.sol
│ ├── MockEthReceiver.sol
│ ├── MockModule.sol
│ ├── MockPermitter.sol
│ └── MockSender.sol
├── modules
│ ├── Buyout.sol
│ ├── Migration.sol
│ ├── Minter.sol
│ └── protoforms
│ │ └── BaseVault.sol
├── references
│ ├── SupplyReference.sol
│ └── TransferReference.sol
├── targets
│ ├── Supply.sol
│ └── Transfer.sol
└── utils
│ ├── MerkleBase.sol
│ ├── Metadata.sol
│ ├── Multicall.sol
│ ├── NFTReceiver.sol
│ ├── SafeSend.sol
│ └── SelfPermit.sol
└── test
├── BaseVault.t.sol
├── Buyout.t.sol
├── FERC1155.t.sol
├── Migration.t.sol
├── SafeSend.t.sol
├── SelfPermit.t.sol
├── TestUtil.sol
├── Transfer.t.sol
├── Vault.t.sol
├── VaultFactory.t.sol
└── VaultRegistry.t.sol
/.github/workflows/CI.yml:
--------------------------------------------------------------------------------
1 | name: CI
2 | on:
3 | push:
4 | branches:
5 | - main
6 | pull_request:
7 |
8 | jobs:
9 | run-ci:
10 | runs-on: ubuntu-latest
11 | steps:
12 | - uses: actions/checkout@v2
13 | with:
14 | submodules: recursive
15 | - uses: actions/setup-node@v2
16 | - name: Install dev dependencies
17 | run: npm install
18 |
19 | - name: Install Foundry
20 | uses: onbjerg/foundry-toolchain@v1
21 | with:
22 | version: nightly
23 |
24 | - name: Run lint check
25 | run: npm run lint:check
26 |
27 | - name: create user contracts
28 | run: make users
29 |
30 | - name: Run tests
31 | run: make report
32 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Node
2 | node_modules
3 |
4 | # Forge
5 | cache/
6 | out/
7 | test/blacksmith/
8 |
9 | # Hardhat
10 | artifacts/
11 | hh-cache/
12 |
13 | # Environment
14 | .env
15 |
16 | # IDE
17 | .idea/
18 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "lib/clones-with-immutable-args"]
2 | path = lib/clones-with-immutable-args
3 | url = https://github.com/stevennevins/clones-with-immutable-args
4 | [submodule "lib/openzeppelin-contracts"]
5 | path = lib/openzeppelin-contracts
6 | url = https://github.com/Openzeppelin/openzeppelin-contracts
7 | [submodule "lib/solmate"]
8 | path = lib/solmate
9 | url = https://github.com/Rari-capital/solmate
10 |
--------------------------------------------------------------------------------
/.solhint.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "solhint:recommended",
3 | "rules": {
4 | "func-visibility": ["warn", { "ignoreConstructors": true }],
5 | "compiler-version": ["error", ">=0.8.0"],
6 | "avoid-low-level-calls": "off"
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/.solhintignore:
--------------------------------------------------------------------------------
1 | src/test/
2 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | .PHONY: all test clean
2 |
3 | ifndef m
4 | override m = test
5 | endif
6 |
7 | all: prettier users test snapshot summary docgen
8 | build :; forge build
9 | users :; node blacksmith.js create
10 | test :; forge test -vvv --match-test $(m)
11 | report :; forge test --gas-report -vvv --optimize
12 | summary :; make report > .gas-report
13 | snapshot :; forge snapshot --optimize
14 | docgen :; npx hardhat docgen
15 | deps :; git submodule update --init --recursive
16 | install :; npm install
17 | prettier :; npm run prettier
18 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/0-EB806.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/0-EB806.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/086cac0cb044439a9e2a3ee516e027f0-75F86.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/086cac0cb044439a9e2a3ee516e027f0-75F86.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/0ab6fddedfdca4dee0b54ab41ab4faad-C5611.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/0ab6fddedfdca4dee0b54ab41ab4faad-C5611.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/0b64a596f11b3e1a40d41f787a7df5de-61313.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/0b64a596f11b3e1a40d41f787a7df5de-61313.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/1-B2132.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/1-B2132.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/1593f66e6459030823c373f0003a847f-54395.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/1593f66e6459030823c373f0003a847f-54395.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/1be738709eab4aad67b38f40567986b5-12BAF.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/1be738709eab4aad67b38f40567986b5-12BAF.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/1f1ec-61436.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/1f1f2-F133A.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/1f389-5C738.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/1f3c1-445DC.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/1f3c6-621A1.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/1f43a-EB486.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/1f440-6C64D.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/1f446-9CC34.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/1f44b-8A059.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/1f44d-27259.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/1f4aa-2FD27.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/1f4af-4CFF5.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/1f4c6-44E30.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/1f4dc-AC641.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/1f50d-195C0.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/1f525-8FE4F.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/1f602-168C5.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/1f604-BF863.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/1f605-42B43.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/1f606-BE94E.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/1f60d-BEAFF.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/1f61b-EC4B5.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/1f636-300DD.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/1f642-83E8A.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/1f64c-7C820.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/1f64f-22B8D.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/1f680-A35CE.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/1f6a8-A8AB3.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/1f911-F346C.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/1f91e-2A114.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/1f923-5854E.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/1f929-12865.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/1f97a-1F57B.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/1f9d1-5BC80.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/1f9e9-51B17.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/2-ADBB4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/2-ADBB4.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/23fb4264e9ec351ea19dcc20b23b97bc-10D12.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/23fb4264e9ec351ea19dcc20b23b97bc-10D12.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/2620-8F5D5.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/2696-15F4A.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/2764-A3D25.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/2a9faff195fe333526cfe6ae6fce1420-927E9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/2a9faff195fe333526cfe6ae6fce1420-927E9.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/2e873a89c63d14f8623488599207ffd2-FBFCE.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/2e873a89c63d14f8623488599207ffd2-FBFCE.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/3-FB033.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/3-FB033.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/30024f2eab00f1f2f2caee60d2b320a7-40E01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/30024f2eab00f1f2f2caee60d2b320a7-40E01.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/34807a544df04d136d013fdd0b743601-7992D.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/34807a544df04d136d013fdd0b743601-7992D.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/358831113533128716-759E1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/358831113533128716-759E1.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/373fe17aeed19bc93732305c355bd3b3-3CB34.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/373fe17aeed19bc93732305c355bd3b3-3CB34.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/3cc290db84d8ae57446d6411dd6e530a-B550C.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/3cc290db84d8ae57446d6411dd6e530a-B550C.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/4c405c8d602d7b3489d628bf20bfb843-60774.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/4c405c8d602d7b3489d628bf20bfb843-60774.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/4fe9ded2c25b0a4eba61f89d2796403f-94BE7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/4fe9ded2c25b0a4eba61f89d2796403f-94BE7.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/532b87c1fe19878baaabb8a164a03d8a-AEB32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/532b87c1fe19878baaabb8a164a03d8a-AEB32.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/568d22b97293cdd2d9b7006198d6adbc-9738F.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/568d22b97293cdd2d9b7006198d6adbc-9738F.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/57169f4f9ccb72b4fdbdfc8181291fd6-0E964.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/57169f4f9ccb72b4fdbdfc8181291fd6-0E964.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/58b46af47531bd5a9043cddd687d79a8-B5211.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/58b46af47531bd5a9043cddd687d79a8-B5211.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/5b069e074423293b86222b4350052da5-77740.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/5b069e074423293b86222b4350052da5-77740.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/67594ee4b4d1fc03bca468327a0d145b-0C614.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/67594ee4b4d1fc03bca468327a0d145b-0C614.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/6bd031a83eb1bb93550583b08ec4f1fc-75312.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/6bd031a83eb1bb93550583b08ec4f1fc-75312.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/7361e249021ebcbcb47ed83cd8a8938b-C719D.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/7361e249021ebcbcb47ed83cd8a8938b-C719D.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/749622703937421423-A984B.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/749622703937421423-A984B.gif
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/759f8cc5f5d3a90e11a0003e003aec16-8D7BB.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/759f8cc5f5d3a90e11a0003e003aec16-8D7BB.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/781415a7ef0ff20e2f8e85348fbd64c1-5F911.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/781415a7ef0ff20e2f8e85348fbd64c1-5F911.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/79851a9b1b4ce964ecdf04ebd11fc58b-912CB.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/79851a9b1b4ce964ecdf04ebd11fc58b-912CB.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/7bc4c839a9be7e096b3eea8bee2584bb-13BD0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/7bc4c839a9be7e096b3eea8bee2584bb-13BD0.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/82ef96e86c65cc45e7b2882c09b1376a-BC471.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/82ef96e86c65cc45e7b2882c09b1376a-BC471.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/851893157188599838-C23B5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/851893157188599838-C23B5.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/851893827027075142-F23DF.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/851893827027075142-F23DF.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/851893827035725825-8ED59.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/851893827035725825-8ED59.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/851893827089727568-5FD38.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/851893827089727568-5FD38.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/851893827315826708-F59C0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/851893827315826708-F59C0.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/851893827409412118-10EE9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/851893827409412118-10EE9.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/851893828280909886-FBF42.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/851893828280909886-FBF42.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/860472319894093835-5F120.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/860472319894093835-5F120.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/875768404651421746-8565C.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/875768404651421746-8565C.gif
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/875768832092938261-3B8B7.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/875768832092938261-3B8B7.gif
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/8e4ad9a4555f6894053e2679edd184fd-5303B.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/8e4ad9a4555f6894053e2679edd184fd-5303B.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/910676187288846397-518CD.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/910676187288846397-518CD.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/93f060e04ae9095b71d564c85c70fa36-0C755.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/93f060e04ae9095b71d564c85c70fa36-0C755.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/946326ff32de5e03d9081da9d249cbb4-72340.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/946326ff32de5e03d9081da9d249cbb4-72340.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/9503f567dabd2781b3d25827ceb83075-313E1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/9503f567dabd2781b3d25827ceb83075-313E1.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/95eb2b7da9e65670cef82d8c8f1a379a-0F6B0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/95eb2b7da9e65670cef82d8c8f1a379a-0F6B0.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/970d2e2f00cd7ef2134a1a3f21326349-B9EEF.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/970d2e2f00cd7ef2134a1a3f21326349-B9EEF.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/C4-banner-7C19B.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/C4-banner-7C19B.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/IMG_20220907_205755-5D7EF.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/IMG_20220907_205755-5D7EF.jpg
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/a1cbe61e22b7aee35237eaa81514c39a-C9795.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/a1cbe61e22b7aee35237eaa81514c39a-C9795.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/a3543456a09e49cb364c91b15541774a-203F3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/a3543456a09e49cb364c91b15541774a-203F3.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/a817b86643419344c1376097f1e66bb7-805C7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/a817b86643419344c1376097f1e66bb7-805C7.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/a_26c405c08ce6d45f151153e76c2ce8fa-362D9.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/a_26c405c08ce6d45f151153e76c2ce8fa-362D9.gif
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/a_a094a89a5646b492010b63fa9207e93a-F7CC6.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/a_a094a89a5646b492010b63fa9207e93a-F7CC6.gif
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/aba7f6b23cd80ec9e8655016ce6ef443-929E9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/aba7f6b23cd80ec9e8655016ce6ef443-929E9.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/ae70f07a06c1c7e983291bb14a1bed7f-93518.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/ae70f07a06c1c7e983291bb14a1bed7f-93518.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/b76b91d205959d3069658a4ce5fc830c-1492A.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/b76b91d205959d3069658a4ce5fc830c-1492A.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/c47e074275f9b2c05d095d0847bc18dd-CF0A6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/c47e074275f9b2c05d095d0847bc18dd-CF0A6.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/c78a9a082131e80da3bdc11e1229f717-2388E.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/c78a9a082131e80da3bdc11e1229f717-2388E.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/c9cb30134c634c9e02d0c64df4922803-1AAF2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/c9cb30134c634c9e02d0c64df4922803-1AAF2.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/cb23e87e4eb33d228ed3294f90188951-D6A20.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/cb23e87e4eb33d228ed3294f90188951-D6A20.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/cfbf4964bc9e2c0d547d2eac3b227cd6-4D0C9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/cfbf4964bc9e2c0d547d2eac3b227cd6-4D0C9.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/d7e24e0994d277993ed07845cac9ca8b-E4084.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/d7e24e0994d277993ed07845cac9ca8b-E4084.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/dedb7a984677153d10beb9630a5788c9-9F840.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/dedb7a984677153d10beb9630a5788c9-9F840.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/dfacc77d68962a991f5a4c3b7859b4c2-0A44D.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/dfacc77d68962a991f5a4c3b7859b4c2-0A44D.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/dk-nintendo-1B634.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/dk-nintendo-1B634.mp4
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/e2171069b4b213c910837760d8ad5ae4-1519E.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/e2171069b4b213c910837760d8ad5ae4-1519E.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/e41314dc3b653c59e972b0ca111608e3-201EB.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/e41314dc3b653c59e972b0ca111608e3-201EB.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/e8e42b0753ed4170607ecff76b81d17e-80898.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/e8e42b0753ed4170607ecff76b81d17e-80898.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/ed7d1bfcf45cfb13a5d12c8591a5d892-7FA79.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/ed7d1bfcf45cfb13a5d12c8591a5d892-7FA79.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/foundry-0B9FE.toml:
--------------------------------------------------------------------------------
1 | ## defaults for _all_ profiles
2 | [default]
3 | src = 'src'
4 | test = 'test'
5 | out = 'out'
6 | libs = ['lib']
7 | remappings = []
8 | libraries = []
9 | # cache = true
10 | cache_path = 'cache'
11 | force = false
12 | evm_version = 'london'
13 | gas_reports = [
14 | "src/FERC1155.sol:FERC1155",
15 | "src/Vault.sol:Vault",
16 | "src/VaultFactory.sol:VaultFactory",
17 | "src/VaultRegistry.sol:VaultRegistry",
18 | "src/modules/Buyout.sol:Buyout",
19 | "src/modules/Migration.sol:Migration",
20 | "src/modules/protoforms/BaseVault.sol:BaseVault",
21 | "src/references/TransferReference.sol:TransferReference",
22 | "src/targets/Supply.sol:Supply",
23 | "src/targets/Transfer.sol:Transfer",
24 | "src/utils/Metadata.sol:Metadata"
25 | ]
26 | ## Sets the concrete solc version to use, this overrides the `auto_detect_solc` value
27 | # solc_version = '0.8.10'
28 | auto_detect_solc = true
29 | offline = false
30 | optimizer = false
31 | #optimizer_runs = 200
32 | via_ir = false
33 | verbosity = 0
34 | ignored_error_codes = []
35 | fuzz_runs = 256
36 | ffi = false
37 | sender = '0x00a329c0648769a73afac7f9381e08fb43dbea72'
38 | tx_origin = '0x00a329c0648769a73afac7f9381e08fb43dbea72'
39 | initial_balance = '0xffffffffffffffffffffffff'
40 | block_number = 0
41 | # NOTE due to a toml-rs limitation, this value needs to be a string if the desired gas limit exceeds `i64::MAX` (9223372036854775807)
42 | gas_limit = 9223372036854775807
43 | gas_price = 0
44 | block_base_fee_per_gas = 0
45 | block_coinbase = '0x0000000000000000000000000000000000000000'
46 | block_timestamp = 0
47 | block_difficulty = 0
48 | # caches storage retrieved locally for certain chains and endpoints
49 | # can also be restrictied to `chains = ["optimism", "mainnet"]`
50 | # by default all endpoints will be cached, alternative options are "remote" for only caching non localhost endpoints and ""
51 | # to disable storage caching entirely set `no_storage_caching = true`
52 | rpc_storage_caching = { chains = "all", endpoints = "all" }
53 | # this overrides `rpc_storage_caching` entirely
54 | no_storage_caching = false
55 | # use ipfs method to generate the metadata hash, solc's default.
56 | # To not include the metadata hash, to allow for deterministic code: https://docs.soliditylang.org/en/latest/metadata.html, use "none"
57 | bytecode_hash = "ipfs"
58 | # If this option is enabled, Solc is instructed to generate output (bytecode) only for the required contracts
59 | # this can reduce compile time for `forge test` a bit but is considered experimental at this point.
60 | sparse_mode = false
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/ggsans-italic-400-E988B.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/ggsans-italic-400-E988B.woff2
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/ggsans-italic-500-0777F.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/ggsans-italic-500-0777F.woff2
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/ggsans-italic-600-CB411.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/ggsans-italic-600-CB411.woff2
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/ggsans-italic-700-891AC.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/ggsans-italic-700-891AC.woff2
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/ggsans-italic-800-D36B0.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/ggsans-italic-800-D36B0.woff2
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/ggsans-normal-400-1456D.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/ggsans-normal-400-1456D.woff2
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/ggsans-normal-500-89CE5.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/ggsans-normal-500-89CE5.woff2
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/ggsans-normal-600-C1EA8.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/ggsans-normal-600-C1EA8.woff2
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/ggsans-normal-700-1949A.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/ggsans-normal-700-1949A.woff2
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/ggsans-normal-800-58487.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/ggsans-normal-800-58487.woff2
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/solarized-dark.min-BA98F.css:
--------------------------------------------------------------------------------
1 | .hljs{display:block;overflow-x:auto;padding:.5em;background:#002b36;color:#839496}.hljs-comment,.hljs-quote{color:#586e75}.hljs-keyword,.hljs-selector-tag,.hljs-addition{color:#859900}.hljs-number,.hljs-string,.hljs-meta .hljs-meta-string,.hljs-literal,.hljs-doctag,.hljs-regexp{color:#2aa198}.hljs-title,.hljs-section,.hljs-name,.hljs-selector-id,.hljs-selector-class{color:#268bd2}.hljs-attribute,.hljs-attr,.hljs-variable,.hljs-template-variable,.hljs-class .hljs-title,.hljs-type{color:#b58900}.hljs-symbol,.hljs-bullet,.hljs-subst,.hljs-meta,.hljs-meta .hljs-keyword,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-link{color:#cb4b16}.hljs-built_in,.hljs-deletion{color:#dc322f}.hljs-formula{background:#073642}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:bold}
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/unknown-7F697.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].html_Files/unknown-7F697.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].txt_Files/C4-banner-7C19B.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].txt_Files/C4-banner-7C19B.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].txt_Files/IMG_20220907_205755-5D7EF.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].txt_Files/IMG_20220907_205755-5D7EF.jpg
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].txt_Files/dk-nintendo-1331B.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].txt_Files/dk-nintendo-1331B.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].txt_Files/foundry-0B9FE.toml:
--------------------------------------------------------------------------------
1 | ## defaults for _all_ profiles
2 | [default]
3 | src = 'src'
4 | test = 'test'
5 | out = 'out'
6 | libs = ['lib']
7 | remappings = []
8 | libraries = []
9 | # cache = true
10 | cache_path = 'cache'
11 | force = false
12 | evm_version = 'london'
13 | gas_reports = [
14 | "src/FERC1155.sol:FERC1155",
15 | "src/Vault.sol:Vault",
16 | "src/VaultFactory.sol:VaultFactory",
17 | "src/VaultRegistry.sol:VaultRegistry",
18 | "src/modules/Buyout.sol:Buyout",
19 | "src/modules/Migration.sol:Migration",
20 | "src/modules/protoforms/BaseVault.sol:BaseVault",
21 | "src/references/TransferReference.sol:TransferReference",
22 | "src/targets/Supply.sol:Supply",
23 | "src/targets/Transfer.sol:Transfer",
24 | "src/utils/Metadata.sol:Metadata"
25 | ]
26 | ## Sets the concrete solc version to use, this overrides the `auto_detect_solc` value
27 | # solc_version = '0.8.10'
28 | auto_detect_solc = true
29 | offline = false
30 | optimizer = false
31 | #optimizer_runs = 200
32 | via_ir = false
33 | verbosity = 0
34 | ignored_error_codes = []
35 | fuzz_runs = 256
36 | ffi = false
37 | sender = '0x00a329c0648769a73afac7f9381e08fb43dbea72'
38 | tx_origin = '0x00a329c0648769a73afac7f9381e08fb43dbea72'
39 | initial_balance = '0xffffffffffffffffffffffff'
40 | block_number = 0
41 | # NOTE due to a toml-rs limitation, this value needs to be a string if the desired gas limit exceeds `i64::MAX` (9223372036854775807)
42 | gas_limit = 9223372036854775807
43 | gas_price = 0
44 | block_base_fee_per_gas = 0
45 | block_coinbase = '0x0000000000000000000000000000000000000000'
46 | block_timestamp = 0
47 | block_difficulty = 0
48 | # caches storage retrieved locally for certain chains and endpoints
49 | # can also be restrictied to `chains = ["optimism", "mainnet"]`
50 | # by default all endpoints will be cached, alternative options are "remote" for only caching non localhost endpoints and ""
51 | # to disable storage caching entirely set `no_storage_caching = true`
52 | rpc_storage_caching = { chains = "all", endpoints = "all" }
53 | # this overrides `rpc_storage_caching` entirely
54 | no_storage_caching = false
55 | # use ipfs method to generate the metadata hash, solc's default.
56 | # To not include the metadata hash, to allow for deterministic code: https://docs.soliditylang.org/en/latest/metadata.html, use "none"
57 | bytecode_hash = "ipfs"
58 | # If this option is enabled, Solc is instructed to generate output (bytecode) only for the required contracts
59 | # this can reduce compile time for `forge test` a bit but is considered experimental at this point.
60 | sparse_mode = false
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].txt_Files/unknown-7F697.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2022-07-fractional/a8e24201fba7f18a55c20d0d2c84243e412af635/discord-export/Code4rena - ARCHIVE-Q3-2022 - ☑fractional-jul7 [994261516251562024].txt_Files/unknown-7F697.png
--------------------------------------------------------------------------------
/docs/VaultFactory.md:
--------------------------------------------------------------------------------
1 | # Solidity API
2 |
3 | ## VaultFactory
4 |
5 | Factory contract for deploying fractional vaults
6 |
7 | ### implementation
8 |
9 | ```solidity
10 | address implementation
11 | ```
12 |
13 | Address of Vault proxy contract
14 |
15 | ### nextSeeds
16 |
17 | ```solidity
18 | mapping(address => bytes32) nextSeeds
19 | ```
20 |
21 | _Internal mapping to track the next seed to be used by an EOA_
22 |
23 | ### constructor
24 |
25 | ```solidity
26 | constructor() public
27 | ```
28 |
29 | Initializes implementation contract
30 |
31 | ### deploy
32 |
33 | ```solidity
34 | function deploy() external returns (address payable vault)
35 | ```
36 |
37 | Deploys new vault for sender
38 |
39 | | Name | Type | Description |
40 | | ---- | ---- | ----------- |
41 | | vault | address payable | Address of deployed vault |
42 |
43 | ### getNextAddress
44 |
45 | ```solidity
46 | function getNextAddress(address _deployer) external view returns (address vault)
47 | ```
48 |
49 | Gets pre-computed address of vault deployed by given account
50 |
51 | | Name | Type | Description |
52 | | ---- | ---- | ----------- |
53 | | _deployer | address | Address of vault deployer |
54 |
55 | | Name | Type | Description |
56 | | ---- | ---- | ----------- |
57 | | vault | address | Address of next vault |
58 |
59 | ### getNextSeed
60 |
61 | ```solidity
62 | function getNextSeed(address _deployer) external view returns (bytes32)
63 | ```
64 |
65 | Gets next seed value of given account
66 |
67 | | Name | Type | Description |
68 | | ---- | ---- | ----------- |
69 | | _deployer | address | Address of vault deployer |
70 |
71 | | Name | Type | Description |
72 | | ---- | ---- | ----------- |
73 | | [0] | bytes32 | Value of next seed |
74 |
75 | ### deployFor
76 |
77 | ```solidity
78 | function deployFor(address _owner) public returns (address payable vault)
79 | ```
80 |
81 | Deploys new vault for given address
82 |
83 | | Name | Type | Description |
84 | | ---- | ---- | ----------- |
85 | | _owner | address | Address of vault owner |
86 |
87 | | Name | Type | Description |
88 | | ---- | ---- | ----------- |
89 | | vault | address payable | Address of deployed vault |
90 |
91 |
--------------------------------------------------------------------------------
/docs/constants/Memory.md:
--------------------------------------------------------------------------------
1 | # Solidity API
2 |
3 | ## COST_PER_WORD
4 |
5 | ```solidity
6 | uint256 COST_PER_WORD
7 | ```
8 |
9 | ## ONE_WORD
10 |
11 | ```solidity
12 | uint256 ONE_WORD
13 | ```
14 |
15 | ## ALMOST_ONE_WORD
16 |
17 | ```solidity
18 | uint256 ALMOST_ONE_WORD
19 | ```
20 |
21 | ## TWO_WORDS
22 |
23 | ```solidity
24 | uint256 TWO_WORDS
25 | ```
26 |
27 | ## FREE_MEMORY_POINTER_SLOT
28 |
29 | ```solidity
30 | uint256 FREE_MEMORY_POINTER_SLOT
31 | ```
32 |
33 | ## ZERO_SLOT
34 |
35 | ```solidity
36 | uint256 ZERO_SLOT
37 | ```
38 |
39 | ## DEFAULT_FREE_MEMORY_POINTER_SLOT
40 |
41 | ```solidity
42 | uint256 DEFAULT_FREE_MEMORY_POINTER_SLOT
43 | ```
44 |
45 | ## SLOT0x80
46 |
47 | ```solidity
48 | uint256 SLOT0x80
49 | ```
50 |
51 | ## SLOT0xA0
52 |
53 | ```solidity
54 | uint256 SLOT0xA0
55 | ```
56 |
57 | ## SLOT0xC0
58 |
59 | ```solidity
60 | uint256 SLOT0xC0
61 | ```
62 |
63 | ## EIGHT_BYTES
64 |
65 | ```solidity
66 | uint256 EIGHT_BYTES
67 | ```
68 |
69 | ## EXTRA_GAS_BUFFER
70 |
71 | ```solidity
72 | uint256 EXTRA_GAS_BUFFER
73 | ```
74 |
75 | ## MEMORY_EXPANSION_COEFFICIENT
76 |
77 | ```solidity
78 | uint256 MEMORY_EXPANSION_COEFFICIENT
79 | ```
80 |
81 |
--------------------------------------------------------------------------------
/docs/constants/Permit.md:
--------------------------------------------------------------------------------
1 | # Solidity API
2 |
3 | ## DOMAIN_TYPEHASH
4 |
5 | ```solidity
6 | bytes32 DOMAIN_TYPEHASH
7 | ```
8 |
9 | ## PERMIT_TYPEHASH
10 |
11 | ```solidity
12 | bytes32 PERMIT_TYPEHASH
13 | ```
14 |
15 | ## PERMIT_ALL_TYPEHASH
16 |
17 | ```solidity
18 | bytes32 PERMIT_ALL_TYPEHASH
19 | ```
20 |
21 |
--------------------------------------------------------------------------------
/docs/constants/Supply.md:
--------------------------------------------------------------------------------
1 | # Solidity API
2 |
3 | ## REGISTRY_MINT_SIGNATURE
4 |
5 | ```solidity
6 | uint256 REGISTRY_MINT_SIGNATURE
7 | ```
8 |
9 | ## REGISTRY_MINT_SIG_PTR
10 |
11 | ```solidity
12 | uint256 REGISTRY_MINT_SIG_PTR
13 | ```
14 |
15 | ## REGISTRY_MINT_TO_PRT
16 |
17 | ```solidity
18 | uint256 REGISTRY_MINT_TO_PRT
19 | ```
20 |
21 | ## REGISTRY_MINT_VALUE_PTR
22 |
23 | ```solidity
24 | uint256 REGISTRY_MINT_VALUE_PTR
25 | ```
26 |
27 | ## REGISTRY_MINT_LENGTH
28 |
29 | ```solidity
30 | uint256 REGISTRY_MINT_LENGTH
31 | ```
32 |
33 | ## REGISTRY_BURN_SIGNATURE
34 |
35 | ```solidity
36 | uint256 REGISTRY_BURN_SIGNATURE
37 | ```
38 |
39 | ## REGISTRY_BURN_SIG_PTR
40 |
41 | ```solidity
42 | uint256 REGISTRY_BURN_SIG_PTR
43 | ```
44 |
45 | ## REGISTRY_BURN_FROM_PTR
46 |
47 | ```solidity
48 | uint256 REGISTRY_BURN_FROM_PTR
49 | ```
50 |
51 | ## REGISTRY_BURN_VALUE_PTR
52 |
53 | ```solidity
54 | uint256 REGISTRY_BURN_VALUE_PTR
55 | ```
56 |
57 | ## REGISTRY_BURN_LENGTH
58 |
59 | ```solidity
60 | uint256 REGISTRY_BURN_LENGTH
61 | ```
62 |
63 | ## MINT_ERROR_SIGNATURE
64 |
65 | ```solidity
66 | uint256 MINT_ERROR_SIGNATURE
67 | ```
68 |
69 | ## MINT_ERROR_SIG_PTR
70 |
71 | ```solidity
72 | uint256 MINT_ERROR_SIG_PTR
73 | ```
74 |
75 | ## MINT_ERROR_ACCOUNT_PTR
76 |
77 | ```solidity
78 | uint256 MINT_ERROR_ACCOUNT_PTR
79 | ```
80 |
81 | ## MINT_ERROR_LENGTH
82 |
83 | ```solidity
84 | uint256 MINT_ERROR_LENGTH
85 | ```
86 |
87 | ## BURN_ERROR_SIGNATURE
88 |
89 | ```solidity
90 | uint256 BURN_ERROR_SIGNATURE
91 | ```
92 |
93 | ## BURN_ERROR_SIG_PTR
94 |
95 | ```solidity
96 | uint256 BURN_ERROR_SIG_PTR
97 | ```
98 |
99 | ## BURN_ERROR_ACCOUNT_PTR
100 |
101 | ```solidity
102 | uint256 BURN_ERROR_ACCOUNT_PTR
103 | ```
104 |
105 | ## BURN_ERROR_LENGTH
106 |
107 | ```solidity
108 | uint256 BURN_ERROR_LENGTH
109 | ```
110 |
111 |
--------------------------------------------------------------------------------
/docs/interfaces/IBaseVault.md:
--------------------------------------------------------------------------------
1 | # Solidity API
2 |
3 | ## IBaseVault
4 |
5 | _Interface for BaseVault protoform contract_
6 |
7 | ### ActiveModules
8 |
9 | ```solidity
10 | event ActiveModules(address _vault, address[] _modules)
11 | ```
12 |
13 | _Event log for modules that are enabled on a vault_
14 |
15 | | Name | Type | Description |
16 | | ---- | ---- | ----------- |
17 | | _vault | address | The vault deployed |
18 | | _modules | address[] | The modules being activated on deployed vault |
19 |
20 | ### batchDepositERC20
21 |
22 | ```solidity
23 | function batchDepositERC20(address _from, address _to, address[] _tokens, uint256[] _amounts) external
24 | ```
25 |
26 | ### batchDepositERC721
27 |
28 | ```solidity
29 | function batchDepositERC721(address _from, address _to, address[] _tokens, uint256[] _ids) external
30 | ```
31 |
32 | ### batchDepositERC1155
33 |
34 | ```solidity
35 | function batchDepositERC1155(address _from, address _to, address[] _tokens, uint256[] _ids, uint256[] _amounts, bytes[] _datas) external
36 | ```
37 |
38 | ### deployVault
39 |
40 | ```solidity
41 | function deployVault(uint256 _fractionSupply, address[] _modules, address[] _plugins, bytes4[] _selectors, bytes32[] _mintProof) external returns (address vault)
42 | ```
43 |
44 | ### registry
45 |
46 | ```solidity
47 | function registry() external view returns (address)
48 | ```
49 |
50 |
--------------------------------------------------------------------------------
/docs/interfaces/IERC1155.md:
--------------------------------------------------------------------------------
1 | # Solidity API
2 |
3 | ## IERC1155
4 |
5 | _Interface for ERC-1155 token contract_
6 |
7 | ### ApprovalForAll
8 |
9 | ```solidity
10 | event ApprovalForAll(address _owner, address _operator, bool _approved)
11 | ```
12 |
13 | ### TransferBatch
14 |
15 | ```solidity
16 | event TransferBatch(address _operator, address _from, address _to, uint256[] _ids, uint256[] _amounts)
17 | ```
18 |
19 | ### TransferSingle
20 |
21 | ```solidity
22 | event TransferSingle(address _operator, address _from, address _to, uint256 _id, uint256 _amount)
23 | ```
24 |
25 | ### URI
26 |
27 | ```solidity
28 | event URI(string _value, uint256 _id)
29 | ```
30 |
31 | ### balanceOf
32 |
33 | ```solidity
34 | function balanceOf(address, uint256) external view returns (uint256)
35 | ```
36 |
37 | ### balanceOfBatch
38 |
39 | ```solidity
40 | function balanceOfBatch(address[] _owners, uint256[] ids) external view returns (uint256[] balances)
41 | ```
42 |
43 | ### isApprovedForAll
44 |
45 | ```solidity
46 | function isApprovedForAll(address, address) external view returns (bool)
47 | ```
48 |
49 | ### safeBatchTransferFrom
50 |
51 | ```solidity
52 | function safeBatchTransferFrom(address _from, address _to, uint256[] _ids, uint256[] _amounts, bytes _data) external
53 | ```
54 |
55 | ### safeTransferFrom
56 |
57 | ```solidity
58 | function safeTransferFrom(address _from, address _to, uint256 _id, uint256 _amount, bytes _data) external
59 | ```
60 |
61 | ### setApprovalForAll
62 |
63 | ```solidity
64 | function setApprovalForAll(address _operator, bool _approved) external
65 | ```
66 |
67 | ### supportsInterface
68 |
69 | ```solidity
70 | function supportsInterface(bytes4 _interfaceId) external view returns (bool)
71 | ```
72 |
73 | ### uri
74 |
75 | ```solidity
76 | function uri(uint256 _id) external view returns (string)
77 | ```
78 |
79 |
--------------------------------------------------------------------------------
/docs/interfaces/IERC20.md:
--------------------------------------------------------------------------------
1 | # Solidity API
2 |
3 | ## IERC20
4 |
5 | _Interface for ERC-20 token contract_
6 |
7 | ### Approval
8 |
9 | ```solidity
10 | event Approval(address _owner, address _spender, uint256 _amount)
11 | ```
12 |
13 | ### Transfer
14 |
15 | ```solidity
16 | event Transfer(address _from, address _to, uint256 amount)
17 | ```
18 |
19 | ### DOMAIN_SEPARATOR
20 |
21 | ```solidity
22 | function DOMAIN_SEPARATOR() external view returns (bytes32)
23 | ```
24 |
25 | ### allowance
26 |
27 | ```solidity
28 | function allowance(address, address) external view returns (uint256)
29 | ```
30 |
31 | ### approve
32 |
33 | ```solidity
34 | function approve(address _spender, uint256 _amount) external returns (bool)
35 | ```
36 |
37 | ### balanceOf
38 |
39 | ```solidity
40 | function balanceOf(address) external view returns (uint256)
41 | ```
42 |
43 | ### decimals
44 |
45 | ```solidity
46 | function decimals() external view returns (uint8)
47 | ```
48 |
49 | ### name
50 |
51 | ```solidity
52 | function name() external view returns (string)
53 | ```
54 |
55 | ### nonces
56 |
57 | ```solidity
58 | function nonces(address) external view returns (uint256)
59 | ```
60 |
61 | ### permit
62 |
63 | ```solidity
64 | function permit(address _owner, address _spender, uint256 _value, uint256 _deadline, uint8 _v, bytes32 _r, bytes32 _s) external
65 | ```
66 |
67 | ### symbol
68 |
69 | ```solidity
70 | function symbol() external view returns (string)
71 | ```
72 |
73 | ### totalSupply
74 |
75 | ```solidity
76 | function totalSupply() external view returns (uint256)
77 | ```
78 |
79 | ### transfer
80 |
81 | ```solidity
82 | function transfer(address _to, uint256 _amount) external returns (bool)
83 | ```
84 |
85 | ### transferFrom
86 |
87 | ```solidity
88 | function transferFrom(address _from, address _to, uint256 _amount) external returns (bool)
89 | ```
90 |
91 |
--------------------------------------------------------------------------------
/docs/interfaces/IERC721.md:
--------------------------------------------------------------------------------
1 | # Solidity API
2 |
3 | ## IERC721
4 |
5 | _Interface for ERC-721 token contract_
6 |
7 | ### Approval
8 |
9 | ```solidity
10 | event Approval(address _owner, address _spender, uint256 _id)
11 | ```
12 |
13 | ### ApprovalForAll
14 |
15 | ```solidity
16 | event ApprovalForAll(address _owner, address _operator, bool _approved)
17 | ```
18 |
19 | ### Transfer
20 |
21 | ```solidity
22 | event Transfer(address _from, address _to, uint256 _id)
23 | ```
24 |
25 | ### approve
26 |
27 | ```solidity
28 | function approve(address _spender, uint256 _id) external
29 | ```
30 |
31 | ### balanceOf
32 |
33 | ```solidity
34 | function balanceOf(address _owner) external view returns (uint256)
35 | ```
36 |
37 | ### getApproved
38 |
39 | ```solidity
40 | function getApproved(uint256) external view returns (address)
41 | ```
42 |
43 | ### isApprovedForAll
44 |
45 | ```solidity
46 | function isApprovedForAll(address, address) external view returns (bool)
47 | ```
48 |
49 | ### name
50 |
51 | ```solidity
52 | function name() external view returns (string)
53 | ```
54 |
55 | ### ownerOf
56 |
57 | ```solidity
58 | function ownerOf(uint256 _id) external view returns (address owner)
59 | ```
60 |
61 | ### safeTransferFrom
62 |
63 | ```solidity
64 | function safeTransferFrom(address _from, address _to, uint256 _id) external
65 | ```
66 |
67 | ### safeTransferFrom
68 |
69 | ```solidity
70 | function safeTransferFrom(address _from, address _to, uint256 _id, bytes _data) external
71 | ```
72 |
73 | ### setApprovalForAll
74 |
75 | ```solidity
76 | function setApprovalForAll(address _operator, bool _approved) external
77 | ```
78 |
79 | ### supportsInterface
80 |
81 | ```solidity
82 | function supportsInterface(bytes4 _interfaceId) external view returns (bool)
83 | ```
84 |
85 | ### symbol
86 |
87 | ```solidity
88 | function symbol() external view returns (string)
89 | ```
90 |
91 | ### tokenURI
92 |
93 | ```solidity
94 | function tokenURI(uint256 _id) external view returns (string)
95 | ```
96 |
97 | ### transferFrom
98 |
99 | ```solidity
100 | function transferFrom(address _from, address _to, uint256 _id) external
101 | ```
102 |
103 |
--------------------------------------------------------------------------------
/docs/interfaces/IMinter.md:
--------------------------------------------------------------------------------
1 | # Solidity API
2 |
3 | ## IMinter
4 |
5 | _Interface for Minter module contract_
6 |
7 | ### supply
8 |
9 | ```solidity
10 | function supply() external view returns (address)
11 | ```
12 |
13 |
--------------------------------------------------------------------------------
/docs/interfaces/IModule.md:
--------------------------------------------------------------------------------
1 | # Solidity API
2 |
3 | ## IModule
4 |
5 | _Interface for generic Module contract_
6 |
7 | ### getLeafNodes
8 |
9 | ```solidity
10 | function getLeafNodes() external view returns (bytes32[] nodes)
11 | ```
12 |
13 | ### getPermissions
14 |
15 | ```solidity
16 | function getPermissions() external view returns (struct Permission[] permissions)
17 | ```
18 |
19 |
--------------------------------------------------------------------------------
/docs/interfaces/INFTReceiver.md:
--------------------------------------------------------------------------------
1 | # Solidity API
2 |
3 | ## INFTReceiver
4 |
5 | _Interface for NFT Receiver contract_
6 |
7 | ### onERC721Received
8 |
9 | ```solidity
10 | function onERC721Received(address, address, uint256, bytes) external returns (bytes4)
11 | ```
12 |
13 | ### onERC1155Received
14 |
15 | ```solidity
16 | function onERC1155Received(address, address, uint256, uint256, bytes) external returns (bytes4)
17 | ```
18 |
19 | ### onERC1155BatchReceived
20 |
21 | ```solidity
22 | function onERC1155BatchReceived(address, address, uint256[], uint256[], bytes) external returns (bytes4)
23 | ```
24 |
25 |
--------------------------------------------------------------------------------
/docs/interfaces/IProtoform.md:
--------------------------------------------------------------------------------
1 | # Solidity API
2 |
3 | ## IProtoform
4 |
5 | _Interface for generic Protoform contract_
6 |
7 | ### deployVault
8 |
9 | ```solidity
10 | function deployVault(uint256 _fAmount, address[] _modules, address[] _plugins, bytes4[] _selectors, bytes32[] _proof) external returns (address vault)
11 | ```
12 |
13 | ### generateMerkleTree
14 |
15 | ```solidity
16 | function generateMerkleTree(address[] _modules) external view returns (bytes32[] hashes)
17 | ```
18 |
19 |
--------------------------------------------------------------------------------
/docs/interfaces/ISupply.md:
--------------------------------------------------------------------------------
1 | # Solidity API
2 |
3 | ## ISupply
4 |
5 | _Interface for Supply target contract_
6 |
7 | ### MintError
8 |
9 | ```solidity
10 | error MintError(address _account)
11 | ```
12 |
13 | _Emitted when an account being called as an assumed contract does not have code and returns no data_
14 |
15 | ### BurnError
16 |
17 | ```solidity
18 | error BurnError(address _account)
19 | ```
20 |
21 | _Emitted when an account being called as an assumed contract does not have code and returns no data_
22 |
23 | ### mint
24 |
25 | ```solidity
26 | function mint(address _to, uint256 _value) external
27 | ```
28 |
29 | ### burn
30 |
31 | ```solidity
32 | function burn(address _from, uint256 _value) external
33 | ```
34 |
35 |
--------------------------------------------------------------------------------
/docs/interfaces/IVaultFactory.md:
--------------------------------------------------------------------------------
1 | # Solidity API
2 |
3 | ## IVaultFactory
4 |
5 | _Interface for VaultFactory contract_
6 |
7 | ### DeployVault
8 |
9 | ```solidity
10 | event DeployVault(address _origin, address _deployer, address _owner, bytes32 _seed, bytes32 _salt, address _vault)
11 | ```
12 |
13 | _Event log for deploying vault_
14 |
15 | | Name | Type | Description |
16 | | ---- | ---- | ----------- |
17 | | _origin | address | Address of transaction origin |
18 | | _deployer | address | Address of sender |
19 | | _owner | address | Address of vault owner |
20 | | _seed | bytes32 | Value of seed |
21 | | _salt | bytes32 | Value of salt |
22 | | _vault | address | Address of deployed vault |
23 |
24 | ### deploy
25 |
26 | ```solidity
27 | function deploy() external returns (address payable vault)
28 | ```
29 |
30 | ### deployFor
31 |
32 | ```solidity
33 | function deployFor(address _owner) external returns (address payable vault)
34 | ```
35 |
36 | ### getNextAddress
37 |
38 | ```solidity
39 | function getNextAddress(address _deployer) external view returns (address vault)
40 | ```
41 |
42 | ### getNextSeed
43 |
44 | ```solidity
45 | function getNextSeed(address _deployer) external view returns (bytes32)
46 | ```
47 |
48 | ### implementation
49 |
50 | ```solidity
51 | function implementation() external view returns (address)
52 | ```
53 |
54 |
--------------------------------------------------------------------------------
/docs/interfaces/IVaultRegistry.md:
--------------------------------------------------------------------------------
1 | # Solidity API
2 |
3 | ## Permission
4 |
5 | ```solidity
6 | struct Permission {
7 | address module;
8 | address target;
9 | bytes4 selector;
10 | }
11 | ```
12 |
13 | ## VaultInfo
14 |
15 | ```solidity
16 | struct VaultInfo {
17 | address token;
18 | uint256 id;
19 | }
20 | ```
21 |
22 | ## IVaultRegistry
23 |
24 | _Interface for VaultRegistry contract_
25 |
26 | ### InvalidController
27 |
28 | ```solidity
29 | error InvalidController(address _controller, address _sender)
30 | ```
31 |
32 | _Emitted when the caller is not the controller_
33 |
34 | ### UnregisteredVault
35 |
36 | ```solidity
37 | error UnregisteredVault(address _sender)
38 | ```
39 |
40 | _Emitted when the caller is not a registered vault_
41 |
42 | ### VaultDeployed
43 |
44 | ```solidity
45 | event VaultDeployed(address _vault, address _token, uint256 _id)
46 | ```
47 |
48 | _Event log for deploying vault_
49 |
50 | | Name | Type | Description |
51 | | ---- | ---- | ----------- |
52 | | _vault | address | Address of the vault |
53 | | _token | address | Address of the token |
54 | | _id | uint256 | Id of the token |
55 |
56 | ### burn
57 |
58 | ```solidity
59 | function burn(address _from, uint256 _value) external
60 | ```
61 |
62 | ### create
63 |
64 | ```solidity
65 | function create(bytes32 _merkleRoot, address[] _plugins, bytes4[] _selectors) external returns (address vault)
66 | ```
67 |
68 | ### createCollection
69 |
70 | ```solidity
71 | function createCollection(bytes32 _merkleRoot, address[] _plugins, bytes4[] _selectors) external returns (address vault, address token)
72 | ```
73 |
74 | ### createCollectionFor
75 |
76 | ```solidity
77 | function createCollectionFor(bytes32 _merkleRoot, address _controller, address[] _plugins, bytes4[] _selectors) external returns (address vault, address token)
78 | ```
79 |
80 | ### createFor
81 |
82 | ```solidity
83 | function createFor(bytes32 _merkleRoot, address _owner, address[] _plugins, bytes4[] _selectors) external returns (address vault)
84 | ```
85 |
86 | ### createInCollection
87 |
88 | ```solidity
89 | function createInCollection(bytes32 _merkleRoot, address _token, address[] _plugins, bytes4[] _selectors) external returns (address vault)
90 | ```
91 |
92 | ### factory
93 |
94 | ```solidity
95 | function factory() external view returns (address)
96 | ```
97 |
98 | ### fNFT
99 |
100 | ```solidity
101 | function fNFT() external view returns (address)
102 | ```
103 |
104 | ### fNFTImplementation
105 |
106 | ```solidity
107 | function fNFTImplementation() external view returns (address)
108 | ```
109 |
110 | ### mint
111 |
112 | ```solidity
113 | function mint(address _to, uint256 _value) external
114 | ```
115 |
116 | ### nextId
117 |
118 | ```solidity
119 | function nextId(address) external view returns (uint256)
120 | ```
121 |
122 | ### totalSupply
123 |
124 | ```solidity
125 | function totalSupply(address _vault) external view returns (uint256)
126 | ```
127 |
128 | ### uri
129 |
130 | ```solidity
131 | function uri(address _vault) external view returns (string)
132 | ```
133 |
134 | ### vaultToToken
135 |
136 | ```solidity
137 | function vaultToToken(address) external view returns (address token, uint256 id)
138 | ```
139 |
140 |
--------------------------------------------------------------------------------
/docs/mocks/MockERC1155.md:
--------------------------------------------------------------------------------
1 | # Solidity API
2 |
3 | ## MockERC1155
4 |
5 | ### uri
6 |
7 | ```solidity
8 | function uri(uint256) public pure virtual returns (string)
9 | ```
10 |
11 | ### mint
12 |
13 | ```solidity
14 | function mint(address to, uint256 id, uint256 amount, bytes data) public virtual
15 | ```
16 |
17 | ### batchMint
18 |
19 | ```solidity
20 | function batchMint(address to, uint256[] ids, uint256[] amounts, bytes data) public virtual
21 | ```
22 |
23 | ### burn
24 |
25 | ```solidity
26 | function burn(address from, uint256 id, uint256 amount) public virtual
27 | ```
28 |
29 | ### batchBurn
30 |
31 | ```solidity
32 | function batchBurn(address from, uint256[] ids, uint256[] amounts) public virtual
33 | ```
34 |
35 |
--------------------------------------------------------------------------------
/docs/mocks/MockERC20.md:
--------------------------------------------------------------------------------
1 | # Solidity API
2 |
3 | ## MockERC20
4 |
5 | ### constructor
6 |
7 | ```solidity
8 | constructor() public
9 | ```
10 |
11 | ### mint
12 |
13 | ```solidity
14 | function mint(address to, uint256 amount) public virtual
15 | ```
16 |
17 | ### burn
18 |
19 | ```solidity
20 | function burn(address from, uint256 amount) public virtual
21 | ```
22 |
23 |
--------------------------------------------------------------------------------
/docs/mocks/MockERC721.md:
--------------------------------------------------------------------------------
1 | # Solidity API
2 |
3 | ## MockERC721
4 |
5 | ### constructor
6 |
7 | ```solidity
8 | constructor() public
9 | ```
10 |
11 | ### tokenURI
12 |
13 | ```solidity
14 | function tokenURI(uint256) public pure virtual returns (string)
15 | ```
16 |
17 | ### mint
18 |
19 | ```solidity
20 | function mint(address to, uint256 tokenId) public virtual
21 | ```
22 |
23 | ### burn
24 |
25 | ```solidity
26 | function burn(uint256 tokenId) public virtual
27 | ```
28 |
29 | ### safeMint
30 |
31 | ```solidity
32 | function safeMint(address to, uint256 tokenId) public virtual
33 | ```
34 |
35 | ### safeMint
36 |
37 | ```solidity
38 | function safeMint(address to, uint256 tokenId, bytes data) public virtual
39 | ```
40 |
41 |
--------------------------------------------------------------------------------
/docs/mocks/MockEthReceiver.md:
--------------------------------------------------------------------------------
1 | # Solidity API
2 |
3 | ## MockEthReceiver
4 |
5 | ### receive
6 |
7 | ```solidity
8 | receive() external payable
9 | ```
10 |
11 | ## MockEthNotReceiver
12 |
13 | ### receive
14 |
15 | ```solidity
16 | receive() external payable
17 | ```
18 |
19 |
--------------------------------------------------------------------------------
/docs/mocks/MockModule.md:
--------------------------------------------------------------------------------
1 | # Solidity API
2 |
3 | ## MockModule
4 |
5 | ### getPermissions
6 |
7 | ```solidity
8 | function getPermissions() external pure returns (struct Permission[] permissions)
9 | ```
10 |
11 | ### getLeafNodes
12 |
13 | ```solidity
14 | function getLeafNodes() external pure returns (bytes32[] nodes)
15 | ```
16 |
17 |
--------------------------------------------------------------------------------
/docs/mocks/MockPermitter.md:
--------------------------------------------------------------------------------
1 | # Solidity API
2 |
3 | ## MockPermitter
4 |
5 |
--------------------------------------------------------------------------------
/docs/mocks/MockSender.md:
--------------------------------------------------------------------------------
1 | # Solidity API
2 |
3 | ## MockSender
4 |
5 | ### sendEthOrWeth
6 |
7 | ```solidity
8 | function sendEthOrWeth(address to, uint256 value) external
9 | ```
10 |
11 | ### receive
12 |
13 | ```solidity
14 | receive() external payable
15 | ```
16 |
17 |
--------------------------------------------------------------------------------
/docs/modules/Minter.md:
--------------------------------------------------------------------------------
1 | # Solidity API
2 |
3 | ## Minter
4 |
5 | Module contract for minting a fixed supply of fractions
6 |
7 | ### supply
8 |
9 | ```solidity
10 | address supply
11 | ```
12 |
13 | Address of Supply target contract
14 |
15 | ### constructor
16 |
17 | ```solidity
18 | constructor(address _supply) public
19 | ```
20 |
21 | Initializes supply target contract
22 |
23 | ### getLeafNodes
24 |
25 | ```solidity
26 | function getLeafNodes() external view returns (bytes32[] nodes)
27 | ```
28 |
29 | Gets the list of leaf nodes used to generate a merkle tree
30 |
31 | _Leaf nodes are hashed permissions of the merkle tree_
32 |
33 | | Name | Type | Description |
34 | | ---- | ---- | ----------- |
35 | | nodes | bytes32[] | A list of leaf nodes |
36 |
37 | ### getPermissions
38 |
39 | ```solidity
40 | function getPermissions() public view returns (struct Permission[] permissions)
41 | ```
42 |
43 | Gets the list of permissions installed on a vault
44 |
45 | _Permissions consist of a module contract, target contract, and function selector_
46 |
47 | | Name | Type | Description |
48 | | ---- | ---- | ----------- |
49 | | permissions | struct Permission[] | A list of Permission Structs |
50 |
51 | ### _mintFractions
52 |
53 | ```solidity
54 | function _mintFractions(address _vault, address _to, uint256 _fractionSupply, bytes32[] _mintProof) internal
55 | ```
56 |
57 | Mints a fraction supply
58 |
59 | | Name | Type | Description |
60 | | ---- | ---- | ----------- |
61 | | _vault | address | Address of the Vault |
62 | | _to | address | Address of the receiver of fractions |
63 | | _fractionSupply | uint256 | Number of NFT Fractions minted to control the vault |
64 | | _mintProof | bytes32[] | List of proofs to execute a mint function |
65 |
66 |
--------------------------------------------------------------------------------
/docs/modules/protoforms/BaseVault.md:
--------------------------------------------------------------------------------
1 | # Solidity API
2 |
3 | ## BaseVault
4 |
5 | Protoform contract for vault deployments with a fixed supply and buyout mechanism
6 |
7 | ### registry
8 |
9 | ```solidity
10 | address registry
11 | ```
12 |
13 | Address of VaultRegistry contract
14 |
15 | ### constructor
16 |
17 | ```solidity
18 | constructor(address _registry, address _supply) public
19 | ```
20 |
21 | Initializes registry and supply contracts
22 |
23 | | Name | Type | Description |
24 | | ---- | ---- | ----------- |
25 | | _registry | address | Address of the VaultRegistry contract |
26 | | _supply | address | Address of the Supply target contract |
27 |
28 | ### deployVault
29 |
30 | ```solidity
31 | function deployVault(uint256 _fractionSupply, address[] _modules, address[] _plugins, bytes4[] _selectors, bytes32[] _mintProof) external returns (address vault)
32 | ```
33 |
34 | Deploys a new Vault and mints initial supply of fractions
35 |
36 | | Name | Type | Description |
37 | | ---- | ---- | ----------- |
38 | | _fractionSupply | uint256 | Number of NFT Fractions minted to control the vault |
39 | | _modules | address[] | The list of modules to be installed on the vault |
40 | | _plugins | address[] | Addresses of plugin contracts |
41 | | _selectors | bytes4[] | List of function selectors |
42 | | _mintProof | bytes32[] | List of proofs to execute a mint function |
43 |
44 | ### batchDepositERC20
45 |
46 | ```solidity
47 | function batchDepositERC20(address _from, address _to, address[] _tokens, uint256[] _amounts) external
48 | ```
49 |
50 | Transfers ERC-20 tokens
51 |
52 | | Name | Type | Description |
53 | | ---- | ---- | ----------- |
54 | | _from | address | Source address |
55 | | _to | address | Target address |
56 | | _tokens | address[] | |
57 | | _amounts | uint256[] | |
58 |
59 | ### batchDepositERC721
60 |
61 | ```solidity
62 | function batchDepositERC721(address _from, address _to, address[] _tokens, uint256[] _ids) external
63 | ```
64 |
65 | Transfers ERC-721 tokens
66 |
67 | | Name | Type | Description |
68 | | ---- | ---- | ----------- |
69 | | _from | address | Source address |
70 | | _to | address | Target address |
71 | | _tokens | address[] | |
72 | | _ids | uint256[] | |
73 |
74 | ### batchDepositERC1155
75 |
76 | ```solidity
77 | function batchDepositERC1155(address _from, address _to, address[] _tokens, uint256[] _ids, uint256[] _amounts, bytes[] _datas) external
78 | ```
79 |
80 | Transfers ERC-1155 tokens
81 |
82 | | Name | Type | Description |
83 | | ---- | ---- | ----------- |
84 | | _from | address | Source address |
85 | | _to | address | Target address |
86 | | _tokens | address[] | |
87 | | _ids | uint256[] | |
88 | | _amounts | uint256[] | |
89 | | _datas | bytes[] | |
90 |
91 | ### generateMerkleTree
92 |
93 | ```solidity
94 | function generateMerkleTree(address[] _modules) public view returns (bytes32[] hashes)
95 | ```
96 |
97 | Generates a merkle tree from the hashed permission lists of the given modules
98 |
99 | | Name | Type | Description |
100 | | ---- | ---- | ----------- |
101 | | _modules | address[] | List of module contracts |
102 |
103 | | Name | Type | Description |
104 | | ---- | ---- | ----------- |
105 | | hashes | bytes32[] | A combined list of leaf nodes |
106 |
107 |
--------------------------------------------------------------------------------
/docs/references/SupplyReference.md:
--------------------------------------------------------------------------------
1 | # Solidity API
2 |
3 | ## SupplyReference
4 |
5 | Reference implementation for the optimized Supply target contract
6 |
7 | ### registry
8 |
9 | ```solidity
10 | address registry
11 | ```
12 |
13 | Address of VaultRegistry contract
14 |
15 | ### constructor
16 |
17 | ```solidity
18 | constructor(address _registry) public
19 | ```
20 |
21 | Initializes address of registry contract
22 |
23 | ### mint
24 |
25 | ```solidity
26 | function mint(address _to, uint256 _value) external
27 | ```
28 |
29 | Mints fractional tokens
30 |
31 | | Name | Type | Description |
32 | | ---- | ---- | ----------- |
33 | | _to | address | Target address |
34 | | _value | uint256 | Transfer amount |
35 |
36 | ### burn
37 |
38 | ```solidity
39 | function burn(address _from, uint256 _value) external
40 | ```
41 |
42 | Burns fractional tokens
43 |
44 | | Name | Type | Description |
45 | | ---- | ---- | ----------- |
46 | | _from | address | Source address |
47 | | _value | uint256 | Burn amount |
48 |
49 |
--------------------------------------------------------------------------------
/docs/references/TransferReference.md:
--------------------------------------------------------------------------------
1 | # Solidity API
2 |
3 | ## TransferReference
4 |
5 | Reference implementation for the optimized Transfer target contract
6 |
7 | ### ERC20Transfer
8 |
9 | ```solidity
10 | function ERC20Transfer(address _token, address _to, uint256 _value) external
11 | ```
12 |
13 | Transfers an ERC-20 token
14 |
15 | | Name | Type | Description |
16 | | ---- | ---- | ----------- |
17 | | _token | address | Address of the token |
18 | | _to | address | Target address |
19 | | _value | uint256 | Transfer amount |
20 |
21 | ### ERC721TransferFrom
22 |
23 | ```solidity
24 | function ERC721TransferFrom(address _token, address _from, address _to, uint256 _tokenId) external
25 | ```
26 |
27 | Transfers an ERC-721 token
28 |
29 | | Name | Type | Description |
30 | | ---- | ---- | ----------- |
31 | | _token | address | Address of the token |
32 | | _from | address | Source address |
33 | | _to | address | Target address |
34 | | _tokenId | uint256 | ID of the token |
35 |
36 | ### ERC1155TransferFrom
37 |
38 | ```solidity
39 | function ERC1155TransferFrom(address _token, address _from, address _to, uint256 _id, uint256 _value) external
40 | ```
41 |
42 | Transfers an ERC-1155 token
43 |
44 | | Name | Type | Description |
45 | | ---- | ---- | ----------- |
46 | | _token | address | Address of the token |
47 | | _from | address | Source address |
48 | | _to | address | Target address |
49 | | _id | uint256 | ID of the token type |
50 | | _value | uint256 | Transfer amount |
51 |
52 | ### ERC1155BatchTransferFrom
53 |
54 | ```solidity
55 | function ERC1155BatchTransferFrom(address _token, address _from, address _to, uint256[] _ids, uint256[] _values) external
56 | ```
57 |
58 | Batch transfers multiple ERC-1155 tokens
59 |
60 | | Name | Type | Description |
61 | | ---- | ---- | ----------- |
62 | | _token | address | Address of the token |
63 | | _from | address | Source address |
64 | | _to | address | Target address |
65 | | _ids | uint256[] | IDs of each token type |
66 | | _values | uint256[] | Transfer amounts per token type |
67 |
68 |
--------------------------------------------------------------------------------
/docs/targets/Supply.md:
--------------------------------------------------------------------------------
1 | # Solidity API
2 |
3 | ## Supply
4 |
5 | Target contract for minting and burning fractional tokens
6 |
7 | ### registry
8 |
9 | ```solidity
10 | address registry
11 | ```
12 |
13 | Address of VaultRegistry contract
14 |
15 | ### constructor
16 |
17 | ```solidity
18 | constructor(address _registry) public
19 | ```
20 |
21 | Initializes registry contract
22 |
23 | ### mint
24 |
25 | ```solidity
26 | function mint(address _to, uint256 _value) external
27 | ```
28 |
29 | Mints fractional tokens
30 |
31 | | Name | Type | Description |
32 | | ---- | ---- | ----------- |
33 | | _to | address | Target address |
34 | | _value | uint256 | Transfer amount |
35 |
36 | ### burn
37 |
38 | ```solidity
39 | function burn(address _from, uint256 _value) external
40 | ```
41 |
42 | Burns fractional tokens
43 |
44 | | Name | Type | Description |
45 | | ---- | ---- | ----------- |
46 | | _from | address | Source address |
47 | | _value | uint256 | Burn amount |
48 |
49 |
--------------------------------------------------------------------------------
/docs/targets/Transfer.md:
--------------------------------------------------------------------------------
1 | # Solidity API
2 |
3 | ## Transfer
4 |
5 | Target contract for transferring fungible and non-fungible tokens
6 |
7 | ### ERC20Transfer
8 |
9 | ```solidity
10 | function ERC20Transfer(address _token, address _to, uint256 _amount) external
11 | ```
12 |
13 | Transfers an ERC-20 token
14 |
15 | | Name | Type | Description |
16 | | ---- | ---- | ----------- |
17 | | _token | address | Address of the token |
18 | | _to | address | Target address |
19 | | _amount | uint256 | Transfer amount |
20 |
21 | ### ERC721TransferFrom
22 |
23 | ```solidity
24 | function ERC721TransferFrom(address _token, address _from, address _to, uint256 _tokenId) external
25 | ```
26 |
27 | Transfers an ERC-721 token
28 |
29 | | Name | Type | Description |
30 | | ---- | ---- | ----------- |
31 | | _token | address | Address of the token |
32 | | _from | address | Source address |
33 | | _to | address | Target address |
34 | | _tokenId | uint256 | ID of the token |
35 |
36 | ### ERC1155TransferFrom
37 |
38 | ```solidity
39 | function ERC1155TransferFrom(address _token, address _from, address _to, uint256 _tokenId, uint256 _amount) external
40 | ```
41 |
42 | Transfers an ERC-1155 token
43 |
44 | | Name | Type | Description |
45 | | ---- | ---- | ----------- |
46 | | _token | address | token to transfer |
47 | | _from | address | Source address |
48 | | _to | address | Target address |
49 | | _tokenId | uint256 | ID of the token type |
50 | | _amount | uint256 | Transfer amount |
51 |
52 | ### ERC1155BatchTransferFrom
53 |
54 | ```solidity
55 | function ERC1155BatchTransferFrom(address, address, address, uint256[], uint256[]) external
56 | ```
57 |
58 | Batch transfers multiple ERC-1155 tokens
59 |
60 |
--------------------------------------------------------------------------------
/docs/utils/MerkleBase.md:
--------------------------------------------------------------------------------
1 | # Solidity API
2 |
3 | ## MerkleBase
4 |
5 | Utility contract for generating merkle roots and verifying proofs
6 |
7 | ### constructor
8 |
9 | ```solidity
10 | constructor() internal
11 | ```
12 |
13 | ### hashLeafPairs
14 |
15 | ```solidity
16 | function hashLeafPairs(bytes32 _left, bytes32 _right) public pure returns (bytes32 data)
17 | ```
18 |
19 | Hashes two leaf pairs
20 |
21 | | Name | Type | Description |
22 | | ---- | ---- | ----------- |
23 | | _left | bytes32 | Node on left side of tree level |
24 | | _right | bytes32 | Node on right side of tree level |
25 |
26 | | Name | Type | Description |
27 | | ---- | ---- | ----------- |
28 | | data | bytes32 | Result hash of node params |
29 |
30 | ### verifyProof
31 |
32 | ```solidity
33 | function verifyProof(bytes32 _root, bytes32[] _proof, bytes32 _valueToProve) public pure returns (bool)
34 | ```
35 |
36 | Verifies the merkle proof of a given value
37 |
38 | | Name | Type | Description |
39 | | ---- | ---- | ----------- |
40 | | _root | bytes32 | Hash of merkle root |
41 | | _proof | bytes32[] | Merkle proof |
42 | | _valueToProve | bytes32 | Leaf node being proven |
43 |
44 | | Name | Type | Description |
45 | | ---- | ---- | ----------- |
46 | | [0] | bool | Status of proof verification |
47 |
48 | ### getRoot
49 |
50 | ```solidity
51 | function getRoot(bytes32[] _data) public pure returns (bytes32)
52 | ```
53 |
54 | Generates the merkle root of a tree
55 |
56 | | Name | Type | Description |
57 | | ---- | ---- | ----------- |
58 | | _data | bytes32[] | Leaf nodes of the merkle tree |
59 |
60 | | Name | Type | Description |
61 | | ---- | ---- | ----------- |
62 | | [0] | bytes32 | Hash of merkle root |
63 |
64 | ### getProof
65 |
66 | ```solidity
67 | function getProof(bytes32[] _data, uint256 _node) public pure returns (bytes32[])
68 | ```
69 |
70 | Generates the merkle proof for a leaf node in a given tree
71 |
72 | | Name | Type | Description |
73 | | ---- | ---- | ----------- |
74 | | _data | bytes32[] | Leaf nodes of the merkle tree |
75 | | _node | uint256 | Index of the node in the tree |
76 |
77 | | Name | Type | Description |
78 | | ---- | ---- | ----------- |
79 | | [0] | bytes32[] | Merkle proof |
80 |
81 | ### hashLevel
82 |
83 | ```solidity
84 | function hashLevel(bytes32[] _data) private pure returns (bytes32[] result)
85 | ```
86 |
87 | _Hashes nodes at the given tree level_
88 |
89 | | Name | Type | Description |
90 | | ---- | ---- | ----------- |
91 | | _data | bytes32[] | Nodes at the current level |
92 |
93 | | Name | Type | Description |
94 | | ---- | ---- | ----------- |
95 | | result | bytes32[] | Hashes of nodes at the next level |
96 |
97 | ### log2ceil_naive
98 |
99 | ```solidity
100 | function log2ceil_naive(uint256 x) public pure returns (uint256 ceil)
101 | ```
102 |
103 | Calculates proof size based on size of tree
104 |
105 | _Note that x is assumed > 0 and proof size is not precise_
106 |
107 | | Name | Type | Description |
108 | | ---- | ---- | ----------- |
109 | | x | uint256 | Size of the merkle tree |
110 |
111 | | Name | Type | Description |
112 | | ---- | ---- | ----------- |
113 | | ceil | uint256 | Rounded value of proof size |
114 |
115 |
--------------------------------------------------------------------------------
/docs/utils/Metadata.md:
--------------------------------------------------------------------------------
1 | # Solidity API
2 |
3 | ## Metadata
4 |
5 | Utility contract for storing metadata of an FERC1155 token
6 |
7 | ### token
8 |
9 | ```solidity
10 | address token
11 | ```
12 |
13 | Address of FERC1155 token contract
14 |
15 | ### tokenMetadata
16 |
17 | ```solidity
18 | mapping(uint256 => string) tokenMetadata
19 | ```
20 |
21 | _Mapping of ID type to URI of metadata_
22 |
23 | ### constructor
24 |
25 | ```solidity
26 | constructor(address _token) public
27 | ```
28 |
29 | Initializes token contract
30 |
31 | ### setURI
32 |
33 | ```solidity
34 | function setURI(uint256 _id, string _uri) external
35 | ```
36 |
37 | Sets the metadata of a given token ID type
38 |
39 | _Can only be set by the token controller_
40 |
41 | | Name | Type | Description |
42 | | ---- | ---- | ----------- |
43 | | _id | uint256 | ID of the token type |
44 | | _uri | string | URI of the token metadata |
45 |
46 | ### uri
47 |
48 | ```solidity
49 | function uri(uint256 _id) public view returns (string)
50 | ```
51 |
52 | Gets the metadata of a token ID type
53 |
54 | | Name | Type | Description |
55 | | ---- | ---- | ----------- |
56 | | _id | uint256 | ID of the token type |
57 |
58 | | Name | Type | Description |
59 | | ---- | ---- | ----------- |
60 | | [0] | string | URI of the token metadata |
61 |
62 |
--------------------------------------------------------------------------------
/docs/utils/Multicall.md:
--------------------------------------------------------------------------------
1 | # Solidity API
2 |
3 | ## Multicall
4 |
5 | Utility contract that enables calling multiple local methods in a single call
6 |
7 | ### multicall
8 |
9 | ```solidity
10 | function multicall(bytes[] _data) external returns (bytes[] results)
11 | ```
12 |
13 | Allows multiple function calls within a contract that inherits from it
14 |
15 | | Name | Type | Description |
16 | | ---- | ---- | ----------- |
17 | | _data | bytes[] | List of encoded function calls to make in this contract |
18 |
19 | | Name | Type | Description |
20 | | ---- | ---- | ----------- |
21 | | results | bytes[] | List of return responses for each encoded call passed |
22 |
23 | ### _revertedWithReason
24 |
25 | ```solidity
26 | function _revertedWithReason(bytes _response) internal pure
27 | ```
28 |
29 | Handles function for revert responses
30 |
31 | | Name | Type | Description |
32 | | ---- | ---- | ----------- |
33 | | _response | bytes | Reverted return response from a delegate call |
34 |
35 |
--------------------------------------------------------------------------------
/docs/utils/NFTReceiver.md:
--------------------------------------------------------------------------------
1 | # Solidity API
2 |
3 | ## NFTReceiver
4 |
5 | Plugin contract for handling receipts of non-fungible tokens
6 |
7 | ### onERC721Received
8 |
9 | ```solidity
10 | function onERC721Received(address, address, uint256, bytes) external virtual returns (bytes4)
11 | ```
12 |
13 | Handles the receipt of a single ERC721 token
14 |
15 | ### onERC1155Received
16 |
17 | ```solidity
18 | function onERC1155Received(address, address, uint256, uint256, bytes) external virtual returns (bytes4)
19 | ```
20 |
21 | Handles the receipt of a single ERC1155 token type
22 |
23 | ### onERC1155BatchReceived
24 |
25 | ```solidity
26 | function onERC1155BatchReceived(address, address, uint256[], uint256[], bytes) external virtual returns (bytes4)
27 | ```
28 |
29 | Handles the receipt of multiple ERC1155 token types
30 |
31 |
--------------------------------------------------------------------------------
/docs/utils/SafeSend.md:
--------------------------------------------------------------------------------
1 | # Solidity API
2 |
3 | ## SafeSend
4 |
5 | Utility contract for sending Ether or WETH value to an address
6 |
7 | ### WETH_ADDRESS
8 |
9 | ```solidity
10 | address payable WETH_ADDRESS
11 | ```
12 |
13 | Address for WETH contract on mainnet
14 |
15 | ### _attemptETHTransfer
16 |
17 | ```solidity
18 | function _attemptETHTransfer(address _to, uint256 _value) internal returns (bool success)
19 | ```
20 |
21 | Attempts to send ether to an address
22 |
23 | | Name | Type | Description |
24 | | ---- | ---- | ----------- |
25 | | _to | address | Address attemping to send to |
26 | | _value | uint256 | Amount to send |
27 |
28 | | Name | Type | Description |
29 | | ---- | ---- | ----------- |
30 | | success | bool | Status of transfer |
31 |
32 | ### _sendEthOrWeth
33 |
34 | ```solidity
35 | function _sendEthOrWeth(address _to, uint256 _value) internal
36 | ```
37 |
38 | Sends eth or weth to an address
39 |
40 | | Name | Type | Description |
41 | | ---- | ---- | ----------- |
42 | | _to | address | Address to send to |
43 | | _value | uint256 | Amount to send |
44 |
45 |
--------------------------------------------------------------------------------
/docs/utils/SelfPermit.md:
--------------------------------------------------------------------------------
1 | # Solidity API
2 |
3 | ## SelfPermit
4 |
5 | Utility contract for executing a permit signature to update the approval status in an FERC1155 contract
6 |
7 | ### selfPermit
8 |
9 | ```solidity
10 | function selfPermit(address _token, uint256 _id, bool _approved, uint256 _deadline, uint8 _v, bytes32 _r, bytes32 _s) public
11 | ```
12 |
13 | Caller executes permit using their own signature for an ID type of an ERC1155 token
14 |
15 | | Name | Type | Description |
16 | | ---- | ---- | ----------- |
17 | | _token | address | Address of ERC1155 token contract |
18 | | _id | uint256 | ID type being approved |
19 | | _approved | bool | Approval status for the token |
20 | | _deadline | uint256 | Deadline for when the signature expires |
21 | | _v | uint8 | The recovery ID (129th byte and chain ID) of the signature used to recover the signer |
22 | | _r | bytes32 | The first 64 bytes of the signature |
23 | | _s | bytes32 | Bytes 64-128 of the signature |
24 |
25 | ### selfPermitAll
26 |
27 | ```solidity
28 | function selfPermitAll(address _token, bool _approved, uint256 _deadline, uint8 _v, bytes32 _r, bytes32 _s) public
29 | ```
30 |
31 | Caller executes permit using their own signature for all ID types of an ERC1155 token
32 |
33 | | Name | Type | Description |
34 | | ---- | ---- | ----------- |
35 | | _token | address | Address of ERC1155 token contract |
36 | | _approved | bool | Approval status for the token |
37 | | _deadline | uint256 | Deadline for when the signature expires |
38 | | _v | uint8 | The recovery ID (129th byte and chain ID) of the signature used to recover the signer |
39 | | _r | bytes32 | The first 64 bytes of the signature |
40 | | _s | bytes32 | Bytes 64-128 of the signature |
41 |
42 |
--------------------------------------------------------------------------------
/foundry.toml:
--------------------------------------------------------------------------------
1 | ## defaults for _all_ profiles
2 | [default]
3 | src = 'src'
4 | test = 'test'
5 | out = 'out'
6 | libs = ['lib']
7 | remappings = []
8 | libraries = []
9 | # cache = true
10 | cache_path = 'cache'
11 | force = false
12 | evm_version = 'london'
13 | gas_reports = [
14 | "BaseVault",
15 | "Buyout",
16 | "FERC1155",
17 | "Migration",
18 | "Supply",
19 | "Target",
20 | "Transfer",
21 | "TransferReference",
22 | "Vault",
23 | "VaultFactory",
24 | "VaultRegistry"
25 | ]
26 | ## Sets the concrete solc version to use, this overrides the `auto_detect_solc` value
27 | # solc_version = '0.8.10'
28 | auto_detect_solc = true
29 | offline = false
30 | optimizer = false
31 | #optimizer_runs = 200
32 | via_ir = false
33 | verbosity = 0
34 | ignored_error_codes = []
35 | fuzz_runs = 256
36 | ffi = false
37 | sender = '0x00a329c0648769a73afac7f9381e08fb43dbea72'
38 | tx_origin = '0x00a329c0648769a73afac7f9381e08fb43dbea72'
39 | initial_balance = '0xffffffffffffffffffffffff'
40 | block_number = 0
41 | # NOTE due to a toml-rs limitation, this value needs to be a string if the desired gas limit exceeds `i64::MAX` (9223372036854775807)
42 | gas_limit = 9223372036854775807
43 | gas_price = 0
44 | block_base_fee_per_gas = 0
45 | block_coinbase = '0x0000000000000000000000000000000000000000'
46 | block_timestamp = 0
47 | block_difficulty = 0
48 | # caches storage retrieved locally for certain chains and endpoints
49 | # can also be restrictied to `chains = ["optimism", "mainnet"]`
50 | # by default all endpoints will be cached, alternative options are "remote" for only caching non localhost endpoints and ""
51 | # to disable storage caching entirely set `no_storage_caching = true`
52 | rpc_storage_caching = { chains = "all", endpoints = "all" }
53 | # this overrides `rpc_storage_caching` entirely
54 | no_storage_caching = false
55 | # use ipfs method to generate the metadata hash, solc's default.
56 | # To not include the metadata hash, to allow for deterministic code: https://docs.soliditylang.org/en/latest/metadata.html, use "none"
57 | bytecode_hash = "ipfs"
58 | # If this option is enabled, Solc is instructed to generate output (bytecode) only for the required contracts
59 | # this can reduce compile time for `forge test` a bit but is considered experimental at this point.
60 | sparse_mode = false
61 |
--------------------------------------------------------------------------------
/hardhat.config.js:
--------------------------------------------------------------------------------
1 | require("dotenv").config();
2 | require("@nomiclabs/hardhat-etherscan");
3 | require("@nomiclabs/hardhat-waffle");
4 | require("solidity-docgen");
5 |
6 | module.exports = {
7 | solidity: {
8 | version: "0.8.13",
9 | settings: {
10 | optimizer: {
11 | enabled: true,
12 | runs: 15000
13 | }
14 | }
15 | },
16 | paths: {
17 | sources: "./src",
18 | artifacts: "./artifacts",
19 | cache: "./hh-cache"
20 | },
21 | docgen: {
22 | pages: 'files',
23 | },
24 | etherscan: {
25 | apiKey: process.env.ETHERSCAN_API_KEY
26 | },
27 | networks: {
28 | hardhat: {
29 | chainId: 1337,
30 | blockGasLimit: 30_000_000
31 | },
32 | rinkeby: {
33 | url: "https://eth-rinkeby.alchemyapi.io/v2/" + `${process.env.ALCHEMY_API_KEY}`,
34 | accounts: [`0x${process.env.DEPLOYER_PRIVATE_KEY}`]
35 | },
36 | mainnet: {
37 | url: "https://eth-mainnet.alchemyapi.io/v2/" + `${process.env.ALCHEMY_API_KEY}`,
38 | accounts: [`0x${process.env.DEPLOYER_PRIVATE_KEY}`]
39 | }
40 | }
41 | };
42 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "modular-fractional",
3 | "author": "Fractional Company",
4 | "version": "2.0.0",
5 | "description": "Smart contract protocol v2",
6 | "homepage": "https://github.com/fractional-company/modular-fractional#readme",
7 | "repository": {
8 | "type": "git",
9 | "url": "git+https://github.com/fractional-company/modular-fractional.git"
10 | },
11 | "scripts": {
12 | "prettier": "prettier --write 'src/**/*.sol' 'test/*.sol'",
13 | "prettier:list": "prettier --list-different 'src/**/*.sol'",
14 | "prettier:check": "prettier --check 'src/**/*.sol'",
15 | "solhint": "solhint --config ./.solhint.json 'src/**/*.sol' --fix",
16 | "solhint:check": "solhint --config ./.solhint.json 'src/**/*.sol'",
17 | "lint": "npm run prettier && npm run solhint",
18 | "lint:check": "npm run prettier:check && npm run solhint:check"
19 | },
20 | "devDependencies": {
21 | "@nomiclabs/hardhat-ethers": "^2.0.2",
22 | "@nomiclabs/hardhat-etherscan": "^2.1.8",
23 | "@nomiclabs/hardhat-waffle": "^2.0.1",
24 | "@openzeppelin/contracts": "^4.6.0",
25 | "@rari-capital/solmate": "^6.3.0",
26 | "clones-with-immutable-args": "./lib/clones-with-immutable-args",
27 | "dotenv": "^10.0.0",
28 | "hardhat": "^2.9.6",
29 | "keccak256": "^1.0.6",
30 | "merkletreejs": "^0.2.24",
31 | "prettier": "^2.5.1",
32 | "prettier-plugin-solidity": "^1.0.0-beta.19",
33 | "solhint": "^3.3.6",
34 | "solidity-docgen": "0.6.0-beta.14"
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/remappings.txt:
--------------------------------------------------------------------------------
1 | @rari-capital/solmate/src/=lib/solmate/src/
2 | @openzeppelin/contracts/=lib/openzeppelin-contracts/contracts
3 | ds-test/=lib/clones-with-immutable-args/lib/ds-test/src/
4 | clones-with-immutable-args/=lib/clones-with-immutable-args/
5 | weird-erc20/=lib/solmate/lib/weird-erc20/src/
6 |
--------------------------------------------------------------------------------
/scripts/contracts/rinkeby.json:
--------------------------------------------------------------------------------
1 | {
2 | "BaseVault": "0xec194Dee666725E512DBe2bf40306C7C9BCD4651",
3 | "Buyout": "0x7003c79786f5Af5079699BA77DE9CB04cc569fD4",
4 | "FERC1155": "0xD09FE23b7B5a2E7a3BAf9079D9a1cfC9E0209AD0",
5 | "Migration": "0x6bb11960324d41d77Aaaf8C8c93c956A1F2345eA",
6 | "Supply": "0x88B8b0D1047caDD2B28AaEdf2fE2B863fe8885C2",
7 | "Transfer": "0x4a92225796d01840AF1e07b8D872A046d0F08Edc",
8 | "Vault": "0x63625DA7E523e716B1E317493Acd2b8d79e4230A",
9 | "VaultFactory": "0x9BA1Ec3f27FA46c42ba49ba76Bd082dD6DAFAA20",
10 | "VaultRegistry": "0x2580E23D6Bc9E23F5EF55563b1e3E5AFe2711689"
11 | }
12 |
--------------------------------------------------------------------------------
/scripts/factory/deploy.js:
--------------------------------------------------------------------------------
1 | const hre = require("hardhat");
2 | const fs = require("fs");
3 | const contractsDir = __dirname + "/../contracts";
4 | const rinkebyFile = fs.readFileSync(contractsDir + "/rinkeby.json");
5 | const contractAddr = JSON.parse(rinkebyFile);
6 |
7 | async function main() {
8 | const [deployer] = await ethers.getSigners();
9 |
10 | console.log("Deployer address:", await deployer.getAddress());
11 | console.log("Account balance:", (await deployer.getBalance()).toString());
12 |
13 | // Get all contract factories
14 | const VaultFactory = await ethers.getContractFactory("VaultFactory");
15 |
16 | // Deploy contracts in necessary order
17 | const factory = await VaultFactory.deploy();
18 | await factory.deployed();
19 |
20 | // Log addresses of deployed contracts
21 | console.log("VaultFactory address:", factory.address);
22 | }
23 |
24 | main()
25 | .then(() => process.exit(0))
26 | .catch((error) => {
27 | console.error(error);
28 | process.exit(1);
29 | });
30 |
--------------------------------------------------------------------------------
/scripts/factory/verify.js:
--------------------------------------------------------------------------------
1 | const fs = require("fs");
2 | const rinkebyFile = fs.readFileSync(__dirname + "/../contracts/rinkeby.json");
3 | const contractAddr = JSON.parse(rinkebyFile);
4 |
5 | async function main() {
6 | await hre.run("verify:verify", {
7 | address: contractAddr.VaultFactory,
8 | constructorArguments: []
9 | });
10 |
11 | await hre.run("verify:verify", {
12 | address: contractAddr.Vault,
13 | constructorArguments: [],
14 | });
15 | }
16 |
17 | main()
18 | .then(() => process.exit(0))
19 | .catch((error) => {
20 | console.error(error);
21 | process.exit(1);
22 | });
23 |
--------------------------------------------------------------------------------
/scripts/merkle/input/permission.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | PERMISSIONS: [
3 | "0x28509f6ce3f5dcfecb9adf4fc0f0eaf534fee29ae3f599eb2d5cf98a8e33a39d",
4 | "0xaa007a58c979c5db67efe1770900beeeca81ef0c6571f27dbe8ca13329afcf26",
5 | "0x7132c7851d0eec630e0763c9d3daabc6c41b02fc3552a291996056491e2c957c",
6 | "0x0fe5090cb476a814e2b406fd4a1928c08277127e4fa5d475bdd9fce43e5c3c88",
7 | "0x199b6a3fb29d9ae6a47599a9d402f057804ad2699609636d357d9d9cf9dcd11c"
8 | ]
9 | }
10 |
--------------------------------------------------------------------------------
/scripts/merkle/output/permission.json:
--------------------------------------------------------------------------------
1 | {
2 | "0x28509f6ce3f5dcfecb9adf4fc0f0eaf534fee29ae3f599eb2d5cf98a8e33a39d": {
3 | "root": "0x2562388ca0141d62c1eb874a0626fe8ade58f0f59b346cf498a56ce7363499fe",
4 | "leaf": "0x28509f6ce3f5dcfecb9adf4fc0f0eaf534fee29ae3f599eb2d5cf98a8e33a39d",
5 | "proofs": [
6 | "0xaa007a58c979c5db67efe1770900beeeca81ef0c6571f27dbe8ca13329afcf26",
7 | "0x107c987dd73c5c4fe281e54e4321c733841ee4b9c7503e46218f446ca3371c49",
8 | "0x199b6a3fb29d9ae6a47599a9d402f057804ad2699609636d357d9d9cf9dcd11c"
9 | ]
10 | },
11 | "0xaa007a58c979c5db67efe1770900beeeca81ef0c6571f27dbe8ca13329afcf26": {
12 | "root": "0x2562388ca0141d62c1eb874a0626fe8ade58f0f59b346cf498a56ce7363499fe",
13 | "leaf": "0xaa007a58c979c5db67efe1770900beeeca81ef0c6571f27dbe8ca13329afcf26",
14 | "proofs": [
15 | "0x28509f6ce3f5dcfecb9adf4fc0f0eaf534fee29ae3f599eb2d5cf98a8e33a39d",
16 | "0x107c987dd73c5c4fe281e54e4321c733841ee4b9c7503e46218f446ca3371c49",
17 | "0x199b6a3fb29d9ae6a47599a9d402f057804ad2699609636d357d9d9cf9dcd11c"
18 | ]
19 | },
20 | "0x7132c7851d0eec630e0763c9d3daabc6c41b02fc3552a291996056491e2c957c": {
21 | "root": "0x2562388ca0141d62c1eb874a0626fe8ade58f0f59b346cf498a56ce7363499fe",
22 | "leaf": "0x7132c7851d0eec630e0763c9d3daabc6c41b02fc3552a291996056491e2c957c",
23 | "proofs": [
24 | "0x0fe5090cb476a814e2b406fd4a1928c08277127e4fa5d475bdd9fce43e5c3c88",
25 | "0xbb2e5d4e0f6be251a57fdcb624a9acc234a03a94a2d89d30142ced341204ad8e",
26 | "0x199b6a3fb29d9ae6a47599a9d402f057804ad2699609636d357d9d9cf9dcd11c"
27 | ]
28 | },
29 | "0x0fe5090cb476a814e2b406fd4a1928c08277127e4fa5d475bdd9fce43e5c3c88": {
30 | "root": "0x2562388ca0141d62c1eb874a0626fe8ade58f0f59b346cf498a56ce7363499fe",
31 | "leaf": "0x0fe5090cb476a814e2b406fd4a1928c08277127e4fa5d475bdd9fce43e5c3c88",
32 | "proofs": [
33 | "0x7132c7851d0eec630e0763c9d3daabc6c41b02fc3552a291996056491e2c957c",
34 | "0xbb2e5d4e0f6be251a57fdcb624a9acc234a03a94a2d89d30142ced341204ad8e",
35 | "0x199b6a3fb29d9ae6a47599a9d402f057804ad2699609636d357d9d9cf9dcd11c"
36 | ]
37 | },
38 | "0x199b6a3fb29d9ae6a47599a9d402f057804ad2699609636d357d9d9cf9dcd11c": {
39 | "root": "0x2562388ca0141d62c1eb874a0626fe8ade58f0f59b346cf498a56ce7363499fe",
40 | "leaf": "0x199b6a3fb29d9ae6a47599a9d402f057804ad2699609636d357d9d9cf9dcd11c",
41 | "proofs": [
42 | "0xded1157d7da55a76caad5026b2045a81151ef567605cf200d409dfe4590a7f18"
43 | ]
44 | }
45 | }
--------------------------------------------------------------------------------
/scripts/merkle/permission.js:
--------------------------------------------------------------------------------
1 | var fs = require('fs');
2 | const keccak256 = require('keccak256');
3 | const { MerkleTree } = require('merkletreejs');
4 | const { PERMISSIONS } = require('./input/permission');
5 |
6 | var tree = {};
7 | var leafNodes = PERMISSIONS.map(
8 | (hash, i) => ethers.utils.defaultAbiCoder.encode(
9 | ['bytes32'], [PERMISSIONS[i]]
10 | )
11 | );
12 | var merkleTree = new MerkleTree(leafNodes, keccak256, { sortPairs: true });
13 | var rootHash = merkleTree.getHexRoot();
14 | console.log("Merkle Root:", rootHash);
15 | console.log("Merkle Tree: ", merkleTree.toString());
16 |
17 | for (var i = 0; i < leafNodes.length; i++) {
18 | let leaf = leafNodes[i];
19 | let hexProof = merkleTree.getHexProof(leaf);
20 |
21 | console.log("Leaf Node: ", leaf)
22 | console.log("Hex Proof: ", hexProof);
23 |
24 | tree[leaf] = {
25 | 'root': rootHash,
26 | 'leaf': leaf,
27 | 'proofs': hexProof
28 | }
29 |
30 | // console.log(merkleTree.verify(hexProof, leaf, rootHash));
31 | }
32 |
33 | // Save tree to JSON file
34 | var json = JSON.stringify(tree, null, 4);
35 | // fs.writeFile("scripts/merkle/output/permission.json", json, function(err) {
36 | // if (err) throw err;
37 | // console.log("Complete");
38 | // });
39 |
--------------------------------------------------------------------------------
/scripts/modules/deploy.js:
--------------------------------------------------------------------------------
1 | const hre = require("hardhat")
2 | const fs = require("fs");
3 | const contractsDir = __dirname + "/../contracts";
4 | const rinkebyFile = fs.readFileSync(contractsDir + "/rinkeby.json");
5 | const contractAddr = JSON.parse(rinkebyFile);
6 |
7 | async function main() {
8 | const [deployer] = await ethers.getSigners();
9 |
10 | console.log("Deployer address:", await deployer.getAddress());
11 | console.log("Account balance:", (await deployer.getBalance()).toString());
12 |
13 | // Get all contract factories
14 | const BaseVault = await ethers.getContractFactory("BaseVault");
15 | const Buyout = await ethers.getContractFactory("Buyout");
16 | const Migration = await ethers.getContractFactory("Migration");
17 |
18 | // Deploy contracts in necessary order
19 | const buyout = await Buyout.deploy(contractAddr.VaultRegistry, contractAddr.Supply, contractAddr.Transfer);
20 | await buyout.deployed();
21 |
22 | const baseVault = await BaseVault.deploy(contractAddr.VaultRegistry, contractAddr.Supply);
23 | await baseVault.deployed();
24 |
25 | // Deploy contracts in necessary order
26 | const migration = await Migration.deploy(buyout.address, contractAddr.VaultRegistry, contractAddr.Supply);
27 | await migration.deployed();
28 |
29 | // Log addresses of deployed contracts
30 | console.log("BaseVault address:", baseVault.address);
31 | console.log("Buyout address:", buyout.address);
32 | console.log("Migration address:", migration.address);
33 | }
34 |
35 | main()
36 | .then(() => process.exit(0))
37 | .catch((error) => {
38 | console.error(error);
39 | process.exit(1);
40 | });
41 |
--------------------------------------------------------------------------------
/scripts/modules/verify.js:
--------------------------------------------------------------------------------
1 | const fs = require("fs");
2 | const rinkebyFile = fs.readFileSync(__dirname + "/../contracts/rinkeby.json");
3 | const contractAddr = JSON.parse(rinkebyFile);
4 |
5 | async function main() {
6 | await hre.run("verify:verify", {
7 | address: contractAddr.BaseVault,
8 | constructorArguments: [
9 | contractAddr.VaultRegistry,
10 | contractAddr.Supply
11 | ]
12 | });
13 |
14 | await hre.run("verify:verify", {
15 | address: contractAddr.Buyout,
16 | constructorArguments: [
17 | contractAddr.VaultRegistry,
18 | contractAddr.Supply,
19 | contractAddr.Transfer
20 | ]
21 | });
22 |
23 | await hre.run("verify:verify", {
24 | address: contractAddr.Migration,
25 | constructorArguments: [
26 | contractAddr.Buyout,
27 | contractAddr.VaultRegistry,
28 | contractAddr.Supply
29 | ]
30 | });
31 | }
32 |
33 | main()
34 | .then(() => process.exit(0))
35 | .catch((error) => {
36 | console.error(error);
37 | process.exit(1);
38 | });
39 |
--------------------------------------------------------------------------------
/scripts/registry/deploy.js:
--------------------------------------------------------------------------------
1 | const hre = require("hardhat");
2 | const fs = require("fs");
3 | const contractsDir = __dirname + "/../contracts";
4 | const rinkebyFile = fs.readFileSync(contractsDir + "/rinkeby.json");
5 | const contractAddr = JSON.parse(rinkebyFile);
6 |
7 | async function main() {
8 | const [deployer] = await ethers.getSigners();
9 |
10 | console.log("Deployer address:", await deployer.getAddress());
11 | console.log("Account balance:", (await deployer.getBalance()).toString());
12 |
13 | // Get all contract factories
14 | const VaultRegistry = await ethers.getContractFactory("VaultRegistry");
15 |
16 | // Deploy contracts in necessary order
17 | const registry = await VaultRegistry.deploy();
18 | await registry.deployed();
19 |
20 | // Log addresses of deployed contracts
21 | console.log("VaultRegistry address:", registry.address);
22 | }
23 |
24 | main()
25 | .then(() => process.exit(0))
26 | .catch((error) => {
27 | console.error(error);
28 | process.exit(1);
29 | });
30 |
--------------------------------------------------------------------------------
/scripts/registry/verify.js:
--------------------------------------------------------------------------------
1 | const fs = require("fs");
2 | const rinkebyFile = fs.readFileSync(__dirname + "/../contracts/rinkeby.json");
3 | const contractAddr = JSON.parse(rinkebyFile);
4 |
5 | async function main() {
6 | await hre.run("verify:verify", {
7 | address: contractAddr.VaultRegistry,
8 | constructorArguments: []
9 | });
10 |
11 | await hre.run("verify:verify", {
12 | address: contractAddr.FERC1155,
13 | constructorArguments: [],
14 | });
15 | }
16 |
17 | main()
18 | .then(() => process.exit(0))
19 | .catch((error) => {
20 | console.error(error);
21 | process.exit(1);
22 | });
23 |
--------------------------------------------------------------------------------
/scripts/targets/deploy.js:
--------------------------------------------------------------------------------
1 | const hre = require("hardhat")
2 | const fs = require("fs");
3 | const contractsDir = __dirname + "/../contracts";
4 | const rinkebyFile = fs.readFileSync(contractsDir + "/rinkeby.json");
5 | const contractAddr = JSON.parse(rinkebyFile);
6 |
7 | async function main() {
8 | const [deployer] = await ethers.getSigners();
9 |
10 | console.log("Deployer address:", await deployer.getAddress());
11 | console.log("Account balance:", (await deployer.getBalance()).toString());
12 |
13 | // Get all contract factories
14 | const Supply = await ethers.getContractFactory("Supply");
15 | const Transfer = await ethers.getContractFactory("Transfer");
16 |
17 | // Deploy contracts in necessary order
18 | const supply = await Supply.deploy(contractAddr.VaultRegistry);
19 | await supply.deployed();
20 |
21 | const transfer = await Transfer.deploy();
22 | await transfer.deployed();
23 |
24 | // Log addresses of deployed contracts
25 | console.log("Supply address:", supply.address);
26 | console.log("Transfer address:", transfer.address);
27 | }
28 |
29 | main()
30 | .then(() => process.exit(0))
31 | .catch((error) => {
32 | console.error(error);
33 | process.exit(1);
34 | });
35 |
--------------------------------------------------------------------------------
/scripts/targets/verify.js:
--------------------------------------------------------------------------------
1 | const fs = require("fs");
2 | const rinkebyFile = fs.readFileSync(__dirname + "/../contracts/rinkeby.json");
3 | const contractAddr = JSON.parse(rinkebyFile);
4 |
5 | async function main() {
6 | await hre.run("verify:verify", {
7 | address: contractAddr.Supply,
8 | constructorArguments: [contractAddr.VaultRegistry]
9 | });
10 |
11 | await hre.run("verify:verify", {
12 | address: contractAddr.Transfer,
13 | constructorArguments: []
14 | });
15 | }
16 |
17 | main()
18 | .then(() => process.exit(0))
19 | .catch((error) => {
20 | console.error(error);
21 | process.exit(1);
22 | });
23 |
--------------------------------------------------------------------------------
/scripts/verify.js:
--------------------------------------------------------------------------------
1 | const fs = require("fs");
2 | const rinkebyFile = fs.readFileSync(__dirname + "/contracts/rinkeby.json");
3 | const contractAddr = JSON.parse(rinkebyFile);
4 |
5 | async function main() {
6 | await hre.run("verify:verify", {
7 | address: contractAddr.BaseVault,
8 | constructorArguments: [
9 | contractAddr.VaultRegistry,
10 | contractAddr.Supply
11 | ],
12 | });
13 |
14 | await hre.run("verify:verify", {
15 | address: contractAddr.Buyout,
16 | constructorArguments: [
17 | contractAddr.VaultRegistry,
18 | contractAddr.Supply,
19 | contractAddr.Transfer
20 | ],
21 | });
22 |
23 | await hre.run("verify:verify", {
24 | address: contractAddr.FERC1155,
25 | constructorArguments: [],
26 | });
27 |
28 | await hre.run("verify:verify", {
29 | address: contractAddr.Migration,
30 | constructorArguments: [
31 | contractAddr.Buyout,
32 | contractAddr.VaultRegistry,
33 | contractAddr.Supply
34 | ],
35 | });
36 |
37 | await hre.run("verify:verify", {
38 | address: contractAddr.Supply,
39 | constructorArguments: [contractAddr.VaultRegistry],
40 | });
41 |
42 | await hre.run("verify:verify", {
43 | address: contractAddr.Transfer,
44 | constructorArguments: [],
45 | });
46 |
47 | await hre.run("verify:verify", {
48 | address: contractAddr.Vault,
49 | constructorArguments: [],
50 | });
51 |
52 | await hre.run("verify:verify", {
53 | address: contractAddr.VaultFactory,
54 | constructorArguments: [],
55 | });
56 |
57 | await hre.run("verify:verify", {
58 | address: contractAddr.VaultRegistry,
59 | constructorArguments: [],
60 | });
61 | }
62 |
63 | main()
64 | .then(() => process.exit(0))
65 | .catch((error) => {
66 | console.error(error);
67 | process.exit(1);
68 | });
69 |
--------------------------------------------------------------------------------
/slither.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "detectors_to_exclude": "solc-version,pragma,assembly,missing-zero-check,naming-convention,too-many-digits",
3 | "exclude_informational": false,
4 | "exclude_low": false,
5 | "exclude_medium": false,
6 | "exclude_high": false,
7 | "filter_paths": "lib",
8 | "solc_remaps": [
9 | "@rari-capital/solmate/src/=lib/solmate/src/",
10 | "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
11 | "forge-std/=lib/forge-std/src/",
12 | "ds-test/=lib/clones-with-immutable-args/lib/ds-test/src/",
13 | "clones-with-immutable-args/=lib/clones-with-immutable-args/",
14 | "weird-erc20/=lib/solmate/lib/weird-erc20/src/"
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/src/constants/Memory.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity 0.8.13;
3 |
4 | uint256 constant COST_PER_WORD = 3;
5 |
6 | uint256 constant ONE_WORD = 0x20;
7 | uint256 constant ALMOST_ONE_WORD = 0x1f;
8 | uint256 constant TWO_WORDS = 0x40;
9 |
10 | uint256 constant FREE_MEMORY_POINTER_SLOT = 0x40;
11 | uint256 constant ZERO_SLOT = 0x60;
12 | uint256 constant DEFAULT_FREE_MEMORY_POINTER_SLOT = 0x80;
13 |
14 | uint256 constant SLOT0x80 = 0x80;
15 | uint256 constant SLOT0xA0 = 0xa0;
16 | uint256 constant SLOT0xC0 = 0xc0;
17 |
18 | uint256 constant EIGHT_BYTES = 0x04;
19 | uint256 constant EXTRA_GAS_BUFFER = 0x20;
20 | uint256 constant MEMORY_EXPANSION_COEFFICIENT = 0x200;
21 |
--------------------------------------------------------------------------------
/src/constants/Permit.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity 0.8.13;
3 |
4 | /// @dev The EIP-712 typehash for the contract's domain
5 | bytes32 constant DOMAIN_TYPEHASH = keccak256(
6 | "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"
7 | );
8 |
9 | /// @dev The EIP-712 typehash for the permit struct used by the contract
10 | bytes32 constant PERMIT_TYPEHASH = keccak256(
11 | "Permit(address owner,address operator,uint256 tokenId,bool approved,uint256 nonce,uint256 deadline)"
12 | );
13 |
14 | /// @dev The EIP-712 typehash for the permit all struct used by the contract
15 | bytes32 constant PERMIT_ALL_TYPEHASH = keccak256(
16 | "PermitAll(address owner,address operator,bool approved,uint256 nonce,uint256 deadline)"
17 | );
18 |
--------------------------------------------------------------------------------
/src/constants/Supply.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity 0.8.13;
3 |
4 | import "./Memory.sol";
5 |
6 | // abi.encodeWithSignature("mint(address,uint256)")
7 | uint256 constant REGISTRY_MINT_SIGNATURE = (
8 | 0x40c10f1900000000000000000000000000000000000000000000000000000000
9 | );
10 | uint256 constant REGISTRY_MINT_SIG_PTR = 0x00;
11 | uint256 constant REGISTRY_MINT_TO_PRT = 0x04;
12 | uint256 constant REGISTRY_MINT_VALUE_PTR = 0x24;
13 | uint256 constant REGISTRY_MINT_LENGTH = 0x44; // 4 + 32 * 2 == 68
14 |
15 | // abi.encodeWithSignature("burn(address,uint256)")
16 | uint256 constant REGISTRY_BURN_SIGNATURE = (
17 | 0x9dc29fac00000000000000000000000000000000000000000000000000000000
18 | );
19 | uint256 constant REGISTRY_BURN_SIG_PTR = 0x00;
20 | uint256 constant REGISTRY_BURN_FROM_PTR = 0x04;
21 | uint256 constant REGISTRY_BURN_VALUE_PTR = 0x24;
22 | uint256 constant REGISTRY_BURN_LENGTH = 0x44; // 4 + 32 * 2 == 68
23 |
24 | // ERRORS
25 |
26 | // abi.encodeWithSignature("MintError(address)")
27 | uint256 constant MINT_ERROR_SIGNATURE = (
28 | 0x9770b48a00000000000000000000000000000000000000000000000000000000
29 | );
30 | uint256 constant MINT_ERROR_SIG_PTR = 0x00;
31 | uint256 constant MINT_ERROR_ACCOUNT_PTR = 0x04;
32 | uint256 constant MINT_ERROR_LENGTH = 0x24; // 4 + 32 == 36
33 |
34 | // abi.encodeWithSignature("BurnError(address)")
35 | uint256 constant BURN_ERROR_SIGNATURE = (
36 | 0xb715ffa700000000000000000000000000000000000000000000000000000000
37 | );
38 | uint256 constant BURN_ERROR_SIG_PTR = 0x00;
39 | uint256 constant BURN_ERROR_ACCOUNT_PTR = 0x04;
40 | uint256 constant BURN_ERROR_LENGTH = 0x24; // 4 + 32 == 36
41 |
--------------------------------------------------------------------------------
/src/interfaces/IBaseVault.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity 0.8.13;
3 |
4 | import {IModule} from "./IModule.sol";
5 | import {IProtoform} from "./IProtoform.sol";
6 |
7 | /// @dev Interface for BaseVault protoform contract
8 | interface IBaseVault is IProtoform {
9 | /// @dev Event log for modules that are enabled on a vault
10 | /// @param _vault The vault deployed
11 | /// @param _modules The modules being activated on deployed vault
12 | event ActiveModules(address indexed _vault, address[] _modules);
13 |
14 | function batchDepositERC20(
15 | address _from,
16 | address _to,
17 | address[] memory _tokens,
18 | uint256[] memory _amounts
19 | ) external;
20 |
21 | function batchDepositERC721(
22 | address _from,
23 | address _to,
24 | address[] memory _tokens,
25 | uint256[] memory _ids
26 | ) external;
27 |
28 | function batchDepositERC1155(
29 | address _from,
30 | address _to,
31 | address[] memory _tokens,
32 | uint256[] memory _ids,
33 | uint256[] memory _amounts,
34 | bytes[] memory _datas
35 | ) external;
36 |
37 | function deployVault(
38 | uint256 _fractionSupply,
39 | address[] memory _modules,
40 | address[] calldata _plugins,
41 | bytes4[] calldata _selectors,
42 | bytes32[] memory _mintProof
43 | ) external returns (address vault);
44 |
45 | function registry() external view returns (address);
46 | }
47 |
--------------------------------------------------------------------------------
/src/interfaces/IERC1155.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity 0.8.13;
3 |
4 | /// @dev Interface for ERC-1155 token contract
5 | interface IERC1155 {
6 | event ApprovalForAll(
7 | address indexed _owner,
8 | address indexed _operator,
9 | bool _approved
10 | );
11 | event TransferBatch(
12 | address indexed _operator,
13 | address indexed _from,
14 | address indexed _to,
15 | uint256[] _ids,
16 | uint256[] _amounts
17 | );
18 | event TransferSingle(
19 | address indexed _operator,
20 | address indexed _from,
21 | address indexed _to,
22 | uint256 _id,
23 | uint256 _amount
24 | );
25 | event URI(string _value, uint256 indexed _id);
26 |
27 | function balanceOf(address, uint256) external view returns (uint256);
28 |
29 | function balanceOfBatch(address[] memory _owners, uint256[] memory ids)
30 | external
31 | view
32 | returns (uint256[] memory balances);
33 |
34 | function isApprovedForAll(address, address) external view returns (bool);
35 |
36 | function safeBatchTransferFrom(
37 | address _from,
38 | address _to,
39 | uint256[] memory _ids,
40 | uint256[] memory _amounts,
41 | bytes memory _data
42 | ) external;
43 |
44 | function safeTransferFrom(
45 | address _from,
46 | address _to,
47 | uint256 _id,
48 | uint256 _amount,
49 | bytes memory _data
50 | ) external;
51 |
52 | function setApprovalForAll(address _operator, bool _approved) external;
53 |
54 | function supportsInterface(bytes4 _interfaceId)
55 | external
56 | view
57 | returns (bool);
58 |
59 | function uri(uint256 _id) external view returns (string memory);
60 | }
61 |
--------------------------------------------------------------------------------
/src/interfaces/IERC20.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity 0.8.13;
3 |
4 | /// @dev Interface for ERC-20 token contract
5 | interface IERC20 {
6 | event Approval(
7 | address indexed _owner,
8 | address indexed _spender,
9 | uint256 _amount
10 | );
11 | event Transfer(address indexed _from, address indexed _to, uint256 amount);
12 |
13 | function DOMAIN_SEPARATOR() external view returns (bytes32);
14 |
15 | function allowance(address, address) external view returns (uint256);
16 |
17 | function approve(address _spender, uint256 _amount) external returns (bool);
18 |
19 | function balanceOf(address) external view returns (uint256);
20 |
21 | function decimals() external view returns (uint8);
22 |
23 | function name() external view returns (string memory);
24 |
25 | function nonces(address) external view returns (uint256);
26 |
27 | function permit(
28 | address _owner,
29 | address _spender,
30 | uint256 _value,
31 | uint256 _deadline,
32 | uint8 _v,
33 | bytes32 _r,
34 | bytes32 _s
35 | ) external;
36 |
37 | function symbol() external view returns (string memory);
38 |
39 | function totalSupply() external view returns (uint256);
40 |
41 | function transfer(address _to, uint256 _amount) external returns (bool);
42 |
43 | function transferFrom(
44 | address _from,
45 | address _to,
46 | uint256 _amount
47 | ) external returns (bool);
48 | }
49 |
--------------------------------------------------------------------------------
/src/interfaces/IERC721.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity 0.8.13;
3 |
4 | /// @dev Interface for ERC-721 token contract
5 | interface IERC721 {
6 | event Approval(
7 | address indexed _owner,
8 | address indexed _spender,
9 | uint256 indexed _id
10 | );
11 | event ApprovalForAll(
12 | address indexed _owner,
13 | address indexed _operator,
14 | bool _approved
15 | );
16 | event Transfer(
17 | address indexed _from,
18 | address indexed _to,
19 | uint256 indexed _id
20 | );
21 |
22 | function approve(address _spender, uint256 _id) external;
23 |
24 | function balanceOf(address _owner) external view returns (uint256);
25 |
26 | function getApproved(uint256) external view returns (address);
27 |
28 | function isApprovedForAll(address, address) external view returns (bool);
29 |
30 | function name() external view returns (string memory);
31 |
32 | function ownerOf(uint256 _id) external view returns (address owner);
33 |
34 | function safeTransferFrom(
35 | address _from,
36 | address _to,
37 | uint256 _id
38 | ) external;
39 |
40 | function safeTransferFrom(
41 | address _from,
42 | address _to,
43 | uint256 _id,
44 | bytes memory _data
45 | ) external;
46 |
47 | function setApprovalForAll(address _operator, bool _approved) external;
48 |
49 | function supportsInterface(bytes4 _interfaceId)
50 | external
51 | view
52 | returns (bool);
53 |
54 | function symbol() external view returns (string memory);
55 |
56 | function tokenURI(uint256 _id) external view returns (string memory);
57 |
58 | function transferFrom(
59 | address _from,
60 | address _to,
61 | uint256 _id
62 | ) external;
63 | }
64 |
--------------------------------------------------------------------------------
/src/interfaces/IMinter.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity 0.8.13;
3 |
4 | import {IModule} from "./IModule.sol";
5 | import {Permission} from "./IVaultRegistry.sol";
6 |
7 | /// @dev Interface for Minter module contract
8 | interface IMinter is IModule {
9 | function supply() external view returns (address);
10 | }
11 |
--------------------------------------------------------------------------------
/src/interfaces/IModule.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity 0.8.13;
3 |
4 | import {Permission} from "./IVaultRegistry.sol";
5 |
6 | /// @dev Interface for generic Module contract
7 | interface IModule {
8 | function getLeafNodes() external view returns (bytes32[] memory nodes);
9 |
10 | function getPermissions()
11 | external
12 | view
13 | returns (Permission[] memory permissions);
14 | }
15 |
--------------------------------------------------------------------------------
/src/interfaces/INFTReceiver.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity 0.8.13;
3 |
4 | /// @dev Interface for NFT Receiver contract
5 | interface INFTReceiver {
6 | function onERC721Received(
7 | address,
8 | address,
9 | uint256,
10 | bytes calldata
11 | ) external returns (bytes4);
12 |
13 | function onERC1155Received(
14 | address,
15 | address,
16 | uint256,
17 | uint256,
18 | bytes calldata
19 | ) external returns (bytes4);
20 |
21 | function onERC1155BatchReceived(
22 | address,
23 | address,
24 | uint256[] calldata,
25 | uint256[] calldata,
26 | bytes calldata
27 | ) external returns (bytes4);
28 | }
29 |
--------------------------------------------------------------------------------
/src/interfaces/IProtoform.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity 0.8.13;
3 |
4 | import {IModule} from "./IModule.sol";
5 |
6 | /// @dev Interface for generic Protoform contract
7 | interface IProtoform {
8 | function deployVault(
9 | uint256 _fAmount,
10 | address[] calldata _modules,
11 | address[] calldata _plugins,
12 | bytes4[] calldata _selectors,
13 | bytes32[] calldata _proof
14 | ) external returns (address vault);
15 |
16 | function generateMerkleTree(address[] calldata _modules)
17 | external
18 | view
19 | returns (bytes32[] memory hashes);
20 | }
21 |
--------------------------------------------------------------------------------
/src/interfaces/ISupply.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity 0.8.13;
3 |
4 | /// @dev Interface for Supply target contract
5 | interface ISupply {
6 | /// @dev Emitted when an account being called as an assumed contract does not have code and returns no data
7 | error MintError(address _account);
8 | /// @dev Emitted when an account being called as an assumed contract does not have code and returns no data
9 | error BurnError(address _account);
10 |
11 | function mint(address _to, uint256 _value) external;
12 |
13 | function burn(address _from, uint256 _value) external;
14 | }
15 |
--------------------------------------------------------------------------------
/src/interfaces/ITransfer.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity 0.8.13;
3 |
4 | /// @dev Interface for Transfer target contract
5 | interface ITransfer {
6 | /// @dev Emitted when an ERC-20 token transfer returns a falsey value
7 | /// @param _token The token for which the ERC20 transfer was attempted
8 | /// @param _from The source of the attempted ERC20 transfer
9 | /// @param _to The recipient of the attempted ERC20 transfer
10 | /// @param _amount The amount for the attempted ERC20 transfer
11 | error BadReturnValueFromERC20OnTransfer(
12 | address _token,
13 | address _from,
14 | address _to,
15 | uint256 _amount
16 | );
17 | /// @dev Emitted when a batch ERC-1155 token transfer reverts
18 | /// @param _token The token for which the transfer was attempted
19 | /// @param _from The source of the attempted transfer
20 | /// @param _to The recipient of the attempted transfer
21 | /// @param _identifiers The identifiers for the attempted transfer
22 | /// @param _amounts The amounts for the attempted transfer
23 | error ERC1155BatchTransferGenericFailure(
24 | address _token,
25 | address _from,
26 | address _to,
27 | uint256[] _identifiers,
28 | uint256[] _amounts
29 | );
30 | /// @dev Emitted when an ERC-721 transfer with amount other than one is attempted
31 | error InvalidERC721TransferAmount();
32 | /// @dev Emitted when attempting to fulfill an order where an item has an amount of zero
33 | error MissingItemAmount();
34 | /// @dev Emitted when an account being called as an assumed contract does not have code and returns no data
35 | /// @param _account The account that should contain code
36 | error NoContract(address _account);
37 | /// @dev Emitted when an ERC-20, ERC-721, or ERC-1155 token transfer fails
38 | /// @param _token The token for which the transfer was attempted
39 | /// @param _from The source of the attempted transfer
40 | /// @param _to The recipient of the attempted transfer
41 | /// @param _identifier The identifier for the attempted transfer
42 | /// @param _amount The amount for the attempted transfer
43 | error TokenTransferGenericFailure(
44 | address _token,
45 | address _from,
46 | address _to,
47 | uint256 _identifier,
48 | uint256 _amount
49 | );
50 |
51 | function ERC20Transfer(
52 | address _token,
53 | address _to,
54 | uint256 _value
55 | ) external;
56 |
57 | function ERC721TransferFrom(
58 | address _token,
59 | address _from,
60 | address _to,
61 | uint256 _tokenId
62 | ) external;
63 |
64 | function ERC1155TransferFrom(
65 | address _token,
66 | address _from,
67 | address _to,
68 | uint256 _id,
69 | uint256 _value
70 | ) external;
71 |
72 | function ERC1155BatchTransferFrom(
73 | address _token,
74 | address _from,
75 | address _to,
76 | uint256[] calldata _ids,
77 | uint256[] calldata _values
78 | ) external;
79 | }
80 |
--------------------------------------------------------------------------------
/src/interfaces/IVault.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity 0.8.13;
3 |
4 | /// @dev Interface for Vault proxy contract
5 | interface IVault {
6 | /// @dev Emitted when execution reverted with no reason
7 | error ExecutionReverted();
8 | /// @dev Emitted when ownership of the proxy has been renounced
9 | error Initialized(address _owner, address _newOwner, uint256 _nonce);
10 | /// @dev Emitted when there is no implementation stored in methods for a function signature
11 | error MethodNotFound();
12 | /// @dev Emitted when the caller is not the owner
13 | error NotAuthorized(address _caller, address _target, bytes4 _selector);
14 | /// @dev Emitted when the caller is not the owner
15 | error NotOwner(address _owner, address _caller);
16 | /// @dev Emitted when the owner is changed during the DELEGATECALL
17 | error OwnerChanged(address _originalOwner, address _newOwner);
18 | /// @dev Emitted when passing an EOA or an undeployed contract as the target
19 | error TargetInvalid(address _target);
20 |
21 | /// @dev Event log for executing transactions
22 | /// @param _target Address of target contract
23 | /// @param _data Transaction data being executed
24 | /// @param _response Return data of delegatecall
25 | event Execute(address indexed _target, bytes _data, bytes _response);
26 | /// @dev Event log for installing plugins
27 | /// @param _selectors List of function selectors
28 | /// @param _plugins List of plugin contracts
29 | event InstallPlugin(bytes4[] _selectors, address[] _plugins);
30 | /// @dev Event log for transferring ownership
31 | /// @param _oldOwner Address of old owner
32 | /// @param _newOwner Address of new owner
33 | event TransferOwnership(
34 | address indexed _oldOwner,
35 | address indexed _newOwner
36 | );
37 | /// @dev Event log for uninstalling plugins
38 | /// @param _selectors List of function selectors
39 | event UninstallPlugin(bytes4[] _selectors);
40 |
41 | function execute(
42 | address _target,
43 | bytes memory _data,
44 | bytes32[] memory _proof
45 | ) external payable returns (bool success, bytes memory response);
46 |
47 | function init() external;
48 |
49 | function install(bytes4[] memory _selectors, address[] memory _plugins)
50 | external;
51 |
52 | function merkleRoot() external view returns (bytes32);
53 |
54 | function methods(bytes4) external view returns (address);
55 |
56 | function nonce() external view returns (uint256);
57 |
58 | function owner() external view returns (address);
59 |
60 | function setMerkleRoot(bytes32 _rootHash) external;
61 |
62 | function transferOwnership(address _newOwner) external;
63 |
64 | function uninstall(bytes4[] memory _selectors) external;
65 | }
66 |
--------------------------------------------------------------------------------
/src/interfaces/IVaultFactory.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity 0.8.13;
3 |
4 | /// @dev Interface for VaultFactory contract
5 | interface IVaultFactory {
6 | /// @dev Event log for deploying vault
7 | /// @param _origin Address of transaction origin
8 | /// @param _deployer Address of sender
9 | /// @param _owner Address of vault owner
10 | /// @param _seed Value of seed
11 | /// @param _salt Value of salt
12 | /// @param _vault Address of deployed vault
13 | event DeployVault(
14 | address indexed _origin,
15 | address indexed _deployer,
16 | address indexed _owner,
17 | bytes32 _seed,
18 | bytes32 _salt,
19 | address _vault
20 | );
21 |
22 | function deploy() external returns (address payable vault);
23 |
24 | function deployFor(address _owner) external returns (address payable vault);
25 |
26 | function getNextAddress(address _deployer)
27 | external
28 | view
29 | returns (address vault);
30 |
31 | function getNextSeed(address _deployer) external view returns (bytes32);
32 |
33 | function implementation() external view returns (address);
34 | }
35 |
--------------------------------------------------------------------------------
/src/interfaces/IVaultRegistry.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity 0.8.13;
3 |
4 | /// @dev Vault permissions
5 | struct Permission {
6 | // Address of module contract
7 | address module;
8 | // Address of target contract
9 | address target;
10 | // Function selector from target contract
11 | bytes4 selector;
12 | }
13 |
14 | /// @dev Vault information
15 | struct VaultInfo {
16 | // Address of FERC1155 token contract
17 | address token;
18 | // ID of the token type
19 | uint256 id;
20 | }
21 |
22 | /// @dev Interface for VaultRegistry contract
23 | interface IVaultRegistry {
24 | /// @dev Emitted when the caller is not the controller
25 | error InvalidController(address _controller, address _sender);
26 | /// @dev Emitted when the caller is not a registered vault
27 | error UnregisteredVault(address _sender);
28 |
29 | /// @dev Event log for deploying vault
30 | /// @param _vault Address of the vault
31 | /// @param _token Address of the token
32 | /// @param _id Id of the token
33 | event VaultDeployed(
34 | address indexed _vault,
35 | address indexed _token,
36 | uint256 _id
37 | );
38 |
39 | function burn(address _from, uint256 _value) external;
40 |
41 | function create(
42 | bytes32 _merkleRoot,
43 | address[] memory _plugins,
44 | bytes4[] memory _selectors
45 | ) external returns (address vault);
46 |
47 | function createCollection(
48 | bytes32 _merkleRoot,
49 | address[] memory _plugins,
50 | bytes4[] memory _selectors
51 | ) external returns (address vault, address token);
52 |
53 | function createCollectionFor(
54 | bytes32 _merkleRoot,
55 | address _controller,
56 | address[] memory _plugins,
57 | bytes4[] memory _selectors
58 | ) external returns (address vault, address token);
59 |
60 | function createFor(
61 | bytes32 _merkleRoot,
62 | address _owner,
63 | address[] memory _plugins,
64 | bytes4[] memory _selectors
65 | ) external returns (address vault);
66 |
67 | function createInCollection(
68 | bytes32 _merkleRoot,
69 | address _token,
70 | address[] memory _plugins,
71 | bytes4[] memory _selectors
72 | ) external returns (address vault);
73 |
74 | function factory() external view returns (address);
75 |
76 | function fNFT() external view returns (address);
77 |
78 | function fNFTImplementation() external view returns (address);
79 |
80 | function mint(address _to, uint256 _value) external;
81 |
82 | function nextId(address) external view returns (uint256);
83 |
84 | function totalSupply(address _vault) external view returns (uint256);
85 |
86 | function uri(address _vault) external view returns (string memory);
87 |
88 | function vaultToToken(address)
89 | external
90 | view
91 | returns (address token, uint256 id);
92 | }
93 |
--------------------------------------------------------------------------------
/src/mocks/MockERC1155.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity 0.8.13;
3 |
4 | import {ERC1155} from "@rari-capital/solmate/src/tokens/ERC1155.sol";
5 |
6 | contract MockERC1155 is ERC1155 {
7 | function uri(uint256) public pure virtual override returns (string memory) {
8 | return "";
9 | }
10 |
11 | function mint(
12 | address to,
13 | uint256 id,
14 | uint256 amount,
15 | bytes memory data
16 | ) public virtual {
17 | _mint(to, id, amount, data);
18 | }
19 |
20 | function batchMint(
21 | address to,
22 | uint256[] memory ids,
23 | uint256[] memory amounts,
24 | bytes memory data
25 | ) public virtual {
26 | _batchMint(to, ids, amounts, data);
27 | }
28 |
29 | function burn(
30 | address from,
31 | uint256 id,
32 | uint256 amount
33 | ) public virtual {
34 | _burn(from, id, amount);
35 | }
36 |
37 | function batchBurn(
38 | address from,
39 | uint256[] memory ids,
40 | uint256[] memory amounts
41 | ) public virtual {
42 | _batchBurn(from, ids, amounts);
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/src/mocks/MockERC20.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity 0.8.13;
3 |
4 | import "@rari-capital/solmate/src/tokens/ERC20.sol";
5 |
6 | contract MockERC20 is ERC20 {
7 | constructor() ERC20("TEST_Token", "TEST", 18) {}
8 |
9 | function mint(address to, uint256 amount) public virtual {
10 | _mint(to, amount);
11 | }
12 |
13 | function burn(address from, uint256 amount) public virtual {
14 | _burn(from, amount);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/mocks/MockERC721.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity 0.8.13;
3 |
4 | import "@rari-capital/solmate/src/tokens/ERC721.sol";
5 |
6 | contract MockERC721 is ERC721 {
7 | constructor() ERC721("TEST_Token", "TEST") {}
8 |
9 | function tokenURI(uint256)
10 | public
11 | pure
12 | virtual
13 | override
14 | returns (string memory)
15 | {
16 | return "";
17 | }
18 |
19 | function mint(address to, uint256 tokenId) public virtual {
20 | _mint(to, tokenId);
21 | }
22 |
23 | function burn(uint256 tokenId) public virtual {
24 | _burn(tokenId);
25 | }
26 |
27 | function safeMint(address to, uint256 tokenId) public virtual {
28 | _safeMint(to, tokenId);
29 | }
30 |
31 | function safeMint(
32 | address to,
33 | uint256 tokenId,
34 | bytes memory data
35 | ) public virtual {
36 | _safeMint(to, tokenId, data);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/mocks/MockEthReceiver.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity 0.8.13;
3 |
4 | contract MockEthReceiver {
5 | receive() external payable {}
6 | }
7 |
8 | contract MockEthNotReceiver {
9 | receive() external payable {
10 | revert();
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/mocks/MockModule.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity 0.8.13;
3 |
4 | import "../interfaces/IModule.sol";
5 | import {Permission} from "../interfaces/IVaultRegistry.sol";
6 |
7 | contract MockModule is IModule {
8 | function getPermissions()
9 | external
10 | pure
11 | returns (Permission[] memory permissions)
12 | {
13 | permissions = new Permission[](1);
14 | permissions[0] = Permission(address(1), address(1), 0x0);
15 | }
16 |
17 | function getLeafNodes() external pure returns (bytes32[] memory nodes) {
18 | nodes = new bytes32[](1);
19 | Permission[] memory permissions = new Permission[](1);
20 | permissions[0] = Permission(address(1), address(1), 0x0);
21 | nodes[0] = keccak256(abi.encode(permissions[0]));
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/mocks/MockPermitter.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity 0.8.13;
3 |
4 | import "../utils/SelfPermit.sol";
5 |
6 | contract MockPermitter is SelfPermit {}
7 |
--------------------------------------------------------------------------------
/src/mocks/MockSender.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: Unlicense
2 | pragma solidity 0.8.13;
3 |
4 | import {SafeSend} from "../utils/SafeSend.sol";
5 |
6 | contract MockSender is SafeSend {
7 | function sendEthOrWeth(address to, uint256 value) external {
8 | _sendEthOrWeth(to, value);
9 | }
10 |
11 | receive() external payable {}
12 | }
13 |
--------------------------------------------------------------------------------
/src/modules/Minter.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity 0.8.13;
3 |
4 | import {IMinter} from "../interfaces/IMinter.sol";
5 | import {ISupply} from "../interfaces/ISupply.sol";
6 | import {IVault} from "../interfaces/IVault.sol";
7 | import {Permission} from "../interfaces/IVaultRegistry.sol";
8 |
9 | /// @title Minter
10 | /// @author Fractional Art
11 | /// @notice Module contract for minting a fixed supply of fractions
12 | contract Minter is IMinter {
13 | /// @notice Address of Supply target contract
14 | address public supply;
15 |
16 | /// @notice Initializes supply target contract
17 | constructor(address _supply) {
18 | supply = _supply;
19 | }
20 |
21 | /// @notice Gets the list of leaf nodes used to generate a merkle tree
22 | /// @dev Leaf nodes are hashed permissions of the merkle tree
23 | /// @return nodes A list of leaf nodes
24 | function getLeafNodes() external view returns (bytes32[] memory nodes) {
25 | nodes = new bytes32[](1);
26 | nodes[0] = keccak256(abi.encode(getPermissions()[0]));
27 | }
28 |
29 | /// @notice Gets the list of permissions installed on a vault
30 | /// @dev Permissions consist of a module contract, target contract, and function selector
31 | /// @return permissions A list of Permission Structs
32 | function getPermissions()
33 | public
34 | view
35 | returns (Permission[] memory permissions)
36 | {
37 | permissions = new Permission[](1);
38 | permissions[0] = Permission(
39 | address(this),
40 | supply,
41 | ISupply.mint.selector
42 | );
43 | }
44 |
45 | /// @notice Mints a fraction supply
46 | /// @param _vault Address of the Vault
47 | /// @param _to Address of the receiver of fractions
48 | /// @param _fractionSupply Number of NFT Fractions minted to control the vault
49 | /// @param _mintProof List of proofs to execute a mint function
50 | function _mintFractions(
51 | address _vault,
52 | address _to,
53 | uint256 _fractionSupply,
54 | bytes32[] calldata _mintProof
55 | ) internal {
56 | bytes memory data = abi.encodeCall(
57 | ISupply.mint,
58 | (_to, _fractionSupply)
59 | );
60 | IVault(payable(_vault)).execute(supply, data, _mintProof);
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/src/references/SupplyReference.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity 0.8.13;
3 |
4 | import {ISupply} from "../interfaces/ISupply.sol";
5 | import {IVaultRegistry} from "../interfaces/IVaultRegistry.sol";
6 |
7 | /// @title Supply
8 | /// @author Fractional Art
9 | /// @notice Reference implementation for the optimized Supply target contract
10 | contract SupplyReference is ISupply {
11 | /// @notice Address of VaultRegistry contract
12 | address immutable registry;
13 |
14 | /// @notice Initializes address of registry contract
15 | constructor(address _registry) {
16 | registry = _registry;
17 | }
18 |
19 | /// @notice Mints fractional tokens
20 | /// @param _to Target address
21 | /// @param _value Transfer amount
22 | function mint(address _to, uint256 _value) external {
23 | IVaultRegistry(registry).mint(_to, _value);
24 | }
25 |
26 | /// @notice Burns fractional tokens
27 | /// @param _from Source address
28 | /// @param _value Burn amount
29 | function burn(address _from, uint256 _value) external {
30 | IVaultRegistry(registry).burn(_from, _value);
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/references/TransferReference.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity 0.8.13;
3 |
4 | import {IERC20} from "../interfaces/IERC20.sol";
5 | import {IERC721} from "../interfaces/IERC721.sol";
6 | import {IERC1155} from "../interfaces/IERC1155.sol";
7 | import {ITransfer} from "../interfaces/ITransfer.sol";
8 |
9 | /// @title Transfer
10 | /// @author Fractional Art
11 | /// @notice Reference implementation for the optimized Transfer target contract
12 | contract TransferReference is ITransfer {
13 | /// @notice Transfers an ERC-20 token
14 | /// @param _token Address of the token
15 | /// @param _to Target address
16 | /// @param _value Transfer amount
17 | function ERC20Transfer(
18 | address _token,
19 | address _to,
20 | uint256 _value
21 | ) external {
22 | IERC20(_token).transfer(_to, _value);
23 | }
24 |
25 | /// @notice Transfers an ERC-721 token
26 | /// @param _token Address of the token
27 | /// @param _from Source address
28 | /// @param _to Target address
29 | /// @param _tokenId ID of the token
30 | function ERC721TransferFrom(
31 | address _token,
32 | address _from,
33 | address _to,
34 | uint256 _tokenId
35 | ) external {
36 | IERC721(_token).safeTransferFrom(_from, _to, _tokenId);
37 | }
38 |
39 | /// @notice Transfers an ERC-1155 token
40 | /// @param _token Address of the token
41 | /// @param _from Source address
42 | /// @param _to Target address
43 | /// @param _id ID of the token type
44 | /// @param _value Transfer amount
45 | function ERC1155TransferFrom(
46 | address _token,
47 | address _from,
48 | address _to,
49 | uint256 _id,
50 | uint256 _value
51 | ) external {
52 | IERC1155(_token).safeTransferFrom(_from, _to, _id, _value, "");
53 | }
54 |
55 | /// @notice Batch transfers multiple ERC-1155 tokens
56 | /// @param _token Address of the token
57 | /// @param _from Source address
58 | /// @param _to Target address
59 | /// @param _ids IDs of each token type
60 | /// @param _values Transfer amounts per token type
61 | function ERC1155BatchTransferFrom(
62 | address _token,
63 | address _from,
64 | address _to,
65 | uint256[] calldata _ids,
66 | uint256[] calldata _values
67 | ) external {
68 | IERC1155(_token).safeBatchTransferFrom(_from, _to, _ids, _values, "");
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/src/utils/Metadata.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity 0.8.13;
3 |
4 | import {IFERC1155} from "../interfaces/IFERC1155.sol";
5 |
6 | /// @title Metadata
7 | /// @author Fractional Art
8 | /// @notice Utility contract for storing metadata of an FERC1155 token
9 | contract Metadata {
10 | /// @notice Address of FERC1155 token contract
11 | address immutable token;
12 | /// @dev Mapping of ID type to URI of metadata
13 | mapping(uint256 => string) private tokenMetadata;
14 |
15 | /// @notice Initializes token contract
16 | constructor(address _token) {
17 | token = _token;
18 | }
19 |
20 | /// @notice Sets the metadata of a given token ID type
21 | /// @dev Can only be set by the token controller
22 | /// @param _uri URI of the token metadata
23 | /// @param _id ID of the token type
24 | function setURI(uint256 _id, string memory _uri) external {
25 | address controller = IFERC1155(token).controller();
26 | if (msg.sender != controller)
27 | revert IFERC1155.InvalidSender(controller, msg.sender);
28 |
29 | tokenMetadata[_id] = _uri;
30 | IFERC1155(token).emitSetURI(_id, _uri);
31 | }
32 |
33 | /// @notice Gets the metadata of a token ID type
34 | /// @param _id ID of the token type
35 | /// @return URI of the token metadata
36 | function uri(uint256 _id) public view returns (string memory) {
37 | return tokenMetadata[_id];
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/utils/Multicall.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity 0.8.13;
3 |
4 | /// @title Multicall
5 | /// @author Modified from Uniswap (https://github.com/Uniswap/v3-periphery/blob/main/contracts/base/Multicall.sol)
6 | /// @notice Utility contract that enables calling multiple local methods in a single call
7 | abstract contract Multicall {
8 | /// @notice Allows multiple function calls within a contract that inherits from it
9 | /// @param _data List of encoded function calls to make in this contract
10 | /// @return results List of return responses for each encoded call passed
11 | function multicall(bytes[] calldata _data)
12 | external
13 | returns (bytes[] memory results)
14 | {
15 | uint256 length = _data.length;
16 | results = new bytes[](length);
17 |
18 | bool success;
19 | for (uint256 i; i < length; ) {
20 | bytes memory result;
21 | (success, result) = address(this).delegatecall(_data[i]);
22 | if (!success) {
23 | if (result.length == 0) revert();
24 | // If there is return data and the call wasn't successful, the call reverted with a reason or a custom error.
25 | _revertedWithReason(result);
26 | }
27 |
28 | results[i] = result;
29 |
30 | // cannot realistically overflow on human timescales
31 | unchecked {
32 | ++i;
33 | }
34 | }
35 | }
36 |
37 | /// @notice Handles function for revert responses
38 | /// @param _response Reverted return response from a delegate call
39 | function _revertedWithReason(bytes memory _response) internal pure {
40 | assembly {
41 | let returndata_size := mload(_response)
42 | revert(add(32, _response), returndata_size)
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/src/utils/NFTReceiver.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity 0.8.13;
3 |
4 | import {ERC721TokenReceiver} from "@rari-capital/solmate/src/tokens/ERC721.sol";
5 | import {ERC1155TokenReceiver} from "@rari-capital/solmate/src/tokens/ERC1155.sol";
6 |
7 | /// @title NFT Receiver
8 | /// @author Fractional Art
9 | /// @notice Plugin contract for handling receipts of non-fungible tokens
10 | contract NFTReceiver is ERC721TokenReceiver, ERC1155TokenReceiver {
11 | /// @notice Handles the receipt of a single ERC721 token
12 | function onERC721Received(
13 | address,
14 | address,
15 | uint256,
16 | bytes calldata
17 | ) external virtual override returns (bytes4) {
18 | return ERC721TokenReceiver.onERC721Received.selector;
19 | }
20 |
21 | /// @notice Handles the receipt of a single ERC1155 token type
22 | function onERC1155Received(
23 | address,
24 | address,
25 | uint256,
26 | uint256,
27 | bytes calldata
28 | ) external virtual override returns (bytes4) {
29 | return ERC1155TokenReceiver.onERC1155Received.selector;
30 | }
31 |
32 | /// @notice Handles the receipt of multiple ERC1155 token types
33 | function onERC1155BatchReceived(
34 | address,
35 | address,
36 | uint256[] calldata,
37 | uint256[] calldata,
38 | bytes calldata
39 | ) external virtual override returns (bytes4) {
40 | return ERC1155TokenReceiver.onERC1155BatchReceived.selector;
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/src/utils/SafeSend.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity 0.8.13;
3 |
4 | import {WETH} from "@rari-capital/solmate/src/tokens/WETH.sol";
5 |
6 | /// @title SafeSend
7 | /// @author Fractional Art
8 | /// @notice Utility contract for sending Ether or WETH value to an address
9 | abstract contract SafeSend {
10 | /// @notice Address for WETH contract on mainnet
11 | address payable public constant WETH_ADDRESS =
12 | payable(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2);
13 |
14 | /// @notice Attempts to send ether to an address
15 | /// @param _to Address attemping to send to
16 | /// @param _value Amount to send
17 | /// @return success Status of transfer
18 | function _attemptETHTransfer(address _to, uint256 _value)
19 | internal
20 | returns (bool success)
21 | {
22 | assembly {
23 | success := call(gas(), _to, _value, 0, 0, 0, 0)
24 | }
25 | }
26 |
27 | /// @notice Sends eth or weth to an address
28 | /// @param _to Address to send to
29 | /// @param _value Amount to send
30 | function _sendEthOrWeth(address _to, uint256 _value) internal {
31 | if (!_attemptETHTransfer(_to, _value)) {
32 | WETH(WETH_ADDRESS).deposit{value: _value}();
33 | WETH(WETH_ADDRESS).transfer(_to, _value);
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/src/utils/SelfPermit.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity 0.8.13;
3 |
4 | import {IFERC1155} from "../interfaces/IFERC1155.sol";
5 |
6 | /// @title SelfPermit
7 | /// @author Modified from Uniswap (https://github.com/Uniswap/v3-periphery/blob/main/contracts/base/SelfPermit.sol)
8 | /// @notice Utility contract for executing a permit signature to update the approval status in an FERC1155 contract
9 | abstract contract SelfPermit {
10 | /// @notice Caller executes permit using their own signature for an ID type of an ERC1155 token
11 | /// @param _token Address of ERC1155 token contract
12 | /// @param _id ID type being approved
13 | /// @param _approved Approval status for the token
14 | /// @param _deadline Deadline for when the signature expires
15 | /// @param _v The recovery ID (129th byte and chain ID) of the signature used to recover the signer
16 | /// @param _r The first 64 bytes of the signature
17 | /// @param _s Bytes 64-128 of the signature
18 | function selfPermit(
19 | address _token,
20 | uint256 _id,
21 | bool _approved,
22 | uint256 _deadline,
23 | uint8 _v,
24 | bytes32 _r,
25 | bytes32 _s
26 | ) public {
27 | IFERC1155(_token).permit(
28 | msg.sender,
29 | address(this),
30 | _id,
31 | _approved,
32 | _deadline,
33 | _v,
34 | _r,
35 | _s
36 | );
37 | }
38 |
39 | /// @notice Caller executes permit using their own signature for all ID types of an ERC1155 token
40 | /// @param _token Address of ERC1155 token contract
41 | /// @param _approved Approval status for the token
42 | /// @param _deadline Deadline for when the signature expires
43 | /// @param _v The recovery ID (129th byte and chain ID) of the signature used to recover the signer
44 | /// @param _r The first 64 bytes of the signature
45 | /// @param _s Bytes 64-128 of the signature
46 | function selfPermitAll(
47 | address _token,
48 | bool _approved,
49 | uint256 _deadline,
50 | uint8 _v,
51 | bytes32 _r,
52 | bytes32 _s
53 | ) public {
54 | IFERC1155(_token).permitAll(
55 | msg.sender,
56 | address(this),
57 | _approved,
58 | _deadline,
59 | _v,
60 | _r,
61 | _s
62 | );
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/test/SafeSend.t.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: Unlicense
2 | pragma solidity 0.8.13;
3 |
4 | import "./TestUtil.sol";
5 | import {MockSender} from "../src/mocks/MockSender.sol";
6 | import {MockEthReceiver, MockEthNotReceiver} from "../src/mocks/MockEthReceiver.sol";
7 |
8 | contract SafeSendTest is TestUtil {
9 | MockSender sender;
10 | MockEthReceiver ethReceiver;
11 | MockEthNotReceiver wethReceiver;
12 |
13 | /// =================
14 | /// ===== SETUP =====
15 | /// =================
16 | function setUp() public {
17 | setUpWETH();
18 | sender = new MockSender();
19 | ethReceiver = new MockEthReceiver();
20 | wethReceiver = new MockEthNotReceiver();
21 |
22 | vm.deal(address(sender), 10 ether);
23 | vm.label(address(sender), "SafeSend");
24 | vm.label(address(ethReceiver), "EthReceiver");
25 | vm.label(address(wethReceiver), "WETHReceiver");
26 | }
27 |
28 | function testSendEth() public {
29 | sender.sendEthOrWeth(address(ethReceiver), 10 ether);
30 | }
31 |
32 | function testSendWETH() public {
33 | sender.sendEthOrWeth(address(wethReceiver), 10 ether);
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/test/VaultFactory.t.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: Unlicense
2 | pragma solidity 0.8.13;
3 |
4 | import "./TestUtil.sol";
5 |
6 | contract VaultFactoryTest is TestUtil {
7 | uint256 seed_1;
8 | uint256 seed_2;
9 | uint256 seed_3;
10 | address predicted_1;
11 | address predicted_2;
12 | address actual_1;
13 | address actual_2;
14 |
15 | function setUp() public {
16 | setUpContract();
17 | }
18 |
19 | function checkNextCreate2Helper(address who)
20 | public
21 | view
22 | returns (uint256, address)
23 | {
24 | bytes32 seed = IVaultFactory(factory).getNextSeed(who);
25 | return (uint256(seed), IVaultFactory(factory).getNextAddress(who));
26 | }
27 |
28 | function testDeploy() public {
29 | factory = registry.factory();
30 | (seed_1, predicted_1) = checkNextCreate2Helper(tx.origin);
31 | actual_1 = IVaultFactory(factory).deploy();
32 | (seed_2, ) = checkNextCreate2Helper(tx.origin);
33 | assertEq(seed_2, seed_1 + 1);
34 | assertEq(predicted_1, actual_1);
35 | }
36 |
37 | function testDeploy(address who) public {
38 | factory = registry.factory();
39 | (seed_1, predicted_1) = checkNextCreate2Helper(who);
40 | vm.startPrank(who, who);
41 | actual_1 = IVaultFactory(factory).deploy();
42 | vm.stopPrank();
43 | (seed_2, predicted_2) = checkNextCreate2Helper(who);
44 | vm.startPrank(who, who);
45 | actual_2 = IVaultFactory(factory).deploy();
46 | vm.stopPrank();
47 |
48 | (seed_3, ) = checkNextCreate2Helper(who);
49 | assertEq(seed_2, seed_1 + 1);
50 | assertEq(predicted_1, actual_1);
51 | assertEq(seed_3, seed_2 + 1);
52 | assertEq(predicted_2, actual_2);
53 | }
54 |
55 | function testDeployFor(address who) public {
56 | factory = registry.factory();
57 | (seed_1, predicted_1) = checkNextCreate2Helper(who);
58 | vm.startPrank(who, who);
59 | actual_1 = IVaultFactory(factory).deployFor(address(this));
60 | vm.stopPrank();
61 | (seed_2, predicted_2) = checkNextCreate2Helper(who);
62 | vm.startPrank(who, who);
63 | actual_2 = IVaultFactory(factory).deployFor(address(this));
64 | vm.stopPrank();
65 |
66 | (seed_3, ) = checkNextCreate2Helper(who);
67 | assertEq(seed_2, seed_1 + 1);
68 | assertEq(predicted_1, actual_1);
69 | assertEq(seed_3, seed_2 + 1);
70 | assertEq(predicted_2, actual_2);
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/test/VaultRegistry.t.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: Unlicense
2 | pragma solidity 0.8.13;
3 |
4 | import "./TestUtil.sol";
5 |
6 | contract VaultRegistryTest is TestUtil {
7 | /// =================
8 | /// ===== SETUP =====
9 | /// =================
10 | function setUp() public {
11 | setUpContract();
12 | alice = setUpUser(111, 1);
13 | bob = setUpUser(222, 2);
14 | setUpCreateFor(alice);
15 | (nftReceiverSelectors, nftReceiverPlugins) = initializeNFTReceiver();
16 |
17 | vm.label(address(this), "VaultRegistryTest");
18 | vm.label(alice.addr, "Alice");
19 | vm.label(bob.addr, "Bob");
20 | }
21 |
22 | /// ========================
23 | /// ===== CREATE VAULT =====
24 | /// ========================
25 | function testCreate() public {
26 | vault = alice.registry.create(
27 | merkleRoot,
28 | nftReceiverPlugins,
29 | nftReceiverSelectors
30 | );
31 | token = registry.fNFT();
32 | setUpFERC1155(alice, token);
33 |
34 | assertEq(IVault(vault).owner(), address(registry));
35 | assertEq(fERC1155.controller(), address(this));
36 | }
37 |
38 | function testCreateFor() public {
39 | vault = alice.registry.createFor(
40 | merkleRoot,
41 | alice.addr,
42 | nftReceiverPlugins,
43 | nftReceiverSelectors
44 | );
45 | token = registry.fNFT();
46 | setUpFERC1155(alice, token);
47 |
48 | assertEq(IVault(vault).owner(), alice.addr);
49 | assertEq(fERC1155.controller(), address(this));
50 | }
51 |
52 | function testCreateCollection() public {
53 | (vault, token) = alice.registry.createCollection(
54 | merkleRoot,
55 | nftReceiverPlugins,
56 | nftReceiverSelectors
57 | );
58 |
59 | assertEq(IVault(vault).owner(), address(registry));
60 | assertEq(IFERC1155(token).controller(), alice.addr);
61 | }
62 |
63 | function testCreateCollectionFor() public {
64 | (vault, token) = alice.registry.createCollectionFor(
65 | merkleRoot,
66 | bob.addr,
67 | nftReceiverPlugins,
68 | nftReceiverSelectors
69 | );
70 |
71 | assertEq(IVault(vault).owner(), address(registry));
72 | assertEq(IFERC1155(token).controller(), bob.addr);
73 | }
74 |
75 | function testCreateInCollection() public {
76 | testCreateCollectionFor();
77 |
78 | vault = bob.registry.createInCollection(
79 | merkleRoot,
80 | token,
81 | nftReceiverPlugins,
82 | nftReceiverSelectors
83 | );
84 |
85 | assertEq(IVault(vault).owner(), address(registry));
86 | assertEq(IFERC1155(token).controller(), bob.addr);
87 | }
88 |
89 | function testCreateInCollectionRevertNotController() public {
90 | token = registry.fNFT();
91 | vm.expectRevert(
92 | abi.encodeWithSelector(
93 | IVaultRegistry.InvalidController.selector,
94 | address(this),
95 | bob.addr
96 | )
97 | );
98 | bob.registry.createInCollection(
99 | merkleRoot,
100 | token,
101 | nftReceiverPlugins,
102 | nftReceiverSelectors
103 | );
104 | }
105 | }
106 |
--------------------------------------------------------------------------------