-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Debridge DLN Facet (Version 1.0.0) [DeBridgeDlnFacet v1.0.0] (#827)
* Move DeBridgeDLNFacet from archive * Move docs from archive and update README * improve code coverage * improve code coverage * Fix opbnb * Update variable naming * Add mappings * Update demo * fix tests * Check for empty non EVM address * Various fixes * Add referral code * explicitly set orderAuthorityDst * Fix referral code mismatch * Always check for empty receiver address * Remove unneeded parameter * Update audit log * sort audited contracts
- Loading branch information
Showing
16 changed files
with
584 additions
and
56 deletions.
There are no files selected for viewing
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
Binary file not shown.
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 |
---|---|---|
@@ -1,26 +1,83 @@ | ||
{ | ||
"arbitrum": { | ||
"dlnSource": "0xeF4fB24aD0916217251F553c0596F8Edc630EB66" | ||
"networks": { | ||
"arbitrum": { | ||
"dlnSource": "0xeF4fB24aD0916217251F553c0596F8Edc630EB66" | ||
}, | ||
"avalanche": { | ||
"dlnSource": "0xeF4fB24aD0916217251F553c0596F8Edc630EB66" | ||
}, | ||
"bsc": { | ||
"dlnSource": "0xeF4fB24aD0916217251F553c0596F8Edc630EB66" | ||
}, | ||
"mainnet": { | ||
"dlnSource": "0xeF4fB24aD0916217251F553c0596F8Edc630EB66" | ||
}, | ||
"polygon": { | ||
"dlnSource": "0xeF4fB24aD0916217251F553c0596F8Edc630EB66" | ||
}, | ||
"linea": { | ||
"dlnSource": "0xeF4fB24aD0916217251F553c0596F8Edc630EB66" | ||
}, | ||
"base": { | ||
"dlnSource": "0xeF4fB24aD0916217251F553c0596F8Edc630EB66" | ||
}, | ||
"optimism": { | ||
"dlnSource": "0xeF4fB24aD0916217251F553c0596F8Edc630EB66" | ||
}, | ||
"gnosis": { | ||
"dlnSource": "0xeF4fB24aD0916217251F553c0596F8Edc630EB66" | ||
}, | ||
"metis": { | ||
"dlnSource": "0xeF4fB24aD0916217251F553c0596F8Edc630EB66" | ||
}, | ||
"solana": { | ||
"dlnSource": "src5qyZHqTqecJV4aY6Cb6zDZLMDzrDKKezs22MPHr4" | ||
} | ||
}, | ||
"avalanche": { | ||
"dlnSource": "0xeF4fB24aD0916217251F553c0596F8Edc630EB66" | ||
}, | ||
"bsc": { | ||
"dlnSource": "0xeF4fB24aD0916217251F553c0596F8Edc630EB66" | ||
}, | ||
"mainnet": { | ||
"dlnSource": "0xeF4fB24aD0916217251F553c0596F8Edc630EB66" | ||
}, | ||
"polygon": { | ||
"dlnSource": "0xeF4fB24aD0916217251F553c0596F8Edc630EB66" | ||
}, | ||
"linea": { | ||
"dlnSource": "0xeF4fB24aD0916217251F553c0596F8Edc630EB66" | ||
}, | ||
"base": { | ||
"dlnSource": "0xeF4fB24aD0916217251F553c0596F8Edc630EB66" | ||
}, | ||
"optimism": { | ||
"dlnSource": "0xeF4fB24aD0916217251F553c0596F8Edc630EB66" | ||
} | ||
"mappings": [ | ||
{ | ||
"chainId": 42161, | ||
"deBridgeChainId": 42161 | ||
}, | ||
{ | ||
"chainId": 43114, | ||
"deBridgeChainId": 43114 | ||
}, | ||
{ | ||
"chainId": 56, | ||
"deBridgeChainId": 56 | ||
}, | ||
{ | ||
"chainId": 1, | ||
"deBridgeChainId": 1 | ||
}, | ||
{ | ||
"chainId": 137, | ||
"deBridgeChainId": 137 | ||
}, | ||
{ | ||
"chainId": 59144, | ||
"deBridgeChainId": 59144 | ||
}, | ||
{ | ||
"chainId": 8453, | ||
"deBridgeChainId": 8453 | ||
}, | ||
{ | ||
"chainId": 10, | ||
"deBridgeChainId": 10 | ||
}, | ||
{ | ||
"chainId": 100, | ||
"deBridgeChainId": 100000002 | ||
}, | ||
{ | ||
"chainId": 1088, | ||
"deBridgeChainId": 100000004 | ||
}, | ||
{ | ||
"chainId": 1151111081099710, | ||
"deBridgeChainId": 7565164 | ||
} | ||
] | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// SPDX-License-Identifier: UNLICENSED | ||
pragma solidity ^0.8.17; | ||
|
||
import { UpdateScriptBase } from "./utils/UpdateScriptBase.sol"; | ||
import { stdJson } from "forge-std/StdJson.sol"; | ||
import { DeBridgeDlnFacet } from "lifi/Facets/DeBridgeDlnFacet.sol"; | ||
|
||
contract DeployScript is UpdateScriptBase { | ||
using stdJson for string; | ||
|
||
struct ChainIdConfig { | ||
uint256 chainId; | ||
uint256 deBridgeChainId; | ||
} | ||
|
||
function run() | ||
public | ||
returns (address[] memory facets, bytes memory cutData) | ||
{ | ||
return update("DeBridgeDlnFacet"); | ||
} | ||
|
||
function getCallData() internal override returns (bytes memory) { | ||
path = string.concat(root, "/config/dln.json"); | ||
json = vm.readFile(path); | ||
bytes memory rawChains = json.parseRaw(".mappings"); | ||
ChainIdConfig[] memory cidCfg = abi.decode( | ||
rawChains, | ||
(ChainIdConfig[]) | ||
); | ||
|
||
bytes memory callData = abi.encodeWithSelector( | ||
DeBridgeDlnFacet.initDeBridgeDln.selector, | ||
cidCfg | ||
); | ||
|
||
return callData; | ||
} | ||
} |
Oops, something went wrong.