Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: stataToken v2 #2

Closed
wants to merge 28 commits into from
Closed
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
d092425
feat: Add rescuable to static a token (#29)
sendra Jul 15, 2024
9daf54f
fix: combine interface (#33)
sakulstra Jul 22, 2024
a8e061a
Update METADEPOSIT_TYPEHASH (#44)
kyzia551 Aug 7, 2024
4ad98c0
feat: pausability (#45)
sakulstra Aug 8, 2024
ca640a8
feat: expose latest answer on static a token (#3)
sakulstra Aug 8, 2024
03ce79f
fix: add readme
sakulstra Aug 8, 2024
1214bcc
docs: note on upgrade
sakulstra Aug 8, 2024
93a819d
fix: move around tests
sakulstra Aug 9, 2024
1c7a6ff
feat: use openzeppelin & remove meta txns (for now) (#5)
sakulstra Aug 12, 2024
63dc7f2
feat: move logic to oz and rework all tests (#7)
kyzia551 Aug 16, 2024
103f389
fix: cleanup imports
sakulstra Aug 16, 2024
2f57bd3
test: prevent mint to address(0)
sakulstra Aug 16, 2024
843f6d2
docs: add a bit more docs
sakulstra Aug 16, 2024
4aa0a58
fix: lint on save
sakulstra Aug 16, 2024
25e0a22
docs: add comment about libraries
sakulstra Aug 19, 2024
aaa93ec
Update tests/periphery/static-a-token/ERC20AaveLMUpgradable.t.sol
sakulstra Aug 19, 2024
58076f3
Update tests/periphery/static-a-token/ERC4626StataTokenUpgradeable.t.sol
sakulstra Aug 19, 2024
3781bb6
refactor: rename factory + add inheritance graph (#13)
sakulstra Aug 19, 2024
47c58b7
fix: address certora feedback (#14)
sakulstra Sep 2, 2024
25a5041
fix: resolve conflicts
sakulstra Sep 5, 2024
111ba64
fix: properly resolve conflict
sakulstra Sep 5, 2024
687022d
fix: total assets (#17)
sakulstra Sep 6, 2024
e339b57
feat: use permissionless rescuable (#20)
sakulstra Sep 9, 2024
5c63d4c
refactor: interface inheritance (#21)
sakulstra Sep 10, 2024
5655518
Certora adaptation to stata (#18)
MichaelMorami Sep 11, 2024
ce9735d
fix: lint certora files
sakulstra Sep 11, 2024
e66141c
Update README.md
sakulstra Sep 11, 2024
3c449e5
Certora Report (#23)
MichaelMorami Sep 11, 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
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@ coverage :; forge coverage --report lcov && \
download :; cast etherscan-source --chain ${chain} -d src/etherscan/${chain}_${address} ${address}
git-diff :
@mkdir -p diffs
@npx prettier ${before} ${after} --write
@printf '%s\n%s\n%s\n' "\`\`\`diff" "$$(git diff --no-index --diff-algorithm=patience --ignore-space-at-eol ${before} ${after})" "\`\`\`" > diffs/${out}.md
Binary file modified bun.lockb
Binary file not shown.
41 changes: 22 additions & 19 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@ test = 'tests'
script = 'scripts'
optimizer = true
optimizer_runs = 200
solc='0.8.19'
solc = '0.8.20'
evm_version = 'paris'
bytecode_hash = 'none'
out = 'out'
libs = ['lib']
remappings = [
remappings = []
fs_permissions = [
{ access = "write", path = "./reports" },
{ access = "read", path = "./out" },
{ access = "read", path = "./config" },
]
fs_permissions = [{access = "write", path = "./reports"}, {access = "read", path = "./out" }, {access = "read", path = "./config"}]
ffi = true

[fuzz]
Expand All @@ -25,7 +28,7 @@ avalanche = "${RPC_AVALANCHE}"
polygon = "${RPC_POLYGON}"
arbitrum = "${RPC_ARBITRUM}"
fantom = "${RPC_FANTOM}"
scroll= "${RPC_SCROLL}"
scroll = "${RPC_SCROLL}"
celo = "${RPC_CELO}"
fantom_testnet = "${RPC_FANTOM_TESTNET}"
harmony = "${RPC_HARMONY}"
Expand All @@ -38,19 +41,19 @@ gnosis = "${RPC_GNOSIS}"
base = "${RPC_BASE}"

[etherscan]
mainnet={key="${ETHERSCAN_API_KEY_MAINNET}",chainId=1}
optimism={key="${ETHERSCAN_API_KEY_OPTIMISM}",chainId=10}
avalanche={key="${ETHERSCAN_API_KEY_AVALANCHE}",chainId=43114}
polygon={key="${ETHERSCAN_API_KEY_POLYGON}",chainId=137}
arbitrum={key="${ETHERSCAN_API_KEY_ARBITRUM}",chainId=42161}
fantom={key="${ETHERSCAN_API_KEY_FANTOM}",chainId=250}
scroll={key="${ETHERSCAN_API_KEY_SCROLL}",chainId=534352, url='https://api.scrollscan.com/api\?'}
celo={key="${ETHERSCAN_API_KEY_CELO}",chainId=42220}
sepolia={key="${ETHERSCAN_API_KEY_MAINNET}",chainId=11155111}
mumbai={key="${ETHERSCAN_API_KEY_POLYGON}",chainId=80001}
amoy={key="${ETHERSCAN_API_KEY_POLYGON}",chainId=80002}
bnb_testnet={key="${ETHERSCAN_API_KEY_BNB}",chainId=97,url='https://api-testnet.bscscan.com/api'}
bnb={key="${ETHERSCAN_API_KEY_BNB}",chainId=56,url='https://api.bscscan.com/api'}
base={key="${ETHERSCAN_API_KEY_BASE}",chain=8453}
gnosis={key="${ETHERSCAN_API_KEY_GNOSIS}",chainId=100}
mainnet = { key = "${ETHERSCAN_API_KEY_MAINNET}", chainId = 1 }
optimism = { key = "${ETHERSCAN_API_KEY_OPTIMISM}", chainId = 10 }
avalanche = { key = "${ETHERSCAN_API_KEY_AVALANCHE}", chainId = 43114 }
polygon = { key = "${ETHERSCAN_API_KEY_POLYGON}", chainId = 137 }
arbitrum = { key = "${ETHERSCAN_API_KEY_ARBITRUM}", chainId = 42161 }
fantom = { key = "${ETHERSCAN_API_KEY_FANTOM}", chainId = 250 }
scroll = { key = "${ETHERSCAN_API_KEY_SCROLL}", chainId = 534352, url = 'https://api.scrollscan.com/api\?' }
celo = { key = "${ETHERSCAN_API_KEY_CELO}", chainId = 42220 }
sepolia = { key = "${ETHERSCAN_API_KEY_MAINNET}", chainId = 11155111 }
mumbai = { key = "${ETHERSCAN_API_KEY_POLYGON}", chainId = 80001 }
amoy = { key = "${ETHERSCAN_API_KEY_POLYGON}", chainId = 80002 }
bnb_testnet = { key = "${ETHERSCAN_API_KEY_BNB}", chainId = 97, url = 'https://api-testnet.bscscan.com/api' }
bnb = { key = "${ETHERSCAN_API_KEY_BNB}", chainId = 56, url = 'https://api.bscscan.com/api' }
base = { key = "${ETHERSCAN_API_KEY_BASE}", chain = 8453 }
gnosis = { key = "${ETHERSCAN_API_KEY_GNOSIS}", chainId = 100 }
# See more config options https://github.com/gakonst/foundry/tree/master/config
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"prettier-plugin-solidity": "^1.1.1"
},
"dependencies": {
"@bgd-labs/aave-cli": "^0.16.2",
"@bgd-labs/aave-cli": "^0.16.4",
"catapulta-verify": "^1.1.1"
}
}
4 changes: 3 additions & 1 deletion remappings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ aave-v3-core/=src/core/
aave-v3-periphery/=src/periphery/
solidity-utils/=lib/solidity-utils/src/
forge-std/=lib/forge-std/src/
ds-test/=lib/forge-std/lib/ds-test/src/
ds-test/=lib/forge-std/lib/ds-test/src/
openzeppelin-contracts-upgradeable/=lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/
openzeppelin-contracts/=lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/
2 changes: 1 addition & 1 deletion scripts/misc/DeployAaveV3MarketBatchedBase.sol
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ abstract contract DeployAaveV3MarketBatchedBase is DeployUtils, MarketInput, Scr
metadataReporter.writeJsonReportMarket(report);
}

function _loadWarnings(MarketConfig memory config, DeployFlags memory flags) internal view {
function _loadWarnings(MarketConfig memory config, DeployFlags memory flags) internal pure {
if (config.paraswapAugustusRegistry == address(0)) {
console.log(
'Warning: Paraswap Adapters will be skipped at deployment due missing config.paraswapAugustusRegistry'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pragma solidity ^0.8.0;

import '../../interfaces/IMarketReportTypes.sol';
import {TransparentProxyFactory, ITransparentProxyFactory} from 'solidity-utils/contracts/transparent-proxy/TransparentProxyFactory.sol';
import {StaticATokenLM} from 'aave-v3-periphery/contracts/static-a-token/StaticATokenLM.sol';
import {StataTokenV2} from 'aave-v3-periphery/contracts/static-a-token/StataTokenV2.sol';
import {StaticATokenFactory} from 'aave-v3-periphery/contracts/static-a-token/StaticATokenFactory.sol';
import {IErrors} from '../../interfaces/IErrors.sol';

Expand All @@ -17,7 +17,7 @@ contract AaveV3HelpersProcedureTwo is IErrors {

staticATokenReport.transparentProxyFactory = address(new TransparentProxyFactory());
staticATokenReport.staticATokenImplementation = address(
new StaticATokenLM(IPool(pool), IRewardsController(rewardsController))
new StataTokenV2(IPool(pool), IRewardsController(rewardsController))
);
staticATokenReport.staticATokenFactoryImplementation = address(
new StaticATokenFactory(
Expand Down
180 changes: 0 additions & 180 deletions src/periphery/contracts/dependencies/openzeppelin/ECDSA.sol

This file was deleted.

Loading
Loading