102
config/scroll-config.js
Normal file
102
config/scroll-config.js
Normal file
@@ -0,0 +1,102 @@
|
||||
module.exports = {
|
||||
SCROLL_CONFIG: {
|
||||
//TOKEN
|
||||
WETH: "0x5300000000000000000000000000000000000004",
|
||||
CHI: "",
|
||||
DODO: "",
|
||||
|
||||
//Helper
|
||||
DODOSellHelper: "0x8eA40e8Da3ae64Bad5E77a5f7DB346499F543baC",
|
||||
DODOCalleeHelper: "0x44023441f2Bad375b6b5C6354B03c3E9AD01E269",
|
||||
DODOV1PmmHelper: "0x17644d3B366273faC75A07996E2F90A99A2946a7",
|
||||
DODOV2RouteHelper: "0xf5048d8F9163AF17Db522Abe9FaF37735C911320",
|
||||
ERC20Helper: "0xB5c7BA1EAde74800cD6cf5F56b1c4562De373780",
|
||||
DODOSwapCalcHelper: "0xbcd2FDC3B884Cf0dfD932f55Ec2Fe1fB7e8c62Da",
|
||||
MultiCall: "0xf5Ec1a19e1570bDf0A3AaA6585274f27027270b1",
|
||||
MultiCallWithValid: "0x6433407a29706Bbdd43b36cd402a53A174f066a1",
|
||||
CurveSample: "",
|
||||
|
||||
//Template
|
||||
CloneFactory: "0x628E5081bA93b1c4F58E54e7175088B1ACe58852",
|
||||
FeeRateModel: "0x7B07164ecFaF0F0D85DFC062Bc205a4674c75Aa0",
|
||||
FeeRateDIP3Impl: "0x4aAe1d041C01078725dB016BA4D4F72455CaF931",
|
||||
UserQuota: "",
|
||||
PermissionManager: "0x5fe43C0EbfE66b83C10A9A37AD1E4aC640AAAA65",
|
||||
DVM: "0x1fC8EC204549C865a17b4059A57decA66A4Bd4cC",
|
||||
DPP: "",
|
||||
DSP: "0x24549FC74B3076A962624A26370ed556c467F74C",
|
||||
DPPAdmin: "",
|
||||
DPPAdvanced: "0x297da061D1dE0132D241Fafed224288B34d81005",
|
||||
DPPAdvancedAdmin: "0xCD536b4DECFD2fa0443666B6becD145F8aDe2E48",
|
||||
CP: "0x3dD629473A2eD7f3C6299FFD9F3e0C283d073f11",
|
||||
ERC20MineV2: "0x5B2fd46E6E3Ff1E479d651ec0b210882Aa9871dF",
|
||||
ERC20MineV3: "0xAC716E87b0853C0712674e8E3a8435a489F276b4",
|
||||
ERC20: "0x8414560d69650bC0c915d5d4385e1714a23cbe81",
|
||||
CustomERC20: "0xEAC4BFef7D1c872Ed705B01856af7f9802adC596",
|
||||
CustomMintableERC20: "0x04f7BaE2A4c05cd567F762E33450deBCebdC89EA",
|
||||
|
||||
//Factory
|
||||
DVMFactory: "0x5a0C840a7089aa222c4458b3BE0947fe5a5006DE",
|
||||
DPPFactory: "0x31AC053c31a77055b2ae2d3899091C0A9c19cE3a",
|
||||
DSPFactory: "0x7E9c460d0A10bd0605B15F0d0388e307d34a62E6",
|
||||
CrowdPoolingFactory: "0x4632e6EBd4a01eBF54739A9D71a62CEdb29E9183",
|
||||
ERC20Factory: "",
|
||||
ERC20V2Factory: "",
|
||||
ERC20V3Factory: "0x1F076a800005c758a505E759720eb6737136e893",
|
||||
DODOMineV2Factory: "0xAE1E7e4c5743321d2a8ceeD179264998a56CF1d9",
|
||||
DODOMineV3Registry: "0xD63c8Bf9ACaFfE6da2a4043F1C94CC3a55F28117",
|
||||
|
||||
//Approve
|
||||
DODOApprove: "0x20E77aD760eC9E922Fd2dA8847ABFbB2471B92CD",
|
||||
DODOApproveProxy: "0x0218E24dd47f9a1D05418eAa5B9cEDB13Ca48492",
|
||||
|
||||
//Periphery
|
||||
DODOIncentive: "",
|
||||
|
||||
//Adpater
|
||||
DODOV1Adapter: "",
|
||||
DODOV2Adapter: "0x716fcc67dcA500A91B4a28c9255262c398D8f971",
|
||||
UniAdapter: "",
|
||||
CurveAdapter: "",
|
||||
|
||||
//Proxy
|
||||
DODOV2Proxy: "0xe49781e6186214d88aACFd9eBc8cE40E3CDc066D",
|
||||
DSPProxy: "0x7Dd8c909E1F48a68FfEF03492761AF17B1496EDc",
|
||||
CpProxy: "0xc4A1a152812dE96b2B1861E433f42290CDD7f113",
|
||||
DPPProxy: "0x99d69565EdA438E3ebAA0627A407968ABD0f755b",
|
||||
RouteProxy: "",
|
||||
FeeRouteProxy1: "0x4e998615aD430C1cA46A69d813edE6EB3EC55eDb", // for front-end
|
||||
FeeRouteProxy2: "0xf0512872fEc0173d1d99c2dd8CDCb770054b675b", // for widget
|
||||
DODOMineV3Proxy: "0x14F7B8Fb0c1447DdE7bcf92a8d9BB058c8A5FE64",
|
||||
|
||||
//vDODO
|
||||
DODOCirculationHelper: "",
|
||||
Governance: "",
|
||||
dodoTeam: "",
|
||||
vDODOToken: "",
|
||||
|
||||
//Account
|
||||
multiSigAddress: "0xa7b9C3a116b20bEDDdBE4d90ff97157f67F0bD97",
|
||||
defaultMaintainer: "0xa7b9C3a116b20bEDDdBE4d90ff97157f67F0bD97",
|
||||
|
||||
//================== NFT ====================
|
||||
BuyoutModel: "",
|
||||
Fragment: "",
|
||||
NFTCollateralVault: "",
|
||||
DODONFTRouteHelper: "",
|
||||
|
||||
DodoNftErc721: "",
|
||||
DodoNftErc1155: "",
|
||||
|
||||
DODONFTRegistry: "",
|
||||
DODONFTProxy: "",
|
||||
|
||||
//=================== NFTPool ==================
|
||||
DODONFTApprove: "",
|
||||
DODONFTPoolProxy: "",
|
||||
FilterAdmin: "",
|
||||
FilterERC721V1: "",
|
||||
FilterERC1155V1: "",
|
||||
NFTPoolController: ""
|
||||
}
|
||||
}
|
||||
@@ -17,6 +17,7 @@ const { BASE_CONFIG } = require("./config/base-config");
|
||||
const { SCROLL_SEPOLIA_CONFIG } = require("./config/scroll-sepolia-config");
|
||||
const { MANTA_TESTNET_CONFIG } = require("./config/manta-testnet-config");
|
||||
const { OPTIMISM_CONFIG } = require("./config/optimism-config");
|
||||
const { SCROLL_CONFIG } = require("./config/scroll-config");
|
||||
|
||||
exports.GetConfig = function (network, accounts) {
|
||||
var CONFIG = {}
|
||||
@@ -61,7 +62,7 @@ exports.GetConfig = function (network, accounts) {
|
||||
CONFIG = BASE_CONFIG
|
||||
break;
|
||||
case "dashboard":
|
||||
CONFIG = CFX_CONFIG
|
||||
CONFIG = SCROLL_CONFIG
|
||||
break;
|
||||
//testnet
|
||||
case "kovan":
|
||||
|
||||
6
contracts/external/Multicall.sol
vendored
6
contracts/external/Multicall.sol
vendored
@@ -12,13 +12,13 @@ contract Multicall {
|
||||
address target;
|
||||
bytes callData;
|
||||
}
|
||||
function aggregate(Call[] memory calls) public returns (uint256 blockNumber, bytes[] memory returnData, bool[] memory dataValid) {
|
||||
|
||||
function aggregate(Call[] memory calls) public returns (uint256 blockNumber, bytes[] memory returnData) {
|
||||
blockNumber = block.number;
|
||||
returnData = new bytes[](calls.length);
|
||||
dataValid = new bool[](calls.length);
|
||||
for(uint256 i = 0; i < calls.length; i++) {
|
||||
(bool success, bytes memory ret) = calls[i].target.call(calls[i].callData);
|
||||
dataValid[i] = success;
|
||||
require(success);
|
||||
returnData[i] = ret;
|
||||
}
|
||||
}
|
||||
|
||||
47
contracts/external/MulticallWithValid.sol
vendored
Normal file
47
contracts/external/MulticallWithValid.sol
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
pragma solidity 0.6.9;
|
||||
pragma experimental ABIEncoderV2;
|
||||
|
||||
/// @title Multicall - Aggregate results from multiple read-only function calls
|
||||
/// @author Michael Elliot <mike@makerdao.com>
|
||||
/// @author Joshua Levine <joshua@makerdao.com>
|
||||
/// @author Nick Johnson <arachnid@notdot.net>
|
||||
|
||||
// WithValid
|
||||
contract Multicall {
|
||||
struct Call {
|
||||
address target;
|
||||
bytes callData;
|
||||
}
|
||||
function aggregate(Call[] memory calls) public returns (uint256 blockNumber, bytes[] memory returnData, bool[] memory dataValid) {
|
||||
blockNumber = block.number;
|
||||
returnData = new bytes[](calls.length);
|
||||
dataValid = new bool[](calls.length);
|
||||
for(uint256 i = 0; i < calls.length; i++) {
|
||||
(bool success, bytes memory ret) = calls[i].target.call(calls[i].callData);
|
||||
dataValid[i] = success;
|
||||
returnData[i] = ret;
|
||||
}
|
||||
}
|
||||
// Helper functions
|
||||
function getEthBalance(address addr) public view returns (uint256 balance) {
|
||||
balance = addr.balance;
|
||||
}
|
||||
function getBlockHash(uint256 blockNumber) public view returns (bytes32 blockHash) {
|
||||
blockHash = blockhash(blockNumber);
|
||||
}
|
||||
function getLastBlockHash() public view returns (bytes32 blockHash) {
|
||||
blockHash = blockhash(block.number - 1);
|
||||
}
|
||||
function getCurrentBlockTimestamp() public view returns (uint256 timestamp) {
|
||||
timestamp = block.timestamp;
|
||||
}
|
||||
function getCurrentBlockDifficulty() public view returns (uint256 difficulty) {
|
||||
difficulty = block.difficulty;
|
||||
}
|
||||
function getCurrentBlockGasLimit() public view returns (uint256 gaslimit) {
|
||||
gaslimit = block.gaslimit;
|
||||
}
|
||||
function getCurrentBlockCoinbase() public view returns (address coinbase) {
|
||||
coinbase = block.coinbase;
|
||||
}
|
||||
}
|
||||
@@ -475,18 +475,22 @@ module.exports = async (deployer, network, accounts) => {
|
||||
}
|
||||
|
||||
//Adapter
|
||||
/*
|
||||
if (DODOV1AdpaterAddress == "") {
|
||||
await deployer.deploy(DODOV1Adapter, DODOSellHelperAddress);
|
||||
logger.log("DODOV1Adapter Address: ", DODOV1Adapter.address);
|
||||
}
|
||||
*/
|
||||
if (DODOV2AdapterAddress == "") {
|
||||
await deployer.deploy(DODOV2Adapter)
|
||||
logger.log("DODOV2Adapter Address: ", DODOV2Adapter.address);
|
||||
}
|
||||
/*
|
||||
if (UniAdapterAddress == "") {
|
||||
await deployer.deploy(UniAdapter)
|
||||
logger.log("UniAdapter Address: ", UniAdapter.address);
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
//Proxy
|
||||
@@ -578,25 +582,31 @@ module.exports = async (deployer, network, accounts) => {
|
||||
logger.log("DODOApproveProxy Init tx: ", tx.tx);
|
||||
|
||||
//Approve init
|
||||
console.log("DODOApprove init");
|
||||
const DODOApproveInstance = await DODOApprove.at(DODOApproveAddress);
|
||||
tx = await DODOApproveInstance.init(multiSigAddress, DODOApproveProxyAddress);
|
||||
logger.log("DODOApprove Init tx: ", tx.tx);
|
||||
|
||||
//DODOMineV2Factory set owner
|
||||
console.log("DODOMineV2Factory set owner");
|
||||
const dodoMineV2FactoryInstance = await DODOMineV2Factory.at(DODOMineV2FactoryAddress);
|
||||
var tx = await dodoMineV2FactoryInstance.initOwner(multiSigAddress);
|
||||
logger.log("Init DODOMineV2Factory Tx:", tx.tx);
|
||||
|
||||
|
||||
//Set FeeRateImpl
|
||||
//Set FeeRateImpl, need owner
|
||||
console.log("Set FeeRateImpl");
|
||||
const FeeRateModelInstance = await FeeRateModelTemplate.at(DefaultMtFeeRateAddress);
|
||||
tx = await FeeRateModelInstance.setFeeProxy(FeeRateDIP3ImplAddress);
|
||||
logger.log("Set FeeRateImpl tx: ", tx.tx);
|
||||
|
||||
|
||||
//ERC20V3Factory set fee
|
||||
// console.log("ERC20V3Factory set fee");
|
||||
// const ERC20V3FactoryInstance = await ERC20V3Factory.at(ERC20V3FactoryAddress);
|
||||
// tx = await ERC20V3FactoryInstance.changeCreateFee("100000000000000000");
|
||||
// logger.log("Set ERC20V3 fee tx: ", tx.tx);
|
||||
|
||||
//DODOMineV2Factory set owner
|
||||
const dodoMineV2FactoryInstance = await DODOMineV2Factory.at(DODOMineV2FactoryAddress);
|
||||
var tx = await dodoMineV2FactoryInstance.initOwner(multiSigAddress);
|
||||
logger.log("Init DODOMineV2Factory Tx:", tx.tx);
|
||||
|
||||
//DODOMineV3Registry add Proxy as admin
|
||||
const dodoMineV3RegistryInstance = await DODOMineV3Registry.at(DODOMineV3RegistryAddress);
|
||||
|
||||
7861
package-lock.json
generated
7861
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -56,6 +56,6 @@
|
||||
"prettier-plugin-solidity": "^1.0.0-alpha.52",
|
||||
"solidity-coverage": "^0.7.7",
|
||||
"truffle-assertions": "^0.9.2",
|
||||
"truffle-plugin-verify": "^0.6.4"
|
||||
"truffle-plugin-verify": "^0.5.33"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user