Skip to content

Commit

Permalink
rswETH integration (#68)
Browse files Browse the repository at this point in the history
* feat: rswETH integration

* chore: remove unused import

* chore: add external getters to internal restaked swell library functions

* fix: take min between exchange rate and market price for the viewSpot test

* chore: remove unused imports from tests

* chore: stagaing deployment

* feat: rswETH deployment

---------

Co-authored-by: Jun Kim <[email protected]>
  • Loading branch information
HrikB and junkim012 authored Apr 4, 2024
1 parent ef79fe7 commit e9261cd
Show file tree
Hide file tree
Showing 67 changed files with 3,975 additions and 84 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"transactions": [
{
"hash": null,
"transactionType": "CREATE2",
"contractName": "InterestRate",
"contractAddress": "0xa3301C4025F9dD8a37aa6E56F579c3177d8f8D9C",
"function": null,
"arguments": [
"[(0, 4062570058138700000, 0, 0, 1580630071273960000, 8500, 10000, 0, 23863999665252300000)]",
"0x437CC840e234C2127f54CD59B0B18aF59c586760"
],
"transaction": {
"type": "0x02",
"from": "0x01bd9abd70d74d8ec70d338bd6099ca29da3f9b4",
"to": "0x4e59b44847b379578588920ca78fbf26c0b4956c",
"gas": "0x131359",
"value": "0x0",
"data": "0x00000000000000000000000000000000000000000000000000000000000000016103c060405234801562000011575f80fd5b50604051620016123803806200161283398101604081905262000034916200054d565b6001600160a01b0381166200005c57604051633a9f6af760e11b815260040160405180910390fd5b6008825111156200008f578151604051637792a1c560e11b81526004016200008691815260200190565b60405180910390fd5b8151610380526001600160a01b0381166103a0525f805b61038051811015620002a457838181518110620000c757620000c7620006ca565b602002602001015160c0015161ffff1682620000e49190620006de565b9150838181518110620000fb57620000fb620006ca565b6020026020010151608001516001600160601b0316848281518110620001255762000125620006ca565b6020026020010151602001516001600160601b03161015620001b457838181518110620001565762000156620006ca565b602002602001015160200151848281518110620001775762000177620006ca565b602002602001015160800151604051633f6ca22160e11b8152600401620000869291906001600160601b0392831681529116602082015260400190565b838181518110620001c957620001c9620006ca565b602002602001015160a0015161ffff165f036200022657838181518110620001f557620001f5620006ca565b602002602001015160a0015160405163f2ae6b3d60e01b815260040162000086919061ffff91909116815260200190565b6127108482815181106200023e576200023e620006ca565b60200260200101516040015161ffff1611156200029b578381815181106200026a576200026a620006ca565b602002602001015160400151604051630cd3498760e11b815260040162000086919061ffff91909116815260200190565b600101620000a6565b508061271014620002cc5760405163b9778c0960e01b81526004810182905260240162000086565b620002d8835f62000399565b60c05260a052608052620002ee83600162000399565b610120526101005260e0526200030683600262000399565b6101805261016052610140526200031f83600362000399565b6101e0526101c0526101a0526200033883600462000399565b6102405261022052610200526200035183600562000399565b6102a05261028052610260526200036a83600662000399565b610300526102e0526102c0526200038383600762000399565b6103605261034052610320525062000704915050565b5f805f610380518410620003b557505f9150819050806200048e565b5f858581518110620003cb57620003cb620006ca565b60200260200101519050606060ff1681602001516001600160601b0316901b5f60ff16825f01516001600160601b0316901b17935060e060ff168160c0015161ffff16901b60d060ff168260a0015161ffff16901b607060ff1683608001516001600160601b0316901b601060ff1684606001516001600160601b0316901b5f60ff16856040015161ffff16901b171717179250606060ff168161010001516001600160601b0316901b5f60ff168260e001516001600160601b0316901b179150505b9250925092565b634e487b7160e01b5f52604160045260245ffd5b60405161012081016001600160401b0381118282101715620004cf57620004cf62000495565b60405290565b604051601f8201601f191681016001600160401b038111828210171562000500576200050062000495565b604052919050565b80516001600160601b03811681146200051f575f80fd5b919050565b805161ffff811681146200051f575f80fd5b80516001600160a01b03811681146200051f575f80fd5b5f80604080848603121562000560575f80fd5b83516001600160401b038082111562000577575f80fd5b818601915086601f8301126200058b575f80fd5b8151602082821115620005a257620005a262000495565b620005b2818360051b01620004d5565b828152818101935061012092830285018201928a841115620005d2575f80fd5b948201945b83861015620006ac5780868c031215620005f0575f8081fd5b620005fa620004a9565b620006058762000508565b81526200061484880162000508565b848201526200062588880162000524565b8882015260606200063881890162000508565b9082015260806200064b88820162000508565b9082015260a06200065e88820162000524565b9082015260c06200067188820162000524565b9082015260e06200068488820162000508565b908201526101006200069888820162000508565b9082015285529485019493820193620005d7565b509650620006bc88820162000536565b955050505050509250929050565b634e487b7160e01b5f52603260045260245ffd5b80820180821115620006fe57634e487b7160e01b5f52601160045260245ffd5b92915050565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516101c0516101e05161020051610220516102405161026051610280516102a0516102c0516102e05161030051610320516103405161036051610380516103a051610df2620008205f395f8181605301526101a801525f818160b7015261051501525f6108df01525f6108bc01525f61089901525f61086a01525f61084701525f61082401525f6107f501525f6107d201525f6107af01525f61078001525f61075d01525f61073a01525f61070b01525f6106e801525f6106c501525f61069601525f61067301525f61065001525f61062101525f6105fe01525f6105db01525f6105ac01525f61058901525f6105660152610df25ff3fe608060405234801561000f575f80fd5b506004361061004a575f3560e01c806309ea519f1461004e578063161fa6561461009257806348d4b487146100b2578063fe4bab43146100e7575b5f80fd5b6100757f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b6100a56100a0366004610af5565b61010f565b6040516100899190610b0c565b6100d97f000000000000000000000000000000000000000000000000000000000000000081565b604051908152602001610089565b6100fa6100f5366004610bda565b610166565b60408051928352602083019190915201610089565b60408051610120810182525f80825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810191909152610160826104c6565b92915050565b5f805f610172866104c6565b90505f61019160048360a0015161ffff1661097b90919063ffffffff16565b90505f6301e1338065ffffffffffff1661024760087f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166381ce1c238c6040518263ffffffff1660e01b81526004016101f491815260200190565b602060405180830381865afa15801561020f573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102339190610c03565b63ffffffff1661097b90919063ffffffff16565b6102519190610c4e565b60c084015190915061ffff165f819003610297576020840151604085015161027e9061ffff16600461097b565b816001600160601b0316915095509550505050506104be565b5f87156102c2576102b36102ac83600461098f565b899061099c565b6102bd908a610c4e565b6102c4565b5f5b606086015186519192505f916001600160601b039182169116850303848111156102eb57505f5b6102f581876109b0565b9150505f61032086886080015189602001516103119190610c6d565b6001600160601b0316906109b0565b9050858310156103bd5760608701515f906001600160601b031661034484866109c8565b61034e9190610c94565b60808901519091505f906001600160601b031661036b84876109c8565b6103759190610c94565b9050808210156103a757604089015181906103959061ffff16600461097b565b9a509a505050505050505050506104be565b604089015182906103959061ffff16600461097b565b5f6103c88785610ca7565b60608901519091505f906001600160601b03166103e5858a6109c8565b6103ef9190610c94565b60808a01519091505f906001600160601b031661040c858b6109c8565b6104169190610c94565b90505f8261043a858d60e001516001600160601b03166109c890919063ffffffff16565b6104449190610c94565b90505f82610469868e61010001516001600160601b03166109c890919063ffffffff16565b6104739190610c94565b9050808210156104a85760408c015181906104939061ffff16600461097b565b9d509d505050505050505050505050506104be565b60408c015182906104939061ffff16600461097b565b935093915050565b60408051610120810182525f80825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e0810182905261010081019190915261053960017f0000000000000000000000000000000000000000000000000000000000000000610ca7565b8211156105595760405163ca89fc4960e01b815260040160405180910390fd5b5f805f845f036105d057507f000000000000000000000000000000000000000000000000000000000000000091507f000000000000000000000000000000000000000000000000000000000000000090507f00000000000000000000000000000000000000000000000000000000000000006108ff565b8460010361064557507f000000000000000000000000000000000000000000000000000000000000000091507f000000000000000000000000000000000000000000000000000000000000000090507f00000000000000000000000000000000000000000000000000000000000000006108ff565b846002036106ba57507f000000000000000000000000000000000000000000000000000000000000000091507f000000000000000000000000000000000000000000000000000000000000000090507f00000000000000000000000000000000000000000000000000000000000000006108ff565b8460030361072f57507f000000000000000000000000000000000000000000000000000000000000000091507f000000000000000000000000000000000000000000000000000000000000000090507f00000000000000000000000000000000000000000000000000000000000000006108ff565b846004036107a457507f000000000000000000000000000000000000000000000000000000000000000091507f000000000000000000000000000000000000000000000000000000000000000090507f00000000000000000000000000000000000000000000000000000000000000006108ff565b8460050361081957507f000000000000000000000000000000000000000000000000000000000000000091507f000000000000000000000000000000000000000000000000000000000000000090507f00000000000000000000000000000000000000000000000000000000000000006108ff565b8460060361088e57507f000000000000000000000000000000000000000000000000000000000000000091507f000000000000000000000000000000000000000000000000000000000000000090507f00000000000000000000000000000000000000000000000000000000000000006108ff565b846007036108ff57507f000000000000000000000000000000000000000000000000000000000000000091507f000000000000000000000000000000000000000000000000000000000000000090507f00000000000000000000000000000000000000000000000000000000000000005b60408051610120810182526001600160601b038581168252606095861c8116602083015261ffff85811693830193909352601085901c811682870152607085901c8116608083015260d085901c831660a083015260e094851c90921660c082015282821693810193909352921c90911661010082015292915050565b5f6109888383601b6109e0565b9392505050565b5f610988838360126109e0565b5f6109888383670de0b6b3a7640000610a36565b5f610988836b033b2e3c9fd0803ce800000084610a36565b5f61098883836b033b2e3c9fd0803ce8000000610a36565b5f818310610a0f57604051631a065cf160e01b8152600481018490526024810183905260440160405180910390fd5b610a198383610ca7565b610a2490600a610d9a565b610a2e9085610da5565b949350505050565b5f838302815f1985870982811083820303915050805f03610a6a57838281610a6057610a60610c26565b0492505050610988565b808411610a8a5760405163227bc15360e01b815260040160405180910390fd5b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010186841190950394909402919094039290920491909117919091029150509392505050565b5f60208284031215610b05575f80fd5b5035919050565b5f610120820190506001600160601b03808451168352806020850151166020840152506040830151610b44604084018261ffff169052565b506060830151610b5f60608401826001600160601b03169052565b506080830151610b7a60808401826001600160601b03169052565b5060a0830151610b9060a084018261ffff169052565b5060c0830151610ba660c084018261ffff169052565b5060e0830151610bc160e08401826001600160601b03169052565b50610100928301516001600160601b0316919092015290565b5f805f60608486031215610bec575f80fd5b505081359360208301359350604090920135919050565b5f60208284031215610c13575f80fd5b815163ffffffff81168114610988575f80fd5b634e487b7160e01b5f52601260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b5f82610c6857634e487b7160e01b5f52601260045260245ffd5b500490565b6001600160601b03828116828216039080821115610c8d57610c8d610c3a565b5092915050565b8082018082111561016057610160610c3a565b8181038181111561016057610160610c3a565b600181815b80851115610cf457815f1904821115610cda57610cda610c3a565b80851615610ce757918102915b93841c9390800290610cbf565b509250929050565b5f82610d0a57506001610160565b81610d1657505f610160565b8160018114610d2c5760028114610d3657610d52565b6001915050610160565b60ff841115610d4757610d47610c3a565b50506001821b610160565b5060208310610133831016604e8410600b8410161715610d75575081810a610160565b610d7f8383610cba565b805f1904821115610d9257610d92610c3a565b029392505050565b5f6109888383610cfc565b808202811582820484141761016057610160610c3a56fea2646970667358221220ff99a2ba502b946dd1054dc89984a8461a84cd5e0a16ceba4221179197fb2c8064736f6c634300081500330000000000000000000000000000000000000000000000000000000000000040000000000000000000000000437cc840e234c2127f54cd59b0b18af59c58676000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000386125f1867ec8e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000015ef86acdf95b2400000000000000000000000000000000000000000000000000000000000002134000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014b2df542376774e0",
"nonce": "0x2b",
"accessList": []
},
"additionalContracts": [],
"isFixedGasLimit": false
}
],
"receipts": [],
"libraries": [],
"pending": [],
"returns": {
"interestRateModule": {
"internal_type": "contract InterestRate",
"value": "0xa3301C4025F9dD8a37aa6E56F579c3177d8f8D9C"
}
},
"timestamp": 1711905234,
"chain": 1,
"commit": "47346f8"
}
Loading

0 comments on commit e9261cd

Please sign in to comment.