chore: upgrade to Embark v5
This commit is contained in:
parent
d040b8835c
commit
64444e86ad
|
@ -0,0 +1,6 @@
|
||||||
|
# path/to/project/root/.eslintignore
|
||||||
|
# /node_modules/* and /bower_components/* in the project root are ignored by default
|
||||||
|
|
||||||
|
# Ignore built files except build/index.js
|
||||||
|
src/embarkArtifacts/*
|
||||||
|
|
|
@ -11,8 +11,7 @@
|
||||||
},
|
},
|
||||||
"versions": {
|
"versions": {
|
||||||
"web3": "1.2.4",
|
"web3": "1.2.4",
|
||||||
"solc": "0.4.18",
|
"solc": "0.4.18"
|
||||||
"ipfs-api": "17.2.4"
|
|
||||||
},
|
},
|
||||||
"plugins": {
|
"plugins": {
|
||||||
"@trailofbits/embark-contract-info": {
|
"@trailofbits/embark-contract-info": {
|
||||||
|
|
|
@ -1,37 +1,34 @@
|
||||||
|
let secret = {};
|
||||||
|
try {
|
||||||
|
secret = require('../.secret.json');
|
||||||
|
} catch(err) {
|
||||||
|
console.dir("warning: .secret.json file not found; this is only needed to deploy to testnet or livenet etc..");
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
// applies to all environments
|
// applies to all environments
|
||||||
default: {
|
default: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
rpcHost: "localhost", // HTTP-RPC server listening interface (default: "localhost")
|
client: "geth",
|
||||||
rpcPort: 8545, // HTTP-RPC server listening port (default: 8545)
|
accounts: [
|
||||||
rpcCorsDomain: "auto", // Comma separated list of domains from which to accept cross origin requests (browser enforced)
|
{
|
||||||
// When set to "auto", Embark will automatically set the cors to the address of the webserver
|
nodeAccounts: true,
|
||||||
wsRPC: true, // Enable the WS-RPC server
|
numAddresses: 1,
|
||||||
wsOrigins: "auto", // Origins from which to accept websockets requests
|
password: "embarkConfig/development/devpassword"
|
||||||
// When set to "auto", Embark will automatically set the cors to the address of the webserver
|
}
|
||||||
wsHost: "localhost", // WS-RPC server listening interface (default: "localhost")
|
]
|
||||||
wsPort: 8546 // WS-RPC server listening port (default: 8546)
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// default environment, merges with the settings in default
|
// default environment, merges with the settings in default
|
||||||
// assumed to be the intended environment by `embark run` and `embark blockchain`
|
// assumed to be the intended environment by `embark run` and `embark blockchain`
|
||||||
development: {
|
development: {
|
||||||
ethereumClientName: "geth", // Can be geth or parity (default:geth)
|
clientConfig: {
|
||||||
//ethereumClientBin: "geth", // path to the client binary. Useful if it is not in the global PATH
|
miningMode: 'dev'
|
||||||
networkType: "custom", // Can be: testnet, rinkeby, livenet or custom, in which case, it will use the specified networkId
|
},
|
||||||
networkId: 1337, // Network id used when networkType is custom
|
|
||||||
isDev: true, // Uses and ephemeral proof-of-authority network with a pre-funded developer account, mining enabled
|
|
||||||
datadir: ".embark/development/datadir", // Data directory for the databases and keystore (Geth 1.8.15 and Parity 2.0.4 can use the same base folder, till now they does not conflict with each other)
|
|
||||||
mineWhenNeeded: true, // Uses our custom script (if isDev is false) to mine only when needed
|
|
||||||
nodiscover: true, // Disables the peer discovery mechanism (manual peer addition)
|
|
||||||
maxpeers: 0, // Maximum number of network peers (network disabled if set to 0) (default: 25)
|
|
||||||
proxy: true, // Proxy is used to present meaningful information about transactions
|
|
||||||
targetGasLimit: 8000000, // Target gas limit sets the artificial target gas floor for the blocks to mine
|
|
||||||
simulatorBlocktime: 0, // Specify blockTime in seconds for automatic mining. Default is 0 and no auto-mining.
|
|
||||||
accounts: [
|
accounts: [
|
||||||
{
|
{
|
||||||
nodeAccounts: true,
|
nodeAccounts: true,
|
||||||
numAddresses: "1",
|
numAddresses: 2,
|
||||||
password: "embarkConfig/development/devpassword"
|
password: "embarkConfig/development/devpassword"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -40,63 +37,26 @@ module.exports = {
|
||||||
// merges with the settings in default
|
// merges with the settings in default
|
||||||
// used with "embark run privatenet" and/or "embark blockchain privatenet"
|
// used with "embark run privatenet" and/or "embark blockchain privatenet"
|
||||||
privatenet: {
|
privatenet: {
|
||||||
networkType: "custom",
|
|
||||||
networkId: 1337,
|
|
||||||
isDev: false,
|
|
||||||
datadir: ".embark/privatenet/datadir",
|
|
||||||
// -- mineWhenNeeded --
|
|
||||||
// This options is only valid when isDev is false.
|
|
||||||
// Enabling this option uses our custom script to mine only when needed.
|
|
||||||
// Embark creates a development account for you (using `geth account new`) and funds the account. This account can be used for
|
|
||||||
// development (and even imported in to MetaMask). To enable correct usage, a password for this account must be specified
|
|
||||||
// in the `account > password` setting below.
|
|
||||||
// NOTE: once `mineWhenNeeded` is enabled, you must run an `embark reset` on your dApp before running
|
|
||||||
// `embark blockchain` or `embark run` for the first time.
|
|
||||||
mineWhenNeeded: true,
|
|
||||||
// -- genesisBlock --
|
|
||||||
// This option is only valid when mineWhenNeeded is true (which is only valid if isDev is false).
|
|
||||||
// When enabled, geth uses POW to mine transactions as it would normally, instead of using POA as it does in --dev mode.
|
|
||||||
// On the first `embark blockchain or embark run` after this option is enabled, geth will create a new chain with a
|
|
||||||
// genesis block, which can be configured using the `genesisBlock` configuration option below.
|
|
||||||
genesisBlock: "embarkConfig/privatenet/genesis.json", // Genesis block to initiate on first creation of a development node
|
|
||||||
nodiscover: true,
|
|
||||||
maxpeers: 0,
|
|
||||||
proxy: true,
|
|
||||||
accounts: [
|
accounts: [
|
||||||
{
|
{
|
||||||
nodeAccounts: true,
|
nodeAccounts: true,
|
||||||
numAddresses: "1",
|
|
||||||
password: "embarkConfig/privatenet/password"
|
password: "embarkConfig/privatenet/password"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
targetGasLimit: 8000000,
|
clientConfig: {
|
||||||
wsHost: "localhost",
|
datadir: ".embark/privatenet/datadir",
|
||||||
wsPort: 8546,
|
miningMode: 'auto',
|
||||||
simulatorBlocktime: 0
|
genesisBlock: "embarkConfig/privatenet/genesis.json", // Genesis block to initiate on first creation of a development node
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// merges with the settings in default
|
// merges with the settings in default
|
||||||
// used with "embark run privatparityenet" and/or "embark blockchain privateparitynet"
|
// used with "embark run privatparityenet" and/or "embark blockchain privateparitynet"
|
||||||
privateparitynet: {
|
privateparitynet: {
|
||||||
ethereumClientName: "parity",
|
client: "parity",
|
||||||
networkType: "custom",
|
genesisBlock: "embarkConfig/privatenet/genesis-parity.json",
|
||||||
networkId: 1337,
|
datadir: ".embark/privatenet/datadir",
|
||||||
isDev: false,
|
miningMode: 'off'
|
||||||
genesisBlock: "embarkConfig/privatenet/genesis-parity.json", // Genesis block to initiate on first creation of a development node
|
|
||||||
datadir: ".embark/privatenet/datadir", // (Geth 1.8.15 and Parity 2.0.4 can use the same base folder, till now they does not conflict with each other)
|
|
||||||
mineWhenNeeded: false,
|
|
||||||
nodiscover: true,
|
|
||||||
maxpeers: 0,
|
|
||||||
proxy: true,
|
|
||||||
accounts: [
|
|
||||||
{
|
|
||||||
nodeAccounts: true,
|
|
||||||
numAddresses: "1",
|
|
||||||
password: "embarkConfig/privatenet/password"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
targetGasLimit: 8000000,
|
|
||||||
simulatorBlocktime: 0
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// merges with the settings in default
|
// merges with the settings in default
|
||||||
|
@ -112,6 +72,7 @@ module.exports = {
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
rinkeby: {
|
rinkeby: {
|
||||||
networkType: "rinkeby",
|
networkType: "rinkeby",
|
||||||
syncMode: "light",
|
syncMode: "light",
|
||||||
|
@ -124,20 +85,28 @@ module.exports = {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
|
rinkebyInfura: {
|
||||||
|
endpoint: `https://rinkeby.infura.io/${secret.infuraKey}`,
|
||||||
|
accounts: [
|
||||||
|
{
|
||||||
|
mnemonic: secret.mnemonic,
|
||||||
|
numAddresses: 10
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
// merges with the settings in default
|
// merges with the settings in default
|
||||||
// used with "embark run livenet" and/or "embark blockchain livenet"
|
// used with "embark run livenet" and/or "embark blockchain livenet"
|
||||||
livenet: {
|
livenet: {
|
||||||
networkType: "livenet",
|
networkType: "livenet",
|
||||||
syncMode: "light",
|
syncMode: "light",
|
||||||
rpcCorsDomain: "http://localhost:8000",
|
endpoint: "https://mainnet.infura.io/v3/a2687d7078ff46d3b5f3f58cb97d3e44",
|
||||||
wsOrigins: "http://localhost:8000",
|
|
||||||
accounts: [
|
accounts: [
|
||||||
{
|
{
|
||||||
nodeAccounts: true,
|
privateKeyFile: secret.privateKeyFile,
|
||||||
numAddresses: "1",
|
password: secret.password
|
||||||
password: "embarkConfig/livenet/password"
|
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
// you can name an environment with specific settings and then specify with
|
// you can name an environment with specific settings and then specify with
|
||||||
|
|
|
@ -1,10 +1,3 @@
|
||||||
let secret = {};
|
|
||||||
try {
|
|
||||||
secret = require('../.secret.json');
|
|
||||||
} catch(err) {
|
|
||||||
console.dir("warning: .secret.json file not found; this is only needed to deploy to testnet or livenet etc..");
|
|
||||||
}
|
|
||||||
|
|
||||||
const rinkebyBase = {
|
const rinkebyBase = {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
dappConnection: [
|
dappConnection: [
|
||||||
|
@ -12,7 +5,7 @@ const rinkebyBase = {
|
||||||
],
|
],
|
||||||
strategy: 'explicit',
|
strategy: 'explicit',
|
||||||
tracking: './testnet.chains.json',
|
tracking: './testnet.chains.json',
|
||||||
contracts: {
|
deploy: {
|
||||||
LPVault: {
|
LPVault: {
|
||||||
},
|
},
|
||||||
LiquidPledging: {
|
LiquidPledging: {
|
||||||
|
@ -45,32 +38,8 @@ const rinkebyBase = {
|
||||||
module.exports = {
|
module.exports = {
|
||||||
// default applies to all environments
|
// default applies to all environments
|
||||||
default: {
|
default: {
|
||||||
// Blockchain node to deploy the contracts
|
|
||||||
deployment: {
|
|
||||||
host: 'localhost', // Host of the blockchain node
|
|
||||||
port: 8545, // Port of the blockchain node
|
|
||||||
type: 'rpc', // Type of connection (ws or rpc),
|
|
||||||
// Accounts to use instead of the default account to populate your wallet
|
|
||||||
/*,accounts: [
|
|
||||||
{
|
|
||||||
privateKey: "your_private_key",
|
|
||||||
balance: "5 ether" // You can set the balance of the account in the dev environment
|
|
||||||
// Balances are in Wei, but you can specify the unit with its name
|
|
||||||
},
|
|
||||||
{
|
|
||||||
privateKeyFile: "path/to/file", // Either a keystore or a list of keys, separated by , or ;
|
|
||||||
password: "passwordForTheKeystore" // Needed to decrypt the keystore file
|
|
||||||
},
|
|
||||||
{
|
|
||||||
mnemonic: "12 word mnemonic",
|
|
||||||
addressIndex: "0", // Optionnal. The index to start getting the address
|
|
||||||
numAddresses: "1", // Optionnal. The number of addresses to get
|
|
||||||
hdpath: "m/44'/60'/0'/0/" // Optionnal. HD derivation path
|
|
||||||
}
|
|
||||||
]*/
|
|
||||||
},
|
|
||||||
// order of connections the dapp should connect to
|
|
||||||
dappConnection: [
|
dappConnection: [
|
||||||
|
'$EMBARK',
|
||||||
'$WEB3', // uses pre existing web3 object if available (e.g in Mist)
|
'$WEB3', // uses pre existing web3 object if available (e.g in Mist)
|
||||||
'ws://localhost:8546',
|
'ws://localhost:8546',
|
||||||
'http://localhost:8545',
|
'http://localhost:8545',
|
||||||
|
@ -88,19 +57,20 @@ module.exports = {
|
||||||
// contracts section.
|
// contracts section.
|
||||||
strategy: 'explicit',
|
strategy: 'explicit',
|
||||||
|
|
||||||
contracts: {},
|
deploy: {},
|
||||||
},
|
},
|
||||||
|
|
||||||
// default environment, merges with the settings in default
|
// default environment, merges with the settings in default
|
||||||
// assumed to be the intended environment by `embark run`
|
// assumed to be the intended environment by `embark run`
|
||||||
development: {
|
development: {
|
||||||
dappConnection: [
|
dappConnection: [
|
||||||
|
'$EMBARK',
|
||||||
'$WEB3', // uses pre existing web3 object if available (e.g in Mist)
|
'$WEB3', // uses pre existing web3 object if available (e.g in Mist)
|
||||||
'ws://localhost:8546',
|
'ws://localhost:8546',
|
||||||
'http://localhost:8545',
|
'http://localhost:8545',
|
||||||
],
|
],
|
||||||
strategy: 'explicit',
|
strategy: 'explicit',
|
||||||
contracts: {
|
deploy: {
|
||||||
LPVault: {},
|
LPVault: {},
|
||||||
LiquidPledging: {
|
LiquidPledging: {
|
||||||
instanceOf: 'LiquidPledgingMock'
|
instanceOf: 'LiquidPledgingMock'
|
||||||
|
@ -116,6 +86,17 @@ module.exports = {
|
||||||
},
|
},
|
||||||
ACL: {
|
ACL: {
|
||||||
file: "@aragon/os/contracts/acl/ACL.sol"
|
file: "@aragon/os/contracts/acl/ACL.sol"
|
||||||
|
},
|
||||||
|
cDAI: {
|
||||||
|
instanceOf: "StandardToken",
|
||||||
|
address: '0xf5dce57282a584d2746faf1593d3121fcac444dc'
|
||||||
|
},
|
||||||
|
cETH: {
|
||||||
|
instanceOf: "StandardToken",
|
||||||
|
address: '0x4Ddc2D193948926D02f9B1fE9e1daa0718270ED5'
|
||||||
|
},
|
||||||
|
SNT: {
|
||||||
|
address: '0x744d70FDBE2Ba4CF95131626614a1763DF805B9E'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -158,21 +139,8 @@ module.exports = {
|
||||||
// used with "embark run ropsten"
|
// used with "embark run ropsten"
|
||||||
ropsten: {
|
ropsten: {
|
||||||
tracking: './ropsten.chains.json',
|
tracking: './ropsten.chains.json',
|
||||||
deployment: {
|
|
||||||
accounts: [
|
|
||||||
{
|
|
||||||
mnemonic: secret.mnemonic,
|
|
||||||
hdpath: secret.hdpath || "m/44'/1'/0'/0/",
|
|
||||||
numAddresses: "10"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
host: `ropsten.infura.io/${secret.infuraKey}`,
|
|
||||||
port: false,
|
|
||||||
protocol: 'https',
|
|
||||||
type: "rpc"
|
|
||||||
},
|
|
||||||
strategy: 'explicit',
|
strategy: 'explicit',
|
||||||
contracts: {
|
deploy: {
|
||||||
DAI: {
|
DAI: {
|
||||||
instanceOf: "StandardToken",
|
instanceOf: "StandardToken",
|
||||||
address: "0xaD6D458402F60fD3Bd25163575031ACDce07538D"
|
address: "0xaD6D458402F60fD3Bd25163575031ACDce07538D"
|
||||||
|
@ -203,21 +171,7 @@ module.exports = {
|
||||||
},
|
},
|
||||||
|
|
||||||
rinkeby: rinkebyBase,
|
rinkeby: rinkebyBase,
|
||||||
rinkebyInfura: Object.assign({}, rinkebyBase, {
|
rinkebyInfura: rinkebyBase,
|
||||||
deployment: {
|
|
||||||
accounts: [
|
|
||||||
{
|
|
||||||
mnemonic: secret.mnemonic,
|
|
||||||
hdpath: secret.hdpath || "m/44'/1'/0'/0/",
|
|
||||||
numAddresses: "10"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
host: `rinkeby.infura.io/${secret.infuraKey}`,
|
|
||||||
port: false,
|
|
||||||
protocol: 'https',
|
|
||||||
type: "rpc"
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
// merges with the settings in default
|
// merges with the settings in default
|
||||||
// used with "embark run livenet"
|
// used with "embark run livenet"
|
||||||
livenet: {
|
livenet: {
|
||||||
|
@ -227,19 +181,7 @@ module.exports = {
|
||||||
],
|
],
|
||||||
strategy: 'explicit',
|
strategy: 'explicit',
|
||||||
tracking: './livenet.chains.json',
|
tracking: './livenet.chains.json',
|
||||||
deployment: {
|
deploy: {
|
||||||
accounts: [
|
|
||||||
{
|
|
||||||
privateKeyFile: secret.privateKeyFile,
|
|
||||||
password: secret.password
|
|
||||||
}
|
|
||||||
],
|
|
||||||
host: "mainnet.infura.io/v3/a2687d7078ff46d3b5f3f58cb97d3e44",
|
|
||||||
port: false,
|
|
||||||
protocol: 'https',
|
|
||||||
type: "rpc"
|
|
||||||
},
|
|
||||||
contracts: {
|
|
||||||
LPVault: {},
|
LPVault: {},
|
||||||
LiquidPledging: {
|
LiquidPledging: {
|
||||||
address: '0x603A7249E64b8cACe20ffb55926145346ca42A97',
|
address: '0x603A7249E64b8cACe20ffb55926145346ca42A97',
|
||||||
|
|
|
@ -101,7 +101,7 @@
|
||||||
"cytoscape-dagre": "^2.2.2",
|
"cytoscape-dagre": "^2.2.2",
|
||||||
"dotenv": "6.0.0",
|
"dotenv": "6.0.0",
|
||||||
"dotenv-expand": "4.2.0",
|
"dotenv-expand": "4.2.0",
|
||||||
"embark": "^4.1.0-beta.0",
|
"embark": "^5.0.0-beta.0",
|
||||||
"eslint": "5.12.0",
|
"eslint": "5.12.0",
|
||||||
"eslint-config-react-app": "^3.0.8",
|
"eslint-config-react-app": "^3.0.8",
|
||||||
"eslint-loader": "2.1.1",
|
"eslint-loader": "2.1.1",
|
||||||
|
|
Loading…
Reference in New Issue