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: Upgrade FRAX, sFRAX to frxUSD, sfrxUSD #25

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
868a573
feat: steps 1, 2
pegahcarter Nov 15, 2024
89c05d5
feat: 3-5
pegahcarter Nov 15, 2024
4883747
feat: 6-8
pegahcarter Nov 19, 2024
2660007
fix: 1, 2, 4
pegahcarter Nov 20, 2024
ea9b175
scripts working
pegahcarter Nov 21, 2024
fd3c636
docs: document upgrade frax process
pegahcarter Nov 21, 2024
14ad3af
docs: cleanup readme
pegahcarter Nov 21, 2024
86ce6e7
feat: block/set message libs
pegahcarter Nov 21, 2024
7f8dec4
feat: disconnect peers
pegahcarter Nov 22, 2024
adef72f
feat: adapter to set default libs
pegahcarter Nov 22, 2024
afc68ef
feat: build msig tx to send mock ofts
pegahcarter Nov 22, 2024
27e4107
feat: upgrade fraxtal oft to adapter
pegahcarter Nov 25, 2024
fde9b49
Merge branch 'master' into feat/upgrade-FRAX
pegahcarter Dec 2, 2024
019a4b8
refactor: sync with master
pegahcarter Dec 2, 2024
a1ce31a
chore: generate all json
pegahcarter Dec 2, 2024
84470e2
deps: pin upgradeable repo commit
pegahcarter Dec 5, 2024
45a334c
build: point foundry to scripts
pegahcarter Dec 5, 2024
ed39e84
chore: fmt json
pegahcarter Dec 5, 2024
37603a9
chore: missed fmt
pegahcarter Dec 6, 2024
506dbe0
fix: sfrxETH => sFRAX legacy addr
pegahcarter Dec 6, 2024
e2a09db
fix: additional sfrxETH => sFRAX legacy addr
pegahcarter Dec 9, 2024
373f982
test: setup mock token and oft mesh
pegahcarter Dec 13, 2024
b552015
feat: test setup complete
pegahcarter Dec 16, 2024
495ce9f
fix: deploy mock only set peer
pegahcarter Dec 17, 2024
cb8ebc4
test: get to deploy adapter
pegahcarter Dec 17, 2024
b0a1ead
test: complete
pegahcarter Dec 18, 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 .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ coverage
coverage.json
typechain
typechain-types
out

# Hardhat files
cache
Expand Down
274 changes: 274 additions & 0 deletions broadcast/1_DeployCarterCoinAndAdapter.s.sol/8453/run-1734382627.json

Large diffs are not rendered by default.

274 changes: 274 additions & 0 deletions broadcast/1_DeployCarterCoinAndAdapter.s.sol/8453/run-latest.json

Large diffs are not rendered by default.

653 changes: 653 additions & 0 deletions broadcast/1_DeployMockOFT.s.sol/252/dry-run/run-1731692004.json

Large diffs are not rendered by default.

653 changes: 653 additions & 0 deletions broadcast/1_DeployMockOFT.s.sol/252/dry-run/run-latest.json

Large diffs are not rendered by default.

653 changes: 653 additions & 0 deletions broadcast/2_DeployMockOFT.s.sol/252/dry-run/run-1731698162.json

Large diffs are not rendered by default.

577 changes: 577 additions & 0 deletions broadcast/2_DeployMockOFT.s.sol/252/dry-run/run-1732127482.json

Large diffs are not rendered by default.

615 changes: 615 additions & 0 deletions broadcast/2_DeployMockOFT.s.sol/252/dry-run/run-1732127686.json

Large diffs are not rendered by default.

615 changes: 615 additions & 0 deletions broadcast/2_DeployMockOFT.s.sol/252/dry-run/run-latest.json

Large diffs are not rendered by default.

2,126 changes: 2,126 additions & 0 deletions broadcast/2_DeployMockOFT.s.sol/252/run-1732306638.json

Large diffs are not rendered by default.

2,126 changes: 2,126 additions & 0 deletions broadcast/2_DeployMockOFT.s.sol/252/run-1732306911.json

Large diffs are not rendered by default.

