deploy to dodo testnet
This commit is contained in:
63
config/dodo-testnet-config.js
Normal file
63
config/dodo-testnet-config.js
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
module.exports = {
|
||||||
|
DODO_TESTNET_CONFIG: {
|
||||||
|
//TOKEN
|
||||||
|
WETH: "0xDA89314035264Ade23313f971AaE5393068Ea6F7",
|
||||||
|
|
||||||
|
//Helper
|
||||||
|
DODOSellHelper: "0x3a64Ec3606FF7310E8fAd6FcC008e39705fB496d",
|
||||||
|
DODOCalleeHelper: "0x85C23863977dA7c3CEaCe129e292ba0F4d8aAA00",
|
||||||
|
DODOV1PmmHelper: "0x3A7Bc5F9E41356728f037f17D88c642EE46d1Aaa",
|
||||||
|
DODOV2RouteHelper: "0x22AdDF954Ea92a3A80403Fe353093f7bF58665EC",
|
||||||
|
ERC20Helper: "0x8b09DB11ea380d6454D2592D334FFC319ce6EF3E",
|
||||||
|
DODOSwapCalcHelper: "0xD0CF7dfbF09CAfaB8AEf00e0Ce19a4638004a364",
|
||||||
|
MultiCall: "0xB95eD7E958E196688984951F41Ac2888F4B10aB9",
|
||||||
|
MultiCallWithValid: "0x2Da0855f04919D402Af88D0D04AbB38177FE47fa",
|
||||||
|
CurveSample: "",
|
||||||
|
|
||||||
|
//Template
|
||||||
|
CloneFactory: "0x8b87D4B384517d2E1AFC61b3292d6e6C411ea303",
|
||||||
|
FeeRateModel: "0xE6cecb7460c9E52aA483cb1f0E87d78D7085686F",
|
||||||
|
FeeRateDIP3Impl: "0x2e50e3e18c19C7d80B81888a961A13aEE49b962E",
|
||||||
|
UserQuota: "",
|
||||||
|
PermissionManager: "0x577389Ef538f8767865f68f3EdBBFBfD60afa387",
|
||||||
|
DVM: "0x46E55A974c5995675b025f7F607C3278B36f0c29",
|
||||||
|
DSP: "0x89ba4039841587b0a4cffdf17aee30cacf006f4d",
|
||||||
|
DPPAdvanced: "0x46afe01d758a46d64c7d8e0791314d5db3e2e683",
|
||||||
|
DPPAdvancedAdmin: "0x5245f5E66792cfbaCB64eFAef3121e7c5ccD879b",
|
||||||
|
CP: "0xF0f8FB90039875e2682678E6C23828BdD16fAC9d",
|
||||||
|
ERC20MineV2: "0xFe837A3530dD566401d35beFCd55582AF7c4dfFC",
|
||||||
|
ERC20MineV3: "0x056FcE6B76AF3050F54B71Fc9B5fcb7C387BfC1A",
|
||||||
|
ERC20: "0xc88492049C990c0eF2eB0F77D1Aef8D66Bf16ba8",
|
||||||
|
CustomERC20: "0x78d43a889F42a344Fe98C3fb9455791Dc8178d55",
|
||||||
|
CustomMintableERC20: "0x69716E51E3F8Bec9c3D4E1bB46396384AE11C594",
|
||||||
|
|
||||||
|
//Factory
|
||||||
|
DVMFactory: "0xB88f7eb2dA59E1E8E00E0158b195D5ca48403921",
|
||||||
|
DPPFactory: "0x297B5D923b9C18081ddE398B5b5aC6E09336B27c",
|
||||||
|
DSPFactory: "0xC975769aB5Ef947CB82535ca6607B0683a355195",
|
||||||
|
CrowdPoolingFactory: "0x9691bBce4680d0c0bb9E798a71984984Ab1440C1",
|
||||||
|
ERC20V3Factory: "0x306ae919b99c187Fe5eCBdE980E24228ae888182",
|
||||||
|
DODOMineV2Factory: "0xFc66a1283a43Ce2f4d4FA0623d4654754577a09d",
|
||||||
|
DODOMineV3Registry: "0xF9a6c9BE0a1149C69EF537359c78DeB5e6264ec6",
|
||||||
|
|
||||||
|
//Approve
|
||||||
|
DODOApprove: "0x5977F12664b4E634dFbAAD0ad4a6a81057254dA8",
|
||||||
|
DODOApproveProxy: "0x0343C5757Fb98aD9eF39824e08B852aF61C71c64",
|
||||||
|
|
||||||
|
//Adpater
|
||||||
|
DODOV2Adapter: "0x9ef37fD4791eb28e46c3D50Ed83F2a10B3082784",
|
||||||
|
|
||||||
|
//Proxy
|
||||||
|
DODOV2Proxy: "0x08e122Ee90099927E9764fE16d1094d563d2f4E2",
|
||||||
|
DSPProxy: "0xec1Ac56f266d1937ab69f7EB08D8889A41E39278",
|
||||||
|
CpProxy: "x351a86A2C8dc47D396305AAcd7F126E096b2eee4",
|
||||||
|
DPPProxy: "0x19E10fb5875C4901D9650aFc001197285dBBC060",
|
||||||
|
FeeRouteProxy1: "0x202bee65b164aecbb6a2318438bf46bef14e1072", // for front-end
|
||||||
|
FeeRouteProxy2: "0x341ecde9ae78d91e810cead1d270aa0f7e0b0d1a", // for widget
|
||||||
|
DODOMineV3Proxy: "0x78172691DD3B8ADa7aEbd9bFfB487FB11D735DB2",
|
||||||
|
|
||||||
|
//Account
|
||||||
|
multiSigAddress: "0xfa0d8ebca31a1501144a785a2929e9f91b0571d0",
|
||||||
|
defaultMaintainer: "0xfa0d8ebca31a1501144a785a2929e9f91b0571d0",
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -11,7 +11,7 @@ const { MOONRIVER_CONFIG } = require("./config/moonriver-config");
|
|||||||
const { BOBA_CONFIG } = require("./config/boba-config");
|
const { BOBA_CONFIG } = require("./config/boba-config");
|
||||||
const { AVAX_CONFIG } = require("./config/avax-config");
|
const { AVAX_CONFIG } = require("./config/avax-config");
|
||||||
const { DASHBOARD_CONFIG } = require("./config/dashboard-config");
|
const { DASHBOARD_CONFIG } = require("./config/dashboard-config");
|
||||||
const {CFX_CONFIG} = require("./config/cfx-config.js");
|
const { CFX_CONFIG } = require("./config/cfx-config.js");
|
||||||
const { LINEA_CONFIG } = require("./config/linea-config");
|
const { LINEA_CONFIG } = require("./config/linea-config");
|
||||||
const { BASE_CONFIG } = require("./config/base-config");
|
const { BASE_CONFIG } = require("./config/base-config");
|
||||||
const { SCROLL_SEPOLIA_CONFIG } = require("./config/scroll-sepolia-config");
|
const { SCROLL_SEPOLIA_CONFIG } = require("./config/scroll-sepolia-config");
|
||||||
@@ -21,6 +21,7 @@ const { MANTA_CONFIG } = require("./config/manta-config");
|
|||||||
const { MANTLE_CONFIG } = require("./config/mantle-config");
|
const { MANTLE_CONFIG } = require("./config/mantle-config");
|
||||||
const { OPTIMISM_CONFIG } = require("./config/optimism-config");
|
const { OPTIMISM_CONFIG } = require("./config/optimism-config");
|
||||||
const { SCROLL_CONFIG } = require("./config/scroll-config");
|
const { SCROLL_CONFIG } = require("./config/scroll-config");
|
||||||
|
const { DODO_TESTNET_CONFIG } = require("./config/dodo-testnet-config");
|
||||||
|
|
||||||
exports.GetConfig = function (network, accounts) {
|
exports.GetConfig = function (network, accounts) {
|
||||||
var CONFIG = {}
|
var CONFIG = {}
|
||||||
@@ -84,6 +85,8 @@ exports.GetConfig = function (network, accounts) {
|
|||||||
case "manta-testnet":
|
case "manta-testnet":
|
||||||
CONFIG = MANTA_TESTNET_CONFIG
|
CONFIG = MANTA_TESTNET_CONFIG
|
||||||
break;
|
break;
|
||||||
|
case "dodotest":
|
||||||
|
CONFIG = DODO_TESTNET_CONFIG
|
||||||
}
|
}
|
||||||
return CONFIG
|
return CONFIG
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ contract DSPFunding is DSPVault {
|
|||||||
// But May Happen,reserve >0 But totalSupply = 0
|
// But May Happen,reserve >0 But totalSupply = 0
|
||||||
if (totalSupply == 0) {
|
if (totalSupply == 0) {
|
||||||
// case 1. initial supply
|
// case 1. initial supply
|
||||||
|
require(_QUOTE_TARGET_ > 0, "QUOTE_TARGET_IS_ZERO");
|
||||||
require(quoteBalance > 0, "ZERO_QUOTE_AMOUNT");
|
require(quoteBalance > 0, "ZERO_QUOTE_AMOUNT");
|
||||||
shares = quoteBalance < DecimalMath.mulFloor(baseBalance, _I_)
|
shares = quoteBalance < DecimalMath.mulFloor(baseBalance, _I_)
|
||||||
? DecimalMath.divFloor(quoteBalance, _I_)
|
? DecimalMath.divFloor(quoteBalance, _I_)
|
||||||
|
|||||||
@@ -45,7 +45,6 @@ contract DVMFunding is DVMVault {
|
|||||||
if (totalSupply == 0) {
|
if (totalSupply == 0) {
|
||||||
// case 1. initial supply
|
// case 1. initial supply
|
||||||
shares = baseBalance; // 以免出现balance很大但shares很小的情况
|
shares = baseBalance; // 以免出现balance很大但shares很小的情况
|
||||||
require(_QUOTE_TARGET_ > 0, "QUOTE_TARGET_IS_ZERO");
|
|
||||||
require(shares > 2001, "MINT_AMOUNT_NOT_ENOUGH");
|
require(shares > 2001, "MINT_AMOUNT_NOT_ENOUGH");
|
||||||
_mint(address(0), 1001);
|
_mint(address(0), 1001);
|
||||||
shares -= 1001;
|
shares -= 1001;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ pragma solidity 0.6.9;
|
|||||||
pragma experimental ABIEncoderV2;
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
import {IDODOAdapter} from "../intf/IDODOAdapter.sol";
|
import {IDODOAdapter} from "../intf/IDODOAdapter.sol";
|
||||||
import {IUniswapV3SwapCallback} from "../intf/IUniswapV3SwapCallback.sol";
|
import {IUniswapV3SwapCallback} from "../intf/IUniswapV3SwapCallBack.sol";
|
||||||
import {IUniV3} from "../intf/IUniV3.sol";
|
import {IUniV3} from "../intf/IUniV3.sol";
|
||||||
import {IERC20} from "../../intf/IERC20.sol";
|
import {IERC20} from "../../intf/IERC20.sol";
|
||||||
import {SafeMath} from "../../lib/SafeMath.sol";
|
import {SafeMath} from "../../lib/SafeMath.sol";
|
||||||
|
|||||||
7890
package-lock.json
generated
7890
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -24,7 +24,7 @@
|
|||||||
"node": "ganache-cli --port 8545 -l 0x1fffffffffffff -i 5777 -g 1 --allowUnlimitedContractSize"
|
"node": "ganache-cli --port 8545 -l 0x1fffffffffffff -i 5777 -g 1 --allowUnlimitedContractSize"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@truffle/hdwallet-provider": "^1.5.1",
|
"@truffle/hdwallet-provider": "^1.7.0",
|
||||||
"@types/chai": "^4.2.11",
|
"@types/chai": "^4.2.11",
|
||||||
"@types/es6-promisify": "^6.0.0",
|
"@types/es6-promisify": "^6.0.0",
|
||||||
"@types/ethereumjs-abi": "^0.6.3",
|
"@types/ethereumjs-abi": "^0.6.3",
|
||||||
@@ -36,13 +36,15 @@
|
|||||||
"bignumber.js": "^9.0.0",
|
"bignumber.js": "^9.0.0",
|
||||||
"chai-bignumber": "^3.0.0",
|
"chai-bignumber": "^3.0.0",
|
||||||
"debug": "^4.1.1",
|
"debug": "^4.1.1",
|
||||||
"dotenv-flow": "^3.1.0",
|
"dotenv": "^16.4.5",
|
||||||
|
"dotenv-flow": "^3.3.0",
|
||||||
"es6-promisify": "^6.1.1",
|
"es6-promisify": "^6.1.1",
|
||||||
"ethereumjs-util": "^7.0.7",
|
"ethereumjs-util": "^7.0.7",
|
||||||
"ethjs": "^0.4.0",
|
"ethjs": "^0.4.0",
|
||||||
"lodash": "^4.17.20",
|
"lodash": "^4.17.20",
|
||||||
"mocha": "^7.2.0",
|
"mocha": "^7.2.0",
|
||||||
"solc": "^0.6.9",
|
"solc": "^0.6.9",
|
||||||
|
"truffle-hdwallet-provider": "^1.0.17",
|
||||||
"ts-node": "^8.10.2",
|
"ts-node": "^8.10.2",
|
||||||
"typescript": "^3.9.5",
|
"typescript": "^3.9.5",
|
||||||
"web3": "^1.2.8",
|
"web3": "^1.2.8",
|
||||||
@@ -52,6 +54,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"chai": "^4.2.0",
|
"chai": "^4.2.0",
|
||||||
"ganache-cli": "^6.9.1",
|
"ganache-cli": "^6.9.1",
|
||||||
|
"hardhat": "^2.22.2",
|
||||||
"prettier": "^2.0.5",
|
"prettier": "^2.0.5",
|
||||||
"prettier-plugin-solidity": "^1.0.0-alpha.52",
|
"prettier-plugin-solidity": "^1.0.0-alpha.52",
|
||||||
"solidity-coverage": "^0.7.7",
|
"solidity-coverage": "^0.7.7",
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
* phrase from a file you've .gitignored so it doesn't accidentally become public.
|
* phrase from a file you've .gitignored so it doesn't accidentally become public.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
require("dotenv").config();
|
||||||
var HDWalletProvider = require("@truffle/hdwallet-provider");
|
var HDWalletProvider = require("@truffle/hdwallet-provider");
|
||||||
var privKey = process.env.privKey;
|
var privKey = process.env.privKey;
|
||||||
var infuraId = process.env.infuraId;
|
var infuraId = process.env.infuraId;
|
||||||
@@ -41,7 +41,7 @@ module.exports = {
|
|||||||
*/
|
*/
|
||||||
deploySwitch: {
|
deploySwitch: {
|
||||||
DEPLOY_V1: false,
|
DEPLOY_V1: false,
|
||||||
DEPLOY_V2: false,
|
DEPLOY_V2: true,
|
||||||
ERC20V3Factory: false,
|
ERC20V3Factory: false,
|
||||||
MOCK_TOKEN: false,
|
MOCK_TOKEN: false,
|
||||||
MOCK_V2_POOL: false,
|
MOCK_V2_POOL: false,
|
||||||
@@ -84,7 +84,7 @@ module.exports = {
|
|||||||
polygonscan: process.env.POLYGONSCAN_API_KEY,
|
polygonscan: process.env.POLYGONSCAN_API_KEY,
|
||||||
snowtrace: process.env.SNOWTRACE_API_KEY,
|
snowtrace: process.env.SNOWTRACE_API_KEY,
|
||||||
scroll: "fakekey",
|
scroll: "fakekey",
|
||||||
calderaexplorer:"fakekey",
|
calderaexplorer: "fakekey",
|
||||||
},
|
},
|
||||||
|
|
||||||
networks: {
|
networks: {
|
||||||
@@ -245,6 +245,7 @@ module.exports = {
|
|||||||
// timeoutBlocks: 200,
|
// timeoutBlocks: 200,
|
||||||
skipDryRun: true
|
skipDryRun: true
|
||||||
},
|
},
|
||||||
|
|
||||||
base: {
|
base: {
|
||||||
networkCheckTimeout: 1000000,
|
networkCheckTimeout: 1000000,
|
||||||
provider: () => {
|
provider: () => {
|
||||||
@@ -265,6 +266,19 @@ module.exports = {
|
|||||||
network_id: "10"
|
network_id: "10"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
dodotest: {
|
||||||
|
networkCheckTimeout: 100000,
|
||||||
|
provider: () => {
|
||||||
|
return new HDWalletProvider({
|
||||||
|
privateKeys: [privKey],
|
||||||
|
providerOrUrl: 'https://dodochain-testnet.alt.technology',
|
||||||
|
chainId: 53457
|
||||||
|
})
|
||||||
|
},
|
||||||
|
network_id: '53457',
|
||||||
|
skipDryRun: true
|
||||||
|
},
|
||||||
|
|
||||||
coverage: {
|
coverage: {
|
||||||
host: "127.0.0.1",
|
host: "127.0.0.1",
|
||||||
port: 6545,
|
port: 6545,
|
||||||
|
|||||||
97
yarn-error.log
Normal file
97
yarn-error.log
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
Arguments:
|
||||||
|
/home/skye/.nvm/versions/node/v18.14.0/bin/node /home/skye/.cache/node/corepack/yarn/1.22.19/bin/yarn.js
|
||||||
|
|
||||||
|
PATH:
|
||||||
|
/home/skye/.vscode-server/bin/e170252f762678dec6ca2cc69aba1570769a5d39/bin/remote-cli:/home/skye/.nvm/versions/node/v18.14.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Program Files/Git/cmd:/mnt/c/Python311/Scripts/:/mnt/c/Python311/:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/d/Python/Python310:/mnt/d/Python/Python310/Scripts:/mnt/d/nodejs/:/mnt/c/ProgramData/chocolatey/bin:/mnt/d/Go/bin:/mnt/d/anaconda3:/mnt/d/anaconda3/Scripts:/mnt/d/anaconda3/Library/bin:/mnt/c/Users/王翊倩/AppData/Local/Microsoft/WindowsApps:/mnt/d/Python/Python310/Scripts:/mnt/d/Microsoft VS Code/Microsoft VS Code/bin:/mnt/c/Users/王翊倩/AppData/Roaming/npm:/mnt/c/Users/王翊倩/go/bin:/snap/bin:/home/skye/.foundry/bin:/home/skye/.foundry/bin
|
||||||
|
|
||||||
|
Yarn version:
|
||||||
|
1.22.19
|
||||||
|
|
||||||
|
Node version:
|
||||||
|
18.14.0
|
||||||
|
|
||||||
|
Platform:
|
||||||
|
linux x64
|
||||||
|
|
||||||
|
Trace:
|
||||||
|
Error: https://github.com/web3-js/WebSocket-Node: ESOCKETTIMEDOUT
|
||||||
|
at ClientRequest.<anonymous> (/home/skye/.cache/node/corepack/yarn/1.22.19/lib/cli.js:141517:19)
|
||||||
|
at Object.onceWrapper (node:events:627:28)
|
||||||
|
at ClientRequest.emit (node:events:513:28)
|
||||||
|
at TLSSocket.emitRequestTimeout (node:_http_client:848:9)
|
||||||
|
at Object.onceWrapper (node:events:627:28)
|
||||||
|
at TLSSocket.emit (node:events:525:35)
|
||||||
|
at Socket._onTimeout (node:net:570:8)
|
||||||
|
at listOnTimeout (node:internal/timers:569:17)
|
||||||
|
at process.processTimers (node:internal/timers:512:7)
|
||||||
|
|
||||||
|
npm manifest:
|
||||||
|
{
|
||||||
|
"name": "dodo",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "a kind of bird",
|
||||||
|
"main": "index.js",
|
||||||
|
"author": "dodo breeder",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"keywords": [
|
||||||
|
"dodo",
|
||||||
|
"ethereum",
|
||||||
|
"pmm"
|
||||||
|
],
|
||||||
|
"scripts": {
|
||||||
|
"prettier": "prettier --write **/*.sol",
|
||||||
|
"migrate": "truffle migrate",
|
||||||
|
"compile": "rm -r build && truffle compile",
|
||||||
|
"coverage": "NETWORK_ID=1002 RPC_NODE_URI=http://127.0.0.1:6545 COVERAGE=true truffle run coverage",
|
||||||
|
"test": "truffle compile && truffle test",
|
||||||
|
"test_only": "truffle test",
|
||||||
|
"deploy": "truffle migrate --network=$NETWORK --reset",
|
||||||
|
"deploy_kovan": "NETWORK=kovan npm run deploy",
|
||||||
|
"deploy_mainnet": "NETWORK=mainnet npm run deploy",
|
||||||
|
"deploy_test": "NETWORK=development npm run deploy",
|
||||||
|
"node": "ganache-cli --port 8545 -l 0x1fffffffffffff -i 5777 -g 1 --allowUnlimitedContractSize"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@truffle/hdwallet-provider": "^1.7.0",
|
||||||
|
"@types/chai": "^4.2.11",
|
||||||
|
"@types/es6-promisify": "^6.0.0",
|
||||||
|
"@types/ethereumjs-abi": "^0.6.3",
|
||||||
|
"@types/mocha": "^7.0.2",
|
||||||
|
"assert": "^2.0.0",
|
||||||
|
"axios": "^0.24.0",
|
||||||
|
"babel-cli": "^6.26.0",
|
||||||
|
"babel-eslint": "^10.1.0",
|
||||||
|
"bignumber.js": "^9.0.0",
|
||||||
|
"chai-bignumber": "^3.0.0",
|
||||||
|
"debug": "^4.1.1",
|
||||||
|
"dotenv": "^16.4.5",
|
||||||
|
"dotenv-flow": "^3.3.0",
|
||||||
|
"es6-promisify": "^6.1.1",
|
||||||
|
"ethereumjs-util": "^7.0.7",
|
||||||
|
"ethjs": "^0.4.0",
|
||||||
|
"lodash": "^4.17.20",
|
||||||
|
"mocha": "^7.2.0",
|
||||||
|
"solc": "^0.6.9",
|
||||||
|
"truffle-hdwallet-provider": "^1.0.17",
|
||||||
|
"ts-node": "^8.10.2",
|
||||||
|
"typescript": "^3.9.5",
|
||||||
|
"web3": "^1.2.8",
|
||||||
|
"web3-core-helpers": "^1.2.8",
|
||||||
|
"web3-eth-contract": "^1.2.8"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"chai": "^4.2.0",
|
||||||
|
"ganache-cli": "^6.9.1",
|
||||||
|
"prettier": "^2.0.5",
|
||||||
|
"prettier-plugin-solidity": "^1.0.0-alpha.52",
|
||||||
|
"solidity-coverage": "^0.7.7",
|
||||||
|
"truffle-assertions": "^0.9.2",
|
||||||
|
"truffle-plugin-verify": "^0.5.33"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
yarn manifest:
|
||||||
|
No manifest
|
||||||
|
|
||||||
|
Lockfile:
|
||||||
|
No lockfile
|
||||||
Reference in New Issue
Block a user