Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
511 commits
Select commit Hold shift + click to select a range
d43492e
Merge branch 'audit-fixes' into fix/33
apoorvlathey Aug 9, 2023
881a303
Merge pull request #25 from NFTX-project/fix/33
apoorvlathey Aug 9, 2023
e75dda3
Merge pull request #26 from NFTX-project/fix/21
apoorvlathey Aug 9, 2023
63345a3
Merge pull request #27 from NFTX-project/fix/27
apoorvlathey Aug 9, 2023
8533363
Merge pull request #36 from NFTX-project/fix/60
apoorvlathey Aug 9, 2023
4d98d18
Merge pull request #28 from NFTX-project/fix/30
apoorvlathey Aug 9, 2023
86b052a
Merge pull request #29 from NFTX-project/fix/37
apoorvlathey Aug 9, 2023
4613b41
Merge pull request #30 from NFTX-project/fix/31
apoorvlathey Aug 9, 2023
cafe86b
Merge pull request #31 from NFTX-project/fix/47
apoorvlathey Aug 9, 2023
2551c04
Merge pull request #42 from NFTX-project/fix/66
apoorvlathey Aug 9, 2023
7fccb0e
Merge branch 'audit-fixes' into fix/65
apoorvlathey Aug 9, 2023
1269ca4
Merge pull request #41 from NFTX-project/fix/65
apoorvlathey Aug 9, 2023
20b859d
Merge pull request #40 from NFTX-project/fix/54
apoorvlathey Aug 9, 2023
e4690c9
Merge branch 'audit-fixes' into fix/49
apoorvlathey Aug 9, 2023
de63465
Merge pull request #39 from NFTX-project/fix/49
apoorvlathey Aug 9, 2023
b92529c
Merge pull request #38 from NFTX-project/fix/50
apoorvlathey Aug 9, 2023
378fc2a
Merge pull request #37 from NFTX-project/fix/46
apoorvlathey Aug 9, 2023
c829c50
Merge pull request #35 from NFTX-project/fix/57
apoorvlathey Aug 9, 2023
8b5ce32
Merge pull request #33 from NFTX-project/fix/52
apoorvlathey Aug 9, 2023
5f08c27
Merge pull request #32 from NFTX-project/fix/48
apoorvlathey Aug 9, 2023
592b8b8
Merge pull request #49 from NFTX-project/fix/62
apoorvlathey Aug 9, 2023
31ff232
Merge pull request #50 from NFTX-project/fix/63
apoorvlathey Aug 9, 2023
c9dd5f4
Merge pull request #52 from NFTX-project/fix/20
apoorvlathey Aug 9, 2023
e3ac1b9
Merge pull request #51 from NFTX-project/fix/71
apoorvlathey Aug 9, 2023
e2edcb4
Merge pull request #46 from NFTX-project/fix/23
apoorvlathey Aug 9, 2023
a0c36b0
Merge pull request #43 from NFTX-project/fix/24
apoorvlathey Aug 9, 2023
495f8a5
Merge branch 'audit-fixes' into fix/42
apoorvlathey Aug 9, 2023
435988d
InventoryStakingV3: fix stack too deep
apoorvlathey Aug 9, 2023
dcf594e
update tests
apoorvlathey Aug 9, 2023
a333e76
Merge pull request #53 from NFTX-project/fix/42
apoorvlathey Aug 9, 2023
b41bbb0
Merge branch 'audit-fixes' into fix/51
apoorvlathey Aug 9, 2023
f44b92c
Merge pull request #48 from NFTX-project/fix/51
apoorvlathey Aug 9, 2023
88428fb
Merge branch 'audit-fixes' into fix/68
apoorvlathey Aug 9, 2023
4764e08
Merge pull request #45 from NFTX-project/fix/68
apoorvlathey Aug 9, 2023
371efe3
Merge branch 'audit-fixes' into fix/67
apoorvlathey Aug 9, 2023
e0e7e4c
Merge pull request #55 from NFTX-project/fix/67
apoorvlathey Aug 9, 2023
639afff
NFTXRouter: use is1155 to check NFT type
apoorvlathey Aug 9, 2023
b39b7a3
Merge branch 'audit-fixes' into fix/69
apoorvlathey Aug 9, 2023
3d1936d
Merge branch 'audit-fixes' into fix/28
apoorvlathey Aug 9, 2023
35ac97a
Merge branch 'audit-fixes' into fix/70
apoorvlathey Aug 9, 2023
ecb0da8
Merge branch 'audit-fixes' into fix/29
apoorvlathey Aug 9, 2023
0bd0cd6
Merge branch 'audit-fixes' into fix/43
apoorvlathey Aug 9, 2023
82cf2a2
NFTXRouter: use is1155 instead of amounts
apoorvlathey Aug 14, 2023
01ff2ec
getVTokenPremium1155: check holdings
apoorvlathey Aug 14, 2023
561c501
Merge pull request #24 from NFTX-project/fix/35
apoorvlathey Aug 14, 2023
e0c69a6
Merge pull request #60 from NFTX-project/fix/43
apoorvlathey Aug 14, 2023
d6ec6f1
Merge pull request #44 from NFTX-project/fix/69
apoorvlathey Aug 14, 2023
a912f8d
Merge branch 'audit-fixes' into fix/29
apoorvlathey Aug 14, 2023
cd809fb
Merge pull request #54 from NFTX-project/fix/70
apoorvlathey Aug 14, 2023
88b591a
fix missing _pointerIndex1155
apoorvlathey Aug 14, 2023
ff58292
Merge pull request #47 from NFTX-project/fix/28
apoorvlathey Aug 15, 2023
e9ae869
Merge pull request #59 from NFTX-project/fix/29
apoorvlathey Aug 15, 2023
236bf1d
Merge branch 'master' into audit-fixes
apoorvlathey Aug 16, 2023
7a54630
Merge pull request #63 from NFTX-project/audit-fixes
apoorvlathey Aug 16, 2023
e1e0253
add events for subgraph
apoorvlathey Aug 17, 2023
ac2cde1
InventoryStakingV3: remove duplicate positionVTokenShareBalance
apoorvlathey Aug 17, 2023
2e17d8f
NFTXVault: add depositor to events
apoorvlathey Aug 17, 2023
e9a0d02
MarketplaceZapV3: add wethFees to Sell event
apoorvlathey Aug 17, 2023
e15caf0
InventoryStakingV3: move tokenURI to InventoryStakingDescriptor
apoorvlathey Aug 18, 2023
76f727c
NFTXVault: move view fns getVTokenPremium721 & getVTokenPremium1155 t…
apoorvlathey Aug 18, 2023
1873c48
NFTXVaultFactory: add missing constant keyword
apoorvlathey Aug 18, 2023
e5f0bf4
goerli: fresh deployment
apoorvlathey Aug 18, 2023
fdd18c8
Merge pull request #64 from NFTX-project/subgraph-events
apoorvlathey Aug 18, 2023
5beaed7
Merge pull request #65 from NFTX-project/lower-contract-size
apoorvlathey Aug 18, 2023
e2e906f
Merge pull request #66 from NFTX-project/goerli-deploy
apoorvlathey Aug 18, 2023
9a8ada3
NFTXRouter: check owner in increaseLiq via permit
apoorvlathey Aug 22, 2023
9782039
Merge pull request #67 from NFTX-project/increaseLiq-permit-check-owner
apoorvlathey Aug 22, 2023
bbe62d9
Merge pull request #68 from NFTX-project/mock/RoyaltyNFT
apoorvlathey Aug 23, 2023
2fdd17e
Mock: create MockRoyalty1155
apoorvlathey Aug 23, 2023
c8a4b56
verify: BeaconProxy
apoorvlathey Aug 23, 2023
8c18c34
Mock: deploy multiple MockRoyalty
apoorvlathey Aug 23, 2023
7e976e8
MigratorZap: fix mint with 1155
apoorvlathey Aug 28, 2023
db87f14
MarketplaceZapV3: fix deductRoyalty1155 to use totalAmount
apoorvlathey Aug 28, 2023
a06c038
MarketplaceZapV3: fix deductRoyalty1155 to calculate royaltyToPay
apoorvlathey Aug 28, 2023
6a9d5f7
TransferLib: support cryptokitties
apoorvlathey Aug 28, 2023
209183f
MarketplaceZapV3: correctly account for wethSpent
apoorvlathey Aug 28, 2023
2d6130e
CreateVaultZap:set inventoryStaking forceTimelock to false
apoorvlathey Aug 28, 2023
4d6d4eb
MigratorZap: query vTokenV2 address from factory, instead of user input
apoorvlathey Aug 28, 2023
ee1c888
MarketplaceZapV3: add zero address check
apoorvlathey Aug 28, 2023
9ead672
MarketplaceZapV3: add vaultType check for 1155
apoorvlathey Aug 28, 2023
460e17c
MarketplaceZapV3: add custom error for insufficient weth for vault fees
apoorvlathey Aug 28, 2023
e46e680
MigratorZap: only swap fractional v2 vTokens if above a threshold
apoorvlathey Aug 28, 2023
737ecf5
CreateVaultZap: finalize vault at the end
apoorvlathey Aug 28, 2023
8e91945
MarketplaceZapV3: add vaultId to events
apoorvlathey Aug 28, 2023
bc21808
MarketplaceZapV3: add events for set functions
apoorvlathey Aug 28, 2023
2c32d08
NFTXRouter: fix SellNFTs event to emit nftCount
apoorvlathey Aug 28, 2023
f037ad4
Merge pull request #81 from NFTX-project/cfix/15
apoorvlathey Aug 28, 2023
979f36c
Merge pull request #80 from NFTX-project/cfix/6
apoorvlathey Aug 28, 2023
e81802a
Merge pull request #74 from NFTX-project/cfix/5
apoorvlathey Aug 28, 2023
4902b0b
Merge pull request #72 from NFTX-project/cfix/11
apoorvlathey Aug 28, 2023
2151727
Merge pull request #69 from NFTX-project/cfix/14
apoorvlathey Aug 28, 2023
d2e7aac
Merge pull request #75 from NFTX-project/cfix/13
apoorvlathey Aug 28, 2023
0c08fb1
Merge pull request #79 from NFTX-project/cfix/7
apoorvlathey Aug 28, 2023
01dba1a
Merge pull request #76 from NFTX-project/cfix/10
apoorvlathey Aug 28, 2023
f367e10
Merge pull request #71 from NFTX-project/cfix/4
apoorvlathey Aug 28, 2023
6dbf75e
Merge pull request #70 from NFTX-project/cfix/9
apoorvlathey Aug 28, 2023
6e0a264
Merge branch 'cantina-fixes' into cfix/8
apoorvlathey Aug 28, 2023
ad7117d
Merge pull request #73 from NFTX-project/cfix/8
apoorvlathey Aug 28, 2023
152ac3e
Merge branch 'cantina-fixes' into cfix/12
apoorvlathey Aug 28, 2023
dbea76f
Merge pull request #77 from NFTX-project/cfix/12
apoorvlathey Aug 28, 2023
fed28d1
Merge branch 'cantina-fixes' into cfix/16
apoorvlathey Aug 28, 2023
739c880
Merge pull request #78 from NFTX-project/cfix/16
apoorvlathey Aug 28, 2023
69e9fe3
Merge pull request #82 from NFTX-project/cantina-fixes
apoorvlathey Aug 28, 2023
ad77cf7
deploy updated Zaps
apoorvlathey Aug 28, 2023
89af1c5
gen addresses
apoorvlathey Aug 28, 2023
0a6fc97
move external interfaces
apoorvlathey Sep 5, 2023
a0f8cf3
fix:MarketplaceZap: insufficient weth error
apoorvlathey Sep 5, 2023
c3e5f8e
deploy: MarketplaceZap
apoorvlathey Sep 5, 2023
6113562
Merge pull request #83 from NFTX-project/external-interfaces
apoorvlathey Sep 5, 2023
ec8844a
VaultFactory: change netPremium to totalPremium
apoorvlathey Sep 8, 2023
e62659e
Merge pull request #84 from NFTX-project/total-premium
alexgausman Sep 8, 2023
1999cc3
update addresses.json
apoorvlathey Sep 11, 2023
514ccfc
update MockNFTs with base tokenURI
apoorvlathey Sep 11, 2023
bcb0fd2
deploy:sepolia
apoorvlathey Sep 15, 2023
c460839
Merge pull request #85 from NFTX-project/sepolia
apoorvlathey Sep 15, 2023
26e191c
NFTXFeeDistributorV3: set initial rewardFeeTier via constructor param
apoorvlathey Sep 15, 2023
38839af
update comment
apoorvlathey Sep 18, 2023
ac3a647
NFTXVaultFactory: use create2 to deploy vaults
apoorvlathey Sep 24, 2023
9d1b357
deploy: updated NFTXVaultFactory
apoorvlathey Sep 24, 2023
225bb08
Merge pull request #86 from NFTX-project/factory-create2
alexgausman Sep 25, 2023
df6c8fb
NFTXVaultFactory: remove unused events
apoorvlathey Oct 2, 2023
8f23295
fix: CreateVaultZap: send UniV3 position to the sender
apoorvlathey Oct 19, 2023
84fb5f9
update: uni-v3 diffs
apoorvlathey Oct 20, 2023
598e301
NFTXRouter: introduce 1 hour mandatory timelock, for adding liq with …
apoorvlathey Oct 31, 2023
ce730b3
Merge pull request #87 from NFTX-project/feat/increase-liq-base-timelock
alexgausman Oct 31, 2023
08331d4
NFTXRouter: add recipient param to addLiquidity
apoorvlathey Nov 1, 2023
a888db2
Merge pull request #88 from NFTX-project/feat/nftxrouter-add-recipien…
alexgausman Nov 2, 2023
3412cfb
deploy: updated NFTXRouter
apoorvlathey Nov 6, 2023
b2afb8d
CreateVaultZap: forceTimelock for inventory positions
apoorvlathey Nov 6, 2023
d0d4bbd
chore: CreateVaultZap Test: add calcTicks
apoorvlathey Nov 21, 2023
c09a88c
fix: CreateVaultZap: Allow to pass large upperNFTPrice without overflow
apoorvlathey Nov 21, 2023
1a61a9c
Merge pull request #89 from NFTX-project/fix/CreateVaultZap/UpperNFTP…
alexgausman Nov 21, 2023
e47ffa4
chore: CreateVaultZap Test: log position ticks & prices
apoorvlathey Nov 21, 2023
301fdd2
deploy: updated CreateVaultZap
apoorvlathey Nov 21, 2023
fc84aef
MarketplaceZap: add rescueTokens
apoorvlathey Dec 1, 2023
24bce4e
deploy: MarketplaceZap
apoorvlathey Dec 1, 2023
1cce41c
Merge pull request #90 from NFTX-project/marketplace-zap/add-rescue-t…
alexgausman Dec 2, 2023
d682836
CreateVaultZap: only finalize vault if all features enabled
apoorvlathey Dec 2, 2023
3a38c6a
UniswapV3Factory: add 0.3, 1 and 3% fee tiers
apoorvlathey Dec 6, 2023
9b3f058
Merge pull request #91 from NFTX-project/create-vault/finalizeVault
apoorvlathey Dec 6, 2023
34c1dc6
remove 3% fee tier
apoorvlathey Dec 8, 2023
b0be0d5
NFTXRouter: add pausable
apoorvlathey Dec 8, 2023
13f9e9c
add DelegateRegistry
apoorvlathey Dec 8, 2023
fffece8
Merge pull request #93 from NFTX-project/nftxrouter-pausable
alexgausman Dec 8, 2023
c3df7f7
fix: delegate tests
apoorvlathey Dec 9, 2023
8ea036c
Merge pull request #94 from NFTX-project/add-delegatexyz
alexgausman Dec 9, 2023
de96700
deploy: mainnet
apoorvlathey Dec 10, 2023
2c1431f
fix: NFPM: add unchecked blocks to allow underflow
apoorvlathey Dec 18, 2023
46ee133
Merge pull request #95 from NFTX-project/nfpm-fix-overflow
alexgausman Dec 19, 2023
e52dd3b
update NFTXRouter deploy script
apoorvlathey Dec 20, 2023
a97f345
Merge branch 'master' of https://github.com/NFTX-project/nftx-protoco…
apoorvlathey Dec 20, 2023
ac82ea0
redeploy nfpm: sepolia
apoorvlathey Dec 20, 2023
c729777
add transferOwnership script
apoorvlathey Dec 20, 2023
21ebb8e
redeploy nfpm: mainnet
apoorvlathey Dec 22, 2023
0f81a28
fix: transferownership script
apoorvlathey Dec 22, 2023
3135961
Merge pull request #96 from NFTX-project/transfer-ownership
apoorvlathey Dec 22, 2023
e9b8753
update: NFPM deploy script
apoorvlathey Jan 9, 2024
b3bcfb0
add MigratorZap to addresses.json
apoorvlathey Jan 9, 2024
31ace78
MigratorZap: avoid off by few wei when withdrawing from v2 inventory,…
apoorvlathey Jan 12, 2024
7d26250
MigratorZap: deploy updated code to sepolia
apoorvlathey Jan 13, 2024
c1db55d
MigratorZap: update tests
apoorvlathey Jan 15, 2024
f427b78
MigratorZap: deploy mainnet
apoorvlathey Jan 16, 2024
74887cf
Merge pull request #97 from NFTX-project/migrator-zap-off-by-wei-fix
apoorvlathey Jan 16, 2024
39ead59
EligibilityManager: add to deploy script
apoorvlathey Jan 16, 2024
9895e71
deploy:goerli update
apoorvlathey Jan 17, 2024
05815c0
fix: VaultFactory: fix getVTokenPremium1155
apoorvlathey Jan 17, 2024
5e75842
VaultFactory: deploy getVTokenPremium1155 fix to goerli & sepolia
apoorvlathey Jan 17, 2024
2e9c7b3
feat: add pre-commit hook to auto generated addresses.json for new de…
apoorvlathey Jan 17, 2024
816b3e7
modify .husky
apoorvlathey Jan 17, 2024
14ab81c
VaultFactory: deploy getVTokenPremium1155 fix to mainnet
apoorvlathey Jan 18, 2024
c23e81a
Merge pull request #98 from NFTX-project/fix/VaultFactory/getVTokenPr…
apoorvlathey Jan 18, 2024
8e139b0
feat: add script to generate addresses table in README
apoorvlathey Jan 18, 2024
b5a0233
Merge pull request #99 from NFTX-project/add-gen-readme-script
apoorvlathey Jan 18, 2024
0f70abb
NFTXVault: add updateDelegate, set vaultFactory's owner as delegate d…
apoorvlathey Jan 25, 2024
8ac345b
Eligibility: use custom Initializable
apoorvlathey Jan 25, 2024
89e4003
add tests: NFTXVault
apoorvlathey Feb 2, 2024
ea4eed7
update README: how to verify BeaconProxies
apoorvlathey Feb 2, 2024
8c9e89b
add tests: NFTXVaultFactory [wip]
apoorvlathey Feb 4, 2024
0823e62
Update forge-std submodule to tag v1.7.6
apoorvlathey Feb 4, 2024
e9a43b7
add tests: NFTXVaultFactory
apoorvlathey Feb 5, 2024
a3717c1
add tests: TestBase: use names function params
apoorvlathey Feb 5, 2024
e33ff82
fix: NFTXVaultFactory failing tests
apoorvlathey Feb 5, 2024
ae77d95
add tests: InventoryStaking
apoorvlathey Feb 18, 2024
a5a889e
fix: NFTXVaultFactory test: update vm.assume limit for seconds
apoorvlathey Feb 18, 2024
172b3b4
chore: ownable not owner error: declare constant
apoorvlathey Feb 18, 2024
7f6923c
tests: VaultFactory: follow BTT (wip)
apoorvlathey Feb 19, 2024
78661ee
tests: VaultFactory: move to BTT (wip)
apoorvlathey Feb 20, 2024
6053d37
tests: VaultFactory: full port to BTT
apoorvlathey Feb 24, 2024
083ba6d
tests: Vault: create .tree files for all functions
apoorvlathey Feb 28, 2024
c6e8887
tests: Inventory: .tree WIP
apoorvlathey Mar 1, 2024
68e6e90
InventoryStakingV3: check totalVTokenShares for locked shares before …
apoorvlathey Mar 1, 2024
e64c257
Merge pull request #101 from NFTX-project/inventory/check-total-vtoke…
apoorvlathey Mar 1, 2024
33158fc
FeeDistributor: fix leftover calculation
apoorvlathey Mar 1, 2024
266bff5
Merge pull request #103 from NFTX-project/fee-distributor-fix-leftover
apoorvlathey Mar 1, 2024
0deeabe
UniswapV3PoolUpgradeable: add reentrant lock to distributeRewards
apoorvlathey Mar 1, 2024
3ec8749
deploy script: put in modules
apoorvlathey Mar 5, 2024
7eba476
gen addresses script: fix output ordering
apoorvlathey Mar 5, 2024
0ea02bf
deploy: sepolia
apoorvlathey Mar 5, 2024
6516940
update base-README
apoorvlathey Mar 5, 2024
03a6485
deploy: mainnet: upgrade UniswapV3Pool
apoorvlathey Mar 5, 2024
9992ce4
FeeDistributor: inherit Pausable to add guardians
apoorvlathey Mar 6, 2024
ccaa37a
FeeDistributor: cache allocTotal
apoorvlathey Mar 6, 2024
a8bd777
Merge pull request #104 from NFTX-project/fee-distributor-add-guardians
apoorvlathey Mar 6, 2024
4808d93
create FailSafe
apoorvlathey Mar 6, 2024
2b61d7a
Merge pull request #105 from NFTX-project/fail-safe
apoorvlathey Mar 6, 2024
264cb13
deploy modules: account for upgrades
apoorvlathey Mar 7, 2024
5a29cd7
deploy modules: fix owner for proxy in deployOptions
apoorvlathey Mar 7, 2024
984cc71
deploy script: update transferOwnership
apoorvlathey Mar 7, 2024
d3a64ff
deploy: mainnet: FeeDistributor, InventoryStaking, FailSafe
apoorvlathey Mar 7, 2024
a282d6b
addresses.json: add FailSafe
apoorvlathey Mar 7, 2024
8eba33c
deploy: script: TransferOwernship: wait for prev transaction before i…
apoorvlathey Mar 7, 2024
c00f9eb
Merge pull request #102 from NFTX-project/upgrade
apoorvlathey Mar 7, 2024
6875372
Merge branch 'master' into tests
apoorvlathey Mar 7, 2024
a8c58f1
tests: VaultFactory: fix failing fuzzing
apoorvlathey Mar 7, 2024
26a5ac2
fix: InventoryStaking: check vTokenTimelock for increaseLiquidity
apoorvlathey Mar 7, 2024
faa5b73
Merge pull request #2 from NFTX-project/inventory-staking-increasePos…
alexgausman Mar 8, 2024
7c66adf
deploy: mainnet: InventoryStaking, NFTXVault implementation
apoorvlathey Mar 8, 2024
e2a34ef
FailSafe: add guardians
apoorvlathey Mar 8, 2024
758bea9
add failsafe src to readme
apoorvlathey Mar 8, 2024
3f4d199
deploy: mainnet: updated FailSafe
apoorvlathey Mar 8, 2024
524a68f
Merge pull request #3 from NFTX-project/fail-safe-add-guardians
apoorvlathey Mar 8, 2024
ad9e61a
create ShutdownRedeemer
apoorvlathey Mar 11, 2024
e386077
deploy:arbitrum
apoorvlathey Mar 15, 2024
2b21cdf
Merge pull request #5 from NFTX-project/deploy-arbitrum
apoorvlathey Mar 18, 2024
1f787eb
add UniswapV3Staker address
apoorvlathey Mar 18, 2024
549dd39
update arbitrum universal router address
apoorvlathey Mar 21, 2024
c77972b
tests: Inventory: add all .tree files
apoorvlathey Mar 22, 2024
5dcc957
deploy: sepolia: ShutdownRedeemer
apoorvlathey Mar 22, 2024
4ec2990
deploy: mainnet: ShutdownRedeemer
apoorvlathey Mar 22, 2024
f230712
Merge branch 'tests' into shutdown-redeemer
apoorvlathey Mar 22, 2024
aaf9747
Merge pull request #4 from NFTX-project/shutdown-redeemer
apoorvlathey Mar 22, 2024
54a2c9f
Merge pull request #1 from NFTX-project/tests
apoorvlathey Mar 22, 2024
b1e0c03
update forge-std
apoorvlathey Apr 1, 2024
2d6efaf
use floating solc version for interfaces
apoorvlathey Apr 1, 2024
886088e
Merge pull request #6 from NFTX-project/floating-pragmas-for-interfaces
apoorvlathey Apr 1, 2024
c69ab1d
create V3MigrateSwap
apoorvlathey Apr 2, 2024
e324640
deploy: sepolia: V3MigrateSwap
apoorvlathey Apr 2, 2024
3da92a5
Merge pull request #7 from NFTX-project/v3-migrate-swap
apoorvlathey Apr 2, 2024
932c535
create RescueAirdrop and Factory
apoorvlathey Apr 3, 2024
64a7d96
RescueAirdropFactory: add loop
apoorvlathey Apr 3, 2024
8ab9651
deploy: base: RescueAirdrop implementation
apoorvlathey Apr 3, 2024
44daee9
Merge pull request from NFTX-project/rescue-airdrop
apoorvlathey Apr 4, 2024
fefbb7d
put periphery contracts in separate folder
apoorvlathey Apr 5, 2024
04909b1
create mfer airdrop distribution scripts
apoorvlathey Apr 5, 2024
c3e371e
Merge pull request from NFTX-project/mfer-airdrop-distribution
apoorvlathey Apr 5, 2024
8c80191
deploy: base
apoorvlathey Apr 22, 2024
0b08371
fix: MigratorZap: handle punk transfers to V3 vault
apoorvlathey May 10, 2024
6f9f316
add MigratorZap tests for Punk
apoorvlathey May 11, 2024
7c50684
Merge pull request #10 from NFTX-project/migrator-zap-punk-fix
alexgausman May 12, 2024
4f6a5e5
deploy: mainnet: MigratorZap
apoorvlathey May 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
13 changes: 13 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
ALCHEMY_MAINNET_API_KEY=
ALCHEMY_GOERLI_API_KEY=
ALCHEMY_ARBITRUM_API_KEY=
MAINNET_RPC_URL=
SEPOLIA_RPC_URL=
GOERLI_RPC_URL=
ARBITRUM_RPC_URL=
BASE_RPC_URL=
ETHERSCAN_API_KEY=
ARBISCAN_API_KEY=
BASESCAN_API_KEY=
DEPLOYER_PRIVATE_KEY=0x......
SENDER=
Binary file added .github/nftx-logo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Compiler files
cache/
out/
bin/