2,126 changes: 2,126 additions & 0 deletions broadcast/2_DeployMockOFT.s.sol/252/run-latest.json

Large diffs are not rendered by default.

1,038 changes: 1,038 additions & 0 deletions broadcast/2_DeployOFT.s.sol/252/run-1734385050.json

Large diffs are not rendered by default.

1,038 changes: 1,038 additions & 0 deletions broadcast/2_DeployOFT.s.sol/252/run-latest.json

Large diffs are not rendered by default.

497 changes: 497 additions & 0 deletions broadcast/3_SetupAdapter.s.sol/8453/run-1734386167.json

Large diffs are not rendered by default.

497 changes: 497 additions & 0 deletions broadcast/3_SetupAdapter.s.sol/8453/run-latest.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

98 changes: 98 additions & 0 deletions broadcast/4a_DeployAdapterImplementation.s.sol/252/run-latest.json

Large diffs are not rendered by default.

503 changes: 503 additions & 0 deletions broadcast/5_DeployFraxtalAdapter.s.sol/252/dry-run/run-1732148085.json

Large diffs are not rendered by default.

785 changes: 785 additions & 0 deletions broadcast/5_DeployFraxtalAdapter.s.sol/252/dry-run/run-1732299734.json

Large diffs are not rendered by default.

785 changes: 785 additions & 0 deletions broadcast/5_DeployFraxtalAdapter.s.sol/252/dry-run/run-latest.json

Large diffs are not rendered by default.

131 changes: 131 additions & 0 deletions broadcast/5_DeployNewCarterCoin.s.sol/252/run-1734387329.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
{
"transactions": [
{
"hash": "0xc616878b6a1d58bc2d0bd84e599339790b6b8e3348eb35e57c5746a867644932",
"transactionType": "CREATE",
"contractName": "ERC20Mock",
"contractAddress": "0x7131f0ec2aac01a5d30138c2d96c25e4fbbc78ce",
"function": null,
"arguments": [
"\"New Carter Coin\"",
"\"nCAC\""
],
"transaction": {
"from": "0x0990be6db8c785fbbf9ded8baec612a10cae814b",
"gas": "0xec4ad",
"value": "0x0",
"input": "0x60806040523480156200001157600080fd5b5060405162000e5738038062000e57833981016040819052620000349162000181565b8181620000413362000069565b60046200004f83826200027c565b5060056200005e82826200027c565b505050505062000348565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620000e157600080fd5b81516001600160401b0380821115620000fe57620000fe620000b9565b604051601f8301601f19908116603f01168101908282118183101715620001295762000129620000b9565b81604052838152602092508660208588010111156200014757600080fd5b600091505b838210156200016b57858201830151818301840152908201906200014c565b6000602085830101528094505050505092915050565b600080604083850312156200019557600080fd5b82516001600160401b0380821115620001ad57600080fd5b620001bb86838701620000cf565b93506020850151915080821115620001d257600080fd5b50620001e185828601620000cf565b9150509250929050565b600181811c908216806200020057607f821691505b6020821081036200022157634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111562000277576000816000526020600020601f850160051c81016020861015620002525750805b601f850160051c820191505b8181101562000273578281556001016200025e565b5050505b505050565b81516001600160401b03811115620002985762000298620000b9565b620002b081620002a98454620001eb565b8462000227565b602080601f831160018114620002e85760008415620002cf5750858301515b600019600386901b1c1916600185901b17855562000273565b600085815260208120601f198616915b828110156200031957888601518255948401946001909101908401620002f8565b5085821015620003385787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b610aff80620003586000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c806370a0823111610097578063a457c2d711610066578063a457c2d7146101eb578063a9059cbb146101fe578063dd62ed3e14610211578063f2fde38b1461022457600080fd5b806370a0823114610197578063715018a6146101c05780638da5cb5b146101c857806395d89b41146101e357600080fd5b806323b872dd116100d357806323b872dd1461014d578063313ce56714610160578063395093511461016f57806340c10f191461018257600080fd5b806306fdde03146100fa578063095ea7b31461011857806318160ddd1461013b575b600080fd5b610102610237565b60405161010f9190610948565b60405180910390f35b61012b6101263660046109b3565b6102c9565b604051901515815260200161010f565b6003545b60405190815260200161010f565b61012b61015b3660046109dd565b6102e3565b6040516012815260200161010f565b61012b61017d3660046109b3565b610307565b6101956101903660046109b3565b610329565b005b61013f6101a5366004610a19565b6001600160a01b031660009081526001602052604090205490565b61019561033f565b6000546040516001600160a01b03909116815260200161010f565b610102610353565b61012b6101f93660046109b3565b610362565b61012b61020c3660046109b3565b6103e2565b61013f61021f366004610a3b565b6103f0565b610195610232366004610a19565b61041b565b60606004805461024690610a6e565b80601f016020809104026020016040519081016040528092919081815260200182805461027290610a6e565b80156102bf5780601f10610294576101008083540402835291602001916102bf565b820191906000526020600020905b8154815290600101906020018083116102a257829003601f168201915b5050505050905090565b6000336102d7818585610494565b60019150505b92915050565b6000336102f18582856105b8565b6102fc858585610632565b506001949350505050565b6000336102d781858561031a83836103f0565b6103249190610aa8565b610494565b6103316107dd565b61033b8282610837565b5050565b6103476107dd565b61035160006108f8565b565b60606005805461024690610a6e565b6000338161037082866103f0565b9050838110156103d55760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102fc8286868403610494565b6000336102d7818585610632565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6104236107dd565b6001600160a01b0381166104885760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103cc565b610491816108f8565b50565b6001600160a01b0383166104f65760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016103cc565b6001600160a01b0382166105575760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016103cc565b6001600160a01b0383811660008181526002602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006105c484846103f0565b9050600019811461062c578181101561061f5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016103cc565b61062c8484848403610494565b50505050565b6001600160a01b0383166106965760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016103cc565b6001600160a01b0382166106f85760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016103cc565b6001600160a01b038316600090815260016020526040902054818110156107705760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016103cc565b6001600160a01b0380851660008181526001602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906107d09086815260200190565b60405180910390a361062c565b6000546001600160a01b031633146103515760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103cc565b6001600160a01b03821661088d5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016103cc565b806003600082825461089f9190610aa8565b90915550506001600160a01b0382166000818152600160209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020808352835180602085015260005b818110156109765785810183015185820160400152820161095a565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b03811681146109ae57600080fd5b919050565b600080604083850312156109c657600080fd5b6109cf83610997565b946020939093013593505050565b6000806000606084860312156109f257600080fd5b6109fb84610997565b9250610a0960208501610997565b9150604084013590509250925092565b600060208284031215610a2b57600080fd5b610a3482610997565b9392505050565b60008060408385031215610a4e57600080fd5b610a5783610997565b9150610a6560208401610997565b90509250929050565b600181811c90821680610a8257607f821691505b602082108103610aa257634e487b7160e01b600052602260045260246000fd5b50919050565b808201808211156102dd57634e487b7160e01b600052601160045260246000fdfea2646970667358221220a2ad6f9f4b29d18cf599667019b07d3e9779815e394d241bb24c104d3eb7b25164736f6c6343000816003300000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000f4e65772043617274657220436f696e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000046e43414300000000000000000000000000000000000000000000000000000000",
"nonce": "0x9d",
"chainId": "0xfc"
},
"additionalContracts": [],
"isFixedGasLimit": false
},
{
"hash": "0x360a4e0624c10bfda8c6fdcbebcd882be7a0d60bffb3bedf12e804e3467970cf",
"transactionType": "CALL",
"contractName": "ERC20Mock",
"contractAddress": "0x7131f0ec2aac01a5d30138c2d96c25e4fbbc78ce",
"function": "mint(address,uint256)",
"arguments": [
"0x0990be6dB8c785FBbF9deD8bAEc612A10CaE814b",
"500000000000000000000000"
],
"transaction": {
"from": "0x0990be6db8c785fbbf9ded8baec612a10cae814b",
"to": "0x7131f0ec2aac01a5d30138c2d96c25e4fbbc78ce",
"gas": "0x17c79",
"value": "0x0",
"input": "0x40c10f190000000000000000000000000990be6db8c785fbbf9ded8baec612a10cae814b0000000000000000000000000000000000000000000069e10de76676d0800000",
"nonce": "0x9e",
"chainId": "0xfc"
},
"additionalContracts": [],
"isFixedGasLimit": false
}
],
"receipts": [
{
"status": "0x1",
"cumulativeGasUsed": "0xc111e",
"logs": [
{
"address": "0x7131f0ec2aac01a5d30138c2d96c25e4fbbc78ce",
"topics": [
"0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x0000000000000000000000000990be6db8c785fbbf9ded8baec612a10cae814b"
],
"data": "0x",
"blockHash": "0x165d3fd557ed2084bc99e4d95757e4108215d07a27a91657df0753260ce00d11",
"blockNumber": "0xd26495",
"transactionHash": "0xc616878b6a1d58bc2d0bd84e599339790b6b8e3348eb35e57c5746a867644932",
"transactionIndex": "0x1",
"logIndex": "0x0",
"removed": false
}
],
"logsBloom": "0x00000000000000000000000000000000000000002000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000001000000000000000000000000000000000000020000000000000000000800000008000000000000000000000000401000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100020000000000000000000000000000000000000000000000000000000400000000000",
"type": "0x2",
"transactionHash": "0xc616878b6a1d58bc2d0bd84e599339790b6b8e3348eb35e57c5746a867644932",
"transactionIndex": "0x1",
"blockHash": "0x165d3fd557ed2084bc99e4d95757e4108215d07a27a91657df0753260ce00d11",
"blockNumber": "0xd26495",
"gasUsed": "0xb5d29",
"effectiveGasPrice": "0xf433d",
"from": "0x0990be6db8c785fbbf9ded8baec612a10cae814b",
"to": null,
"contractAddress": "0x7131f0ec2aac01a5d30138c2d96c25e4fbbc78ce",
"l1BaseFeeScalar": "0xc350",
"l1BlobBaseFee": "0x4ef9325c",
"l1BlobBaseFeeScalar": "0x0",
"l1Fee": "0x162dac9cac08",
"l1GasPrice": "0x32e5c4b8e",
"l1GasUsed": "0x8b70"
},
{
"status": "0x1",
"cumulativeGasUsed": "0xd2493",
"logs": [
{
"address": "0x7131f0ec2aac01a5d30138c2d96c25e4fbbc78ce",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x0000000000000000000000000990be6db8c785fbbf9ded8baec612a10cae814b"
],
"data": "0x0000000000000000000000000000000000000000000069e10de76676d0800000",
"blockHash": "0x165d3fd557ed2084bc99e4d95757e4108215d07a27a91657df0753260ce00d11",
"blockNumber": "0xd26495",
"transactionHash": "0x360a4e0624c10bfda8c6fdcbebcd882be7a0d60bffb3bedf12e804e3467970cf",
"transactionIndex": "0x2",
"logIndex": "0x1",
"removed": false
}
],
"logsBloom": "0x00000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008400000000000000000000000000000000000000000000000020000000000000000000800000008000000000000000010000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000100020000000000000000000000000000000000000000000000000000000400000000000",
"type": "0x2",
"transactionHash": "0x360a4e0624c10bfda8c6fdcbebcd882be7a0d60bffb3bedf12e804e3467970cf",
"transactionIndex": "0x2",
"blockHash": "0x165d3fd557ed2084bc99e4d95757e4108215d07a27a91657df0753260ce00d11",
"blockNumber": "0xd26495",
"gasUsed": "0x11375",
"effectiveGasPrice": "0xf433d",
"from": "0x0990be6db8c785fbbf9ded8baec612a10cae814b",
"to": "0x7131f0ec2aac01a5d30138c2d96c25e4fbbc78ce",
"contractAddress": null,
"l1BaseFeeScalar": "0xc350",
"l1BlobBaseFee": "0x4ef9325c",
"l1BlobBaseFeeScalar": "0x0",
"l1Fee": "0xfe7cd79c60",
"l1GasPrice": "0x32e5c4b8e",
"l1GasUsed": "0x640"
}
],
"libraries": [],
"pending": [],
"returns": {},
"timestamp": 1734387329,
"chain": 252,
"commit": "373f982"
}
Loading