-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: finalized scenarios, added ronin bridge receiver, etc
- Loading branch information
1 parent
0f3cd57
commit f011826
Showing
15 changed files
with
186 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// SPDX-License-Identifier: BUSL-1.1 | ||
pragma solidity 0.8.15; | ||
|
||
import "../SweepableBridgeReceiver.sol"; | ||
|
||
contract RoninBridgeReceiver is SweepableBridgeReceiver { | ||
struct Any2EVMMessage { | ||
bytes32 messageId; | ||
uint64 sourceChainSelector; | ||
bytes sender; | ||
bytes data; | ||
EVMTokenAmount[] destTokenAmounts; | ||
} | ||
struct EVMTokenAmount { | ||
address token; | ||
uint256 amount; | ||
} | ||
|
||
error InvalidRouter(); | ||
|
||
address public l2Router; | ||
|
||
constructor(address l2Router_) { | ||
l2Router = l2Router_; | ||
} | ||
|
||
function ccipReceive(Any2EVMMessage calldata message) external { | ||
if (msg.sender != l2Router) revert InvalidRouter(); | ||
processMessage(toAddress(message.sender), message.data); | ||
} | ||
|
||
function toAddress(bytes memory data) public pure returns (address addr) { | ||
require(data.length >= 20, "Invalid data length"); | ||
return abi.decode(data, (address)); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"name": "Compound WETH", | ||
"symbol": "cWETHv3", | ||
"baseToken": "WETH", | ||
"baseTokenAddress": "0x3eb007a52b5Ba013e65B787c04bF775b946115B1", | ||
"rewardTokenAddress": "0xfF5C5b4e3Cbc5513b3Ef462f00E4477Ee16a8C56", | ||
"borrowMin": "0.01e18", | ||
"storeFrontPriceFactor": 0.6, | ||
"targetReserves": "5_000_000e18", | ||
"pauseGuardian": "0xf6c14190474A96189aad3e931E20c92E62D965D1", | ||
"rates": { | ||
"borrowBase": 0.015, | ||
"borrowSlopeLow": 0.0333, | ||
"borrowKink": 0.9, | ||
"borrowSlopeHigh": 4.0, | ||
"supplyBase": 0, | ||
"supplySlopeLow": 0.039, | ||
"supplyKink": 0.9, | ||
"supplySlopeHigh": 3.6 | ||
}, | ||
"tracking": { | ||
"indexScale": "1e15", | ||
"baseSupplySpeed": "46296296296e0", | ||
"baseBorrowSpeed": "46296296296e0", | ||
"baseMinForRewards": "1000e18" | ||
}, | ||
"assets": { | ||
"COMP": { | ||
"address": "0xfF5C5b4e3Cbc5513b3Ef462f00E4477Ee16a8C56", | ||
"decimals": "18", | ||
"borrowCF": 0.82, | ||
"liquidateCF": 0.87, | ||
"liquidationFactor": 0.93, | ||
"supplyCap": "2800e18" | ||
}, | ||
"WRON": { | ||
"address": "0xA959726154953bAe111746E265E6d754F48570E6", | ||
"decimals": "18", | ||
"borrowCF": 0.82, | ||
"liquidateCF": 0.87, | ||
"liquidationFactor": 0.93, | ||
"supplyCap": "2800e18" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.