# Ignores development broadcast logs
!/broadcast
Expand All @@ -12,3 +13,18 @@ docs/

# Dotenv file
.env

# JS
node_modules

# VSCode Solidity Plugin
bin

# Hardhat
abi
artifacts
typechain
deployments/localhost

# Misc
.DS_STORE
8 changes: 7 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[submodule "lib/forge-std"]
path = lib/forge-std
url = https://github.com/foundry-rs/forge-std
branch = v1.3.0
[submodule "lib/openzeppelin-contracts"]
path = lib/openzeppelin-contracts
url = https://github.com/OpenZeppelin/openzeppelin-contracts
Expand All @@ -14,3 +13,10 @@
path = lib/v2-core
url = https://github.com/Uniswap/v2-core
branch = v1.0.1
[submodule "lib/openzeppelin-contracts-upgradeable"]
path = lib/openzeppelin-contracts-upgradeable
url = https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable
branch = v4.8.1
[submodule "lib/permit2"]
path = lib/permit2
url = https://github.com/Uniswap/permit2
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

./script/preCommitGenAddresses.sh
4 changes: 4 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run test
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"solidity.compileUsingRemoteVersion": "v0.7.6+commit.7338295f"
"solidity.compileUsingRemoteVersion": "v0.8.15+commit.e14f2714"
}
211 changes: 211 additions & 0 deletions README.md

