mirror of
https://github.com/Instadapp/dsa-polygon-migration.git
synced 2024-07-29 22:27:58 +00:00
matic receiver condition
This commit is contained in:
parent
bd72d17bc5
commit
e31032a3d3
|
@ -112,6 +112,8 @@ contract AaveV2Migrator is MigrateResolver {
|
|||
}
|
||||
|
||||
function onStateReceive(uint256 stateId, bytes calldata receivedData) external {
|
||||
// Add some more require statements. Any kind of hashing for better privacy?
|
||||
require(msg.sender == maticReceiver, "not-receiver-address");
|
||||
require(stateId > lastStateId, "wrong-data");
|
||||
lastStateId = stateId;
|
||||
|
||||
|
|
|
@ -36,6 +36,9 @@ contract Variables {
|
|||
|
||||
// TODO: Set by construtor?
|
||||
mapping(address => bool) public isSupportedToken;
|
||||
address[] public supportedTokens; // don't add ethAddr. Only add wethAddr
|
||||
address[] public supportedTokens; // don't add maticAddr. Only add wmaticAddr?
|
||||
|
||||
// Address which will receive L1 data and post it on L2
|
||||
address public maticReceiver = address(0); // TODO: Change address
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user