Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
43590b2
separate exercise & add tests
lookeey Nov 11, 2023
93dda5d
forge install: v3-core
lookeey Nov 13, 2023
a29b4ae
begin adding fees to base exercise
imrtlfarm Nov 18, 2023
dc94d13
delete IERC20.sol
imrtlfarm Nov 18, 2023
b49b349
change fee fees in discount exercsise
imrtlfarm Nov 18, 2023
1ec57ad
add univ3 oracle
lookeey Nov 21, 2023
5ea8c6f
review 1
lookeey Nov 28, 2023
8d146d7
add thena oracle
lookeey Nov 28, 2023
51135d0
review 1
lookeey Nov 28, 2023
0fed3d3
review 1
lookeey Nov 29, 2023
d84496c
increase coverage
lookeey Nov 29, 2023
42abf16
fix test address
lookeey Dec 1, 2023
e8e2db9
remove console import, optimize variables
lookeey Dec 1, 2023
296b526
feat/test: balancer oracle tests and target token
lookeey Dec 12, 2023
598f066
remove unnecessary function
lookeey Dec 12, 2023
ea56289
change pool used for tests
lookeey Dec 13, 2023
34eaf89
improve/fix tests
lookeey Dec 15, 2023
c63565b
improve tests, revert on minPrice
lookeey Dec 15, 2023
448e7ab
review 2
lookeey Dec 15, 2023
940c974
revert on min price, fix tests
lookeey Dec 15, 2023
7cdfa45
Merge branch 'feat/modularExercise' into feeSplit
lookeey Dec 15, 2023
3c47df8
account full fees, add tests
lookeey Dec 15, 2023
588852b
improve interfaces
lookeey Dec 28, 2023
b608271
Merge branch 'feat/modularExercise' into feat/balancerOracle
lookeey Dec 28, 2023
c72943a
Merge pull request #5 from Byte-Masons/feat/balancerOracle
lookeey Dec 28, 2023
03ce566
move multiplier to exercise
lookeey Dec 28, 2023
c8a79da
forge install: openzeppelin-contracts-upgradeable
lookeey Dec 28, 2023
e045183
forge install: openzeppelin-contracts
lookeey Dec 28, 2023
8b1fb71
make upgradeable
lookeey Dec 28, 2023
4abd581
fix errors
lookeey Jan 1, 2024
0f9e584
fix tests
lookeey Jan 2, 2024
2303174
Merge branch 'feat/modularExercise' into feeSplit
lookeey Jan 2, 2024
0900b00
Merge pull request #4 from Byte-Masons/feeSplit
lookeey Jan 2, 2024
bbcdd92
Merge branch 'feat/modularExercise' into feat/univ3Oracle
lookeey Jan 2, 2024
a5ca747
remove multiplier
lookeey Jan 2, 2024
a1fc7ca
Merge pull request #1 from Byte-Masons/feat/modularExercise
lookeey Jan 2, 2024
3c3d756
Merge pull request #2 from Byte-Masons/feat/univ3Oracle
lookeey Jan 2, 2024
1c6368b
remove multiplier
lookeey Jan 2, 2024
f577727
Merge branch 'main' into feat/thenaOracle
lookeey Jan 2, 2024
8e99e4d
Merge pull request #3 from Byte-Masons/feat/thenaOracle
lookeey Jan 2, 2024
6820250
add helper paymentAmount function
lookeey Jan 2, 2024
62a036d
remove unused parameter
lookeey Jan 2, 2024
b5c11d0
forge install: openzeppelin-contracts
lookeey Jan 2, 2024
990e2ed
forge install: openzeppelin-contracts-upgradeable
lookeey Jan 2, 2024
92948fa
downgrade to oz-v4
lookeey Jan 2, 2024
4753ad1
use oz IERC20 for compatibility
lookeey Jan 2, 2024
f17c0e9
add hardhat deployment scripts
lookeey Jan 9, 2024
4c43d93
minor fixes
lookeey Jan 9, 2024
68d0272
remove unnecessary casting
lookeey Jan 9, 2024
0ab0dc3
forge: fmt
lookeey Jan 9, 2024
0406f46
format more
imrtlfarm Jan 11, 2024
1075484
Update README.md
imrtlfarm Jan 11, 2024
4ebc890
Merge pull request #6 from Byte-Masons/final-fmt
imrtlfarm Jan 11, 2024
9aa8a91
audit review
lookeey Jan 23, 2024
40797fb
forge install: tarot-price-oracle
xrave110 Feb 1, 2024
4d36188
bsc deployment
lookeey Feb 5, 2024
9e87a0b
Add algebra oracle
lookeey Feb 20, 2024
bcb973a
Merge pull request #7 from Byte-Masons/feat/algebraOracle
imrtlfarm Feb 21, 2024
de55775
Simple instant exit feature
xrave110 Jun 7, 2024
016ca86
Zapping feature with tests
xrave110 Jun 18, 2024
b7e5e4c
Comments and refactor
xrave110 Jun 20, 2024
a6abd70
InstantExit working on optimism
xrave110 Jun 23, 2024
14c3857
Additional comments
xrave110 Jun 24, 2024
a8a0c17
Merged algebra oracle and added new improvements
xrave110 Jun 24, 2024
14f0215
Improvements after review
xrave110 Jun 28, 2024
1293670
Changed way of setting swap properties
xrave110 Jul 1, 2024
4d72c28
Working integration on Mode
xrave110 Jul 1, 2024
6d8c60a
Changes for deployment
xrave110 Jul 3, 2024
8d795ca
Changes after review
xrave110 Jul 5, 2024
7088720
Checklist update
xrave110 Jul 5, 2024
07d538f
Changes after review
xrave110 Jul 5, 2024
7b1d459
Deployment, readme and static analysis updates
xrave110 Jul 9, 2024
671ce4d
Readme updates
xrave110 Jul 10, 2024
364e3ff
Added access control only for strategies in OptionsCompounder
xrave110 Jul 11, 2024
201bbde
Updates after internal review
xrave110 Jul 12, 2024
6f8a4c3
Merge pull request #9 from Byte-Masons/feat/instantExit
xrave110 Jul 17, 2024
ca05fa4
Merge branch 'main' into OptionsCompounderIntegration
xrave110 Jul 17, 2024
94675e8
Upgrading deployment scripts
xrave110 Jul 17, 2024
a71d00b
OptionsCompounder
xrave110 Jul 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 2 additions & 13 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
# Network and account info
RPC_URL_MAINNET=XXX
RPC_URL_GOERLI=XXX
BSC_RPC_URL=XXX
OPTIMISM_RPC_URL=XXX

PRIVATE_KEY=XXX

ETHERSCAN_KEY=XXX

# Deploy configs
VERSION="1.0.0"
OWNER=XXX
TREASURY=XXX

BALANCER_POOL=XXX # 20-80 WETH-LIT pool
ORACLE_MULTIPLIER=XXX # 4 decimals
ORACLE_SECS=XXX
ORACLE_AGO=XXX
ORACLE_MIN_PRICE=XXX # 18 decimals

OT_NAME="LIT Call Option Token"
OT_SYMBOL="oLIT"
OT_PAYMENT_TOKEN=0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 # WETH
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,12 @@ out/

# Dotenv file
.env

# Hardhat
node_modules/
artifacts/
cache_hardhat/
typechain-types/

*settings.json

26 changes: 20 additions & 6 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
[submodule "lib/forge-std"]
path = lib/forge-std
url = https://github.com/foundry-rs/forge-std
path = lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "lib/solmate"]
path = lib/solmate
url = https://github.com/rari-capital/solmate
path = lib/solmate
url = https://github.com/rari-capital/solmate
[submodule "lib/create3-factory"]
path = lib/create3-factory
url = https://github.com/zeframlou/create3-factory
path = lib/create3-factory
url = https://github.com/zeframlou/create3-factory
[submodule "lib/v3-core"]
path = lib/v3-core
url = https://github.com/uniswap/v3-core
[submodule "lib/openzeppelin-contracts-upgradeable"]
path = lib/openzeppelin-contracts-upgradeable
url = https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable
branch = v4.9.6
[submodule "lib/openzeppelin-contracts"]
path = lib/openzeppelin-contracts
url = https://github.com/OpenZeppelin/openzeppelin-contracts
branch = v4.9.6
[submodule "lib/vault-v2"]
path = lib/vault-v2
url = https://github.com/Byte-Masons/vault-v2
205 changes: 205 additions & 0 deletions .openzeppelin/bsc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,205 @@
{
"manifestVersion": "3.2",
"proxies": [
{
"address": "0x45c19a3068642B98F5AEf1dEdE023443cd1FbFAd",
"txHash": "0xb0835bbacd616b635b6a1230e89a7d4f47fa5a4c55969a510d92b87d9b1367eb",
"kind": "uups"
}
],
"impls": {
"d568e812a589f8a8e8864a13f1ba9c178a5bf812de48e4764db703f702d1ec44": {
"address": "0xc79593C528d673f5Db0B8707115193FE1596aB34",
"txHash": "0xb0107c79caa671945a41ee8e6e6300a08081285e10d0e56233c7db3023df32b3",
"layout": {
"solcVersion": "0.8.19",
"storage": [
{
"label": "_initialized",
"offset": 0,
"slot": "0",
"type": "t_uint8",
"contract": "Initializable",
"src": "oz-upgradeable/proxy/utils/Initializable.sol:62",
"retypedFrom": "bool"
},
{
"label": "_initializing",
"offset": 1,
"slot": "0",
"type": "t_bool",
"contract": "Initializable",
"src": "oz-upgradeable/proxy/utils/Initializable.sol:67"
},
{
"label": "__gap",
"offset": 0,
"slot": "1",
"type": "t_array(t_uint256)50_storage",
"contract": "ContextUpgradeable",
"src": "oz-upgradeable/utils/ContextUpgradeable.sol:36"
},
{
"label": "_balances",
"offset": 0,
"slot": "51",
"type": "t_mapping(t_address,t_uint256)",
"contract": "ERC20Upgradeable",
"src": "oz-upgradeable/token/ERC20/ERC20Upgradeable.sol:37"
},
{
"label": "_allowances",
"offset": 0,
"slot": "52",
"type": "t_mapping(t_address,t_mapping(t_address,t_uint256))",
"contract": "ERC20Upgradeable",
"src": "oz-upgradeable/token/ERC20/ERC20Upgradeable.sol:39"
},
{
"label": "_totalSupply",
"offset": 0,
"slot": "53",
"type": "t_uint256",
"contract": "ERC20Upgradeable",
"src": "oz-upgradeable/token/ERC20/ERC20Upgradeable.sol:41"
},
{
"label": "_name",
"offset": 0,
"slot": "54",
"type": "t_string_storage",
"contract": "ERC20Upgradeable",
"src": "oz-upgradeable/token/ERC20/ERC20Upgradeable.sol:43"
},
{
"label": "_symbol",
"offset": 0,
"slot": "55",
"type": "t_string_storage",
"contract": "ERC20Upgradeable",
"src": "oz-upgradeable/token/ERC20/ERC20Upgradeable.sol:44"
},
{
"label": "__gap",
"offset": 0,
"slot": "56",
"type": "t_array(t_uint256)45_storage",
"contract": "ERC20Upgradeable",
"src": "oz-upgradeable/token/ERC20/ERC20Upgradeable.sol:400"
},
{
"label": "_owner",
"offset": 0,
"slot": "101",
"type": "t_address",
"contract": "OwnableUpgradeable",
"src": "oz-upgradeable/access/OwnableUpgradeable.sol:22"
},
{
"label": "__gap",
"offset": 0,
"slot": "102",
"type": "t_array(t_uint256)49_storage",
"contract": "OwnableUpgradeable",
"src": "oz-upgradeable/access/OwnableUpgradeable.sol:94"
},
{
"label": "__gap",
"offset": 0,
"slot": "151",
"type": "t_array(t_uint256)50_storage",
"contract": "ERC1967UpgradeUpgradeable",
"src": "oz-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:197"
},
{
"label": "__gap",
"offset": 0,
"slot": "201",
"type": "t_array(t_uint256)50_storage",
"contract": "UUPSUpgradeable",
"src": "oz-upgradeable/proxy/utils/UUPSUpgradeable.sol:107"
},
{
"label": "tokenAdmin",
"offset": 0,
"slot": "251",
"type": "t_address",
"contract": "OptionsToken",
"src": "src/OptionsToken.sol:45"
},
{
"label": "isExerciseContract",
"offset": 0,
"slot": "252",
"type": "t_mapping(t_address,t_bool)",
"contract": "OptionsToken",
"src": "src/OptionsToken.sol:47"
},
{
"label": "upgradeProposalTime",
"offset": 0,
"slot": "253",
"type": "t_uint256",
"contract": "OptionsToken",
"src": "src/OptionsToken.sol:48"
},
{
"label": "nextImplementation",
"offset": 0,
"slot": "254",
"type": "t_address",
"contract": "OptionsToken",
"src": "src/OptionsToken.sol:49"
}
],
"types": {
"t_address": {
"label": "address",
"numberOfBytes": "20"
},
"t_array(t_uint256)45_storage": {
"label": "uint256[45]",
"numberOfBytes": "1440"
},
"t_array(t_uint256)49_storage": {
"label": "uint256[49]",
"numberOfBytes": "1568"
},
"t_array(t_uint256)50_storage": {
"label": "uint256[50]",
"numberOfBytes": "1600"
},
"t_bool": {
"label": "bool",
"numberOfBytes": "1"
},
"t_mapping(t_address,t_bool)": {
"label": "mapping(address => bool)",
"numberOfBytes": "32"
},
"t_mapping(t_address,t_mapping(t_address,t_uint256))": {
"label": "mapping(address => mapping(address => uint256))",
"numberOfBytes": "32"
},
"t_mapping(t_address,t_uint256)": {
"label": "mapping(address => uint256)",
"numberOfBytes": "32"
},
"t_string_storage": {
"label": "string",
"numberOfBytes": "32"
},
"t_uint256": {
"label": "uint256",
"numberOfBytes": "32"
},
"t_uint8": {
"label": "uint8",
"numberOfBytes": "1"
}
},
"namespaces": {}
}
}
}
}
Loading