Large diffs are not rendered by default.

113 changes: 113 additions & 0 deletions addresses.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
{
"mainnet": {
"CreateVaultZap": "0x56dab32697B4A313f353DA0CE42B5113eD8E6f74",
"DefaultProxyAdmin": "0xf8Cab5e4912e08c475033776d9472b81c1325e58",
"FailSafe": "0x6bB724F11a8D7254800Cf34922E0D54407B0e698",
"MarketplaceUniversalRouterZap": "0x293A0c49c85F1D8851C665Ac3cE1f1DC2a79bE3d",
"MigratorZap": "0xD0999df61929E9d83d4236Cf0e1A0755869B9FE3",
"NFTXEligibilityManager": "0x4086e98Cce041d286112d021612fD894cFed94D5",
"NFTXFeeDistributorV3": "0x6845fF5f102bEF9D785468F0bEb535b4687406E7",
"NFTXInventoryStakingV3Upgradeable": "0x889f313e2a3FDC1c9a45bC6020A8a18749CD6152",
"NFTXRouter": "0x70A741A12262d4b5Ff45C0179c783a380EebE42a",
"nftxUniversalRouter": "0x250d62a67254A46c0De472d2c9215E1d890cC90f",
"NFTXVaultFactoryUpgradeableV3": "0xC255335bc5aBd6928063F5788a5E420554858f01",
"NonfungiblePositionManager": "0x26387fcA3692FCac1C1e8E4E2B22A6CF0d4b71bF",
"permit2": "0x000000000022d473030f116ddee9f6b43ac78ba3",
"QuoterV2": "0x5493dF723c17B6A768aA61F79405bA56ffC5294a",
"ShutdownRedeemerUpgradeable": "0x96cf14C2A61b7142421397735e702e25f1aa7F30",
"SwapRouter": "0x1703f8111B0E7A10e1d14f9073F53680d64277A3",
"TickLens": "0x1650115DDD287bE6F4972180d290D0FF89a42c40",
"UniswapV3FactoryUpgradeable": "0xa70e10beB02fF9a44007D9D3695d4b96003db101",
"V3MigrateSwap": "",
"WETH": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
},
"arbitrum": {
"CreateVaultZap": "0xF9E891AB1ECa89B7A4B3cBD45aEBFDF3Ec38946F",
"DefaultProxyAdmin": "0xdA7C2F023Dd30329d41483B95AFd24962f468A54",
"FailSafe": "0xBDA73b600435BF4309270438842dcE06f9a06fb7",
"MarketplaceUniversalRouterZap": "0xf56296B3010a59Ef7F0915569DD44E1302b9Ca40",
"MigratorZap": "0x6E1537eD56f52414f0182FaebF79A5fB2Ad2CABd",
"NFTXEligibilityManager": "0x6DCdfD7e94957cBAE9023c232dE18c0F72c2aD16",
"NFTXFeeDistributorV3": "0x0d50970C7848ebbE52661e70057D7D063B7de886",
"NFTXInventoryStakingV3Upgradeable": "0xe39a7E67d3E3b6eAF58BC02C4E80C3688847d155",
"NFTXRouter": "0x52731751Dede22827ad47109f5e9697d75a3ef4d",
"nftxUniversalRouter": "0x0DA69287B4C1B28181E5d155dDDda7Fa5C32E5Ad",
"NFTXVaultFactoryUpgradeableV3": "0x4dEeb9D2Bff2e9C35ce1f013DcC4582F891cb711",
"NonfungiblePositionManager": "0x8AD238377531547838370B9C4aC346b9Ed5466Ea",
"permit2": "0x000000000022d473030f116ddee9f6b43ac78ba3",
"QuoterV2": "0xff3957CB28aB34186543281e0bbe0De05C9e7D6D",
"ShutdownRedeemerUpgradeable": "",
"SwapRouter": "0xeA60242d7183E3d13Dc17fb2A4D0230d34eef502",
"TickLens": "0x3f2797b0E19CBf2377B8DE2d1CEC2698AcA7b081",
"UniswapV3FactoryUpgradeable": "0xF4D0512FB47319B0CE9144EF582862e2921CaBF8",
"UniswapV3Staker": "0xd4E155135b7dFf66c9C3B34EcA4aE7d9555FE31F",
"V3MigrateSwap": "",
"WETH": "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"
},
"base": {
"CreateVaultZap": "0x2D77756C139ed3c25472Daf233F332E8F605Dd8E",
"DefaultProxyAdmin": "0x33b381E2e0c4adC1dbd388888e9A29079e5b6702",
"FailSafe": "0xb13907103606118D01D18c9Deb249B89F6c31545",
"MarketplaceUniversalRouterZap": "0x31cB832F661Cd90fc9Fca6fB70A39cA811a02aEd",
"MigratorZap": "",
"NFTXEligibilityManager": "0xcB62303a5Ecc5f9C5cF7B5AA967a25d9Bb2B4b08",
"NFTXFeeDistributorV3": "0xA64c2F3f965f055E51482bF0960Ebb5f2904BF68",
"NFTXInventoryStakingV3Upgradeable": "0x47D9ACEE6aa260C36F4368091bE92F0824876C72",
"NFTXRouter": "0x590F8679964D4dEfB54DCD307b2941B053eb1821",
"nftxUniversalRouter": "0x7c656F0691Db983ee78f68189c55C36d1862c901",
"NFTXVaultFactoryUpgradeableV3": "0x0D74B761eAB5cC7Cc0E4e625A2e2B8251A4915c6",
"NonfungiblePositionManager": "0x4f566a711901168804A74F252680d85C9246188e",
"permit2": "0x000000000022d473030f116ddee9f6b43ac78ba3",
"QuoterV2": "0xFf40913CA69912212e00e93Ad4DD1480A7aeF13A",
"ShutdownRedeemerUpgradeable": "",
"SwapRouter": "0x27124948dcc9EbF3113681898FF217d3E4f56900",
"TickLens": "0x95Eaddd888c0063B392B771d11Db9704843df8bE",
"UniswapV3FactoryUpgradeable": "0x5FD88cD0034A0B2FC77E75Ea09b6e512511b0Eb9",
"V3MigrateSwap": "",
"WETH": "0x4200000000000000000000000000000000000006"
},
"sepolia": {
"CreateVaultZap": "0xD80b916470F8e79FD8d09874cb159CbB8D13d8da",
"DefaultProxyAdmin": "0x36cBBb16F2FA71d4B773E9F4A11cF7FC53B13EfD",
"FailSafe": "",
"MarketplaceUniversalRouterZap": "0xd88a3B9D0Fb2d39ec8394CfFD983aFBB2D4a6410",
"MigratorZap": "0x19762e505aF085284E287c8DAb931fb28545461f",
"NFTXEligibilityManager": "0xa1ad09f8Fd789E3A940Ba9Dc5aE4D17021eF290D",
"NFTXFeeDistributorV3": "0x53AE38742C78EE64fC077EF840B2Aa47A7E9c603",
"NFTXInventoryStakingV3Upgradeable": "0xfBFf0635f7c5327FD138E1EBa72BD9877A6a7C1C",
"NFTXRouter": "0x441b7DE4340AAa5aA86dB4DA43d9Badf7B2DAA66",
"nftxUniversalRouter": "0x12156cCA1958B6591CC49EaE03a5553458a4b424",
"NFTXVaultFactoryUpgradeableV3": "0x31C56CaF49125043e80B4d3C7f8734f949d8178C",
"NonfungiblePositionManager": "0xA9bCC1e29d3460177875f68fDCC0264D22c40BF0",
"permit2": "0x000000000022d473030f116ddee9f6b43ac78ba3",
"QuoterV2": "0xb8EB27ca4715f7A04228c6F83935379D1f5AbABd",
"ShutdownRedeemerUpgradeable": "0x4b25288f40C7e00F93f0DA261C314d67b640c9dF",
"SwapRouter": "0xa7069da6a7e600e0348620484fD2B1f24E075d5f",
"TickLens": "0xA13E04fAEe08E784A44C27e9E77Ca7a02D45BFd7",
"UniswapV3FactoryUpgradeable": "0xDD2dce9C403f93c10af1846543870D065419E70b",
"V3MigrateSwap": "0xd26b2BFBB6E8c1B3B849751549B20abf5E5fb125",
"WETH": "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14"
},
"goerli": {
"CreateVaultZap": "0xc6464CC63bC20b64e1633A0293C2C9b202F4f1b6",
"DefaultProxyAdmin": "0xa0d26F02D5e94C8E9ED524875D9fce36ab4838a2",
"FailSafe": "",
"MarketplaceUniversalRouterZap": "0x0be2D766Eef4b6a72F1fAe2e49619F013d647B8A",
"MigratorZap": "0xD4B67Fe6a1258fd5e1C4dF84f3De01F62e7ac127",
"NFTXEligibilityManager": "0xA4e9e286CE7A34d19f774c36844225468290C3A8",
"NFTXFeeDistributorV3": "0xA8076Ec5Dbb95165e14624Ff43dE2290e78A6905",
"NFTXInventoryStakingV3Upgradeable": "0xEf771a17e6970d8B4b208a76e94F175277554230",
"NFTXRouter": "0x8E16cdd0D9A15d2d0EFeA531660e8DbD0F6eE12D",
"nftxUniversalRouter": "0xF7c4FC5C2e30258e1E4d1197fc63aeDE371508f3",
"NFTXVaultFactoryUpgradeableV3": "0x1d552A0e6c2f680872C4a88b1e7def05F1858dF0",
"NonfungiblePositionManager": "0xDa9411C5455a1bfDb527d0988c0A2764E2a104be",
"permit2": "0x000000000022d473030f116ddee9f6b43ac78ba3",
"QuoterV2": "0xBb473dbEF3363b5d7CDD5f12429Fd1C5F0c10499",
"ShutdownRedeemerUpgradeable": "",
"SwapRouter": "0x2E77A788fc66c5312354aaE0df1dC1895ce556f8",
"TickLens": "0x32A7703773cBc265cf79D49340F656837169FEcD",
"UniswapV3FactoryUpgradeable": "0xf25081B098c5929A26F562aa2502795fE89BC73f",
"V3MigrateSwap": "",
"WETH": "0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6"
}
}
24 changes: 24 additions & 0 deletions deploy/MigratorZap.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { HardhatRuntimeEnvironment, Network } from "hardhat/types";
import { DeployFunction } from "hardhat-deploy/types";
import { deployMigratorZap } from "./modules/MigratorZap";
import { getConfig } from "./utils";

const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const { deployments } = await getConfig(hre);

const vaultFactory = await deployments.get("NFTXVaultFactoryUpgradeableV3");
const positionManager = await deployments.get("NonfungiblePositionManager");
const inventoryStaking = await deployments.get(
"NFTXInventoryStakingV3Upgradeable"
);

const { migratorZap } = await deployMigratorZap({
hre,
vaultFactory: vaultFactory.address,
positionManager: positionManager.address,
inventoryStaking: inventoryStaking.address,
});
};
export default func;
func.tags = ["MigratorZap"];
func.dependencies = [];
45 changes: 45 additions & 0 deletions deploy/Mocks.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import { HardhatRuntimeEnvironment, Network } from "hardhat/types";
import { DeployFunction } from "hardhat-deploy/types";

const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const { deployments, getNamedAccounts, network } = hre;
const { deploy, execute } = deployments;

const { deployer } = await getNamedAccounts();

const nft = await deploy("MockRoyaltyNFT", {
args: [
"CryptoPunks",
"CryptoPunks",
"https://ipfs.io/ipfs/QmcsX1EprrBwjPRT7dyDWvmGX7zvcRsmKKDaMTiFbSsZh2/",
],
from: deployer,
log: true,
});
await deploy("MockRoyaltyNFT", {
args: [
"Milady Maker",
"Milady Maker",
"https://www.miladymaker.net/milady/json/",
],
from: deployer,
log: true,
});
await deploy("MockRoyaltyNFT", {
args: [
"BoredApe",
"BoredApe",
"https://ipfs.io/ipfs/QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/",
],
from: deployer,
log: true,
});

const nft1155 = await deploy("MockRoyalty1155", {
from: deployer,
log: true,
});
};
export default func;
func.tags = ["Mocks"];
func.dependencies = [];
56 changes: 56 additions & 0 deletions deploy/NFTXV3.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import { HardhatRuntimeEnvironment, Network } from "hardhat/types";
import { DeployFunction } from "hardhat-deploy/types";
import { deployVaultFactory } from "./modules/VaultFactory";
import { deployUniswapV3Factory } from "./modules/UniswapV3Factory";
import { deployInventoryStaking } from "./modules/InventoryStaking";
import { deployUniswapV3Periphery } from "./modules/UniswapV3Periphery";
import { deployNFTXRouter } from "./modules/NFTXRouter";
import { deployFeeDistributor } from "./modules/FeeDistributor";
import { deployFailSafe } from "./modules/FailSafe";

const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const { vaultFactory } = await deployVaultFactory({ hre });

const { inventoryStaking } = await deployInventoryStaking({
hre,
vaultFactory,
});

const { uniswapFactory } = await deployUniswapV3Factory({
hre,
});

const { positionManager, swapRouter, quoter } =
await deployUniswapV3Periphery({
hre,
uniswapFactory,
});

const { nftxRouter } = await deployNFTXRouter({
hre,
vaultFactory,
inventoryStaking,
positionManager,
swapRouter,
quoter,
});

const { feeDistributor } = await deployFeeDistributor({
hre,
nftxRouter,
uniswapFactory,
inventoryStaking,
vaultFactory,
});

const { failSafe } = await deployFailSafe({
hre,
inventoryStaking,
vaultFactory,
feeDistributor,
nftxRouter,
});
};
export default func;
func.tags = ["NFTXV3"];
func.dependencies = [];
12 changes: 12 additions & 0 deletions deploy/RescueAirdrop.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { HardhatRuntimeEnvironment, Network } from "hardhat/types";
import { DeployFunction } from "hardhat-deploy/types";
import { deployRescueAidrop } from "./modules/RescueAirdrop";

const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const { rescueAirdropImpl } = await deployRescueAidrop({
hre,
});
};
export default func;
func.tags = ["RescueAirdrop"];
func.dependencies = [];
12 changes: 12 additions & 0 deletions deploy/ShutdownRedeemer.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { HardhatRuntimeEnvironment, Network } from "hardhat/types";
import { DeployFunction } from "hardhat-deploy/types";
import { deployShutdownRedeemer } from "./modules/ShutdownRedeemer";

const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const { shutdownRedeemer } = await deployShutdownRedeemer({
hre,
});
};
export default func;
func.tags = ["ShutdownRedeemer"];
func.dependencies = [];
12 changes: 12 additions & 0 deletions deploy/V3MigrateSwap.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { HardhatRuntimeEnvironment, Network } from "hardhat/types";
import { DeployFunction } from "hardhat-deploy/types";
import { deployV3MigrateSwap } from "./modules/V3MigrateSwap";

const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const { v3MigrateSwap } = await deployV3MigrateSwap({
hre,
});
};
export default func;
func.tags = ["V3MigrateSwap"];
func.dependencies = [];
Loading