update to latest embark

This commit is contained in:
Ricardo Guilherme Schmidt 2019-03-26 14:00:19 -03:00
parent 46743c27aa
commit 0bf80a2898
No known key found for this signature in database
GPG Key ID: BFB3F5C8ED618A94
13 changed files with 152 additions and 133 deletions

7
.gitignore vendored
View File

@ -4,10 +4,12 @@ __pycache__/
*$py.class
# embark
.embark/
.embark
chains.json
config/production/password
config/livenet/password
config/production/password
embarkArtifacts
.password
# egg-related
viper.egg-info/
@ -40,3 +42,4 @@ npm-debug.log
# other
.vs/
bin/
.trash

View File

@ -1,54 +1,59 @@
module.exports = {
development: {
default: {
enabled: true,
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
genesisBlock: "config/development/genesis.json", // Genesis block to initiate on first creation of a development node
datadir: ".embark/development/datadir", // Data directory for the databases and keystore
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)
rpcHost: "localhost", // HTTP-RPC server listening interface (default: "localhost")
rpcPort: 8545, // HTTP-RPC server listening port (default: 8545)
rpcCorsDomain: "*", // 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
proxy: true, // Proxy is used to present meaningful information about transactions
account: {
// "address": "", // When specified, uses that address instead of the default one for the network
password: "config/development/password" // Password to unlock the account
rpcHost: "localhost",
rpcPort: 8545,
rpcCorsDomain: {
auto: true,
additionalCors: []
},
targetGasLimit: 8000000, // Target gas limit sets the artificial target gas floor for the blocks to mine
wsRPC: true, // Enable the WS-RPC server
wsOrigins: "*", // Origins from which to accept websockets requests
// 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)
simulatorMnemonic: "example exile argue silk regular smile grass bomb merge arm assist farm", // Mnemonic used by the simulator to generate a wallet
simulatorBlocktime: 0 // Specify blockTime in seconds for automatic mining. Default is 0 and no auto-mining.
wsRPC: true,
wsOrigins: {
auto: true,
additionalCors: []
},
wsHost: "localhost",
wsPort: 8546
},
development: {
ethereumClientName: "geth",
networkType: "custom",
networkId: 1337,
isDev: true,
datadir: ".embark/development/datadir",
mineWhenNeeded: true,
nodiscover: true,
maxpeers: 0,
proxy: true,
targetGasLimit: 8000000,
simulatorBlocktime: 0
},
testnet: {
enabled: true,
networkType: "testnet",
syncMode: "light",
rpcHost: "localhost",
rpcPort: 8545,
rpcCorsDomain: "http://localhost:8000",
account: {
password: "config/testnet/.password"
}
accounts: [
{
nodeAccounts: true,
password: "config/testnet/.password"
}
]
},
livenet: {
enabled: false,
networkType: "livenet",
syncMode: "light",
rpcHost: "localhost",
rpcPort: 8545,
rpcCorsDomain: "http://localhost:8000",
account: {
password: "config/livenet/.password"
}
},
wsOrigins: "http://localhost:8000",
accounts: [
{
nodeAccounts: true,
password: "config/livenet/.password"
}
]
},
rinkeby: {
enabled: true,
networkType: "rinkeby",
@ -56,8 +61,12 @@ module.exports = {
rpcHost: "localhost",
rpcPort: 8545,
rpcCorsDomain: "http://localhost:8000",
account: {
password: "config/rinkeby/.password"
}
accounts: [
{
nodeAccounts: true,
password: "config/rinkeby/.password"
}
],
}
};

View File

@ -1,13 +1,22 @@
module.exports = {
default: {
enabled: true,
provider: "whisper", // Communication provider. Currently, Embark only supports whisper
available_providers: ["whisper"], // Array of available providers
connection: {
host: "localhost", // Host of the blockchain node
port: 8546, // Port of the blockchain node
type: "ws" // Type of connection (ws or rpc)
}
}
};
provider: "whisper",
available_providers: ["whisper"],
},
development: {
connection: {
host: "localhost",
port: 8546,
type: "ws"
}
},
testnet: {
},
livenet: {
},
rinkeby: {
}
};

View File

@ -1,94 +1,82 @@
module.exports = {
// default applies to all environments
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),
host: "localhost",
port: 8546,
type: "ws"
},
// order of connections the dapp should connect to
dappConnection: [
"$WEB3", // uses pre existing web3 object if available (e.g in Mist)
"$WEB3",
"ws://localhost:8546",
"http://localhost:8545"
],
gas: "auto",
strategy: 'explicit',
contracts: {
"ERC20Receiver": {"deploy": false},
"SafeMath": {"deploy": false},
"MiniMeTokenFactory": {},
"MiniMeToken": {
"args":["$MiniMeTokenFactory", "0x0", "0x0", "Status Test Token", 18, "STT", true],
MiniMeTokenFactory: {},
MiniMeToken: {
args:["$MiniMeTokenFactory", "0x0", "0x0", "Status Test Token", 18, "STT", true],
},
"StatusNetwork": {"deploy": false},
"TestStatusNetwork": {"deploy": false},
"StatusRoot": {
"instanceOf": "TestStatusNetwork",
"deploy": true,
"args": ["0x0", "$MiniMeToken"],
StatusRoot: {
instanceOf: "TestStatusNetwork",
deploy: true,
args: ["0x0", "$MiniMeToken"],
"onDeploy": [
"await MiniMeToken.methods.changeController(StatusRoot.address).send()",
"await StatusRoot.methods.setOpen(true).send()",
]
},
"VisibilityStake": {
"args":["$MiniMeToken", "31104000"],
VisibilityStake: {
args:["$MiniMeToken", "31104000"],
},
"GroupAccess": {
"args":["$MiniMeToken"],
GroupAccess: {
args:["$MiniMeToken"],
},
"MessageTribute": {
"args":["10000000000000000000"],
MessageTribute: {
args:["0x"],
}
}
},
development: {
deployment: {
accounts: [
{
privateKey: "b2ab40d549e67ba67f278781fec03b3a90515ad4d0c898a6326dd958de1e46fa",
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
}
]
}
dappConnection: [
"ws://localhost:8546",
"http://localhost:8545",
"$WEB3" // uses pre existing web3 object if available (e.g in Mist)
]
},
testnet: {
contracts: {
"MiniMeTokenFactory": {
"deploy": false,
"address": "0x6bFa86A71A7DBc68566d5C741F416e3009804279"
deploy: false,
address: "0x6bFa86A71A7DBc68566d5C741F416e3009804279"
},
"MiniMeToken": {
"deploy": false,
"address": "0xc55cF4B03948D7EBc8b9E8BAD92643703811d162"
deploy: false,
address: "0xc55cF4B03948D7EBc8b9E8BAD92643703811d162"
},
"StatusRoot": {
"instanceOf": "TestStatusNetwork",
"deploy": false,
"address": "0x34358C45FbA99ef9b78cB501584E8cBFa6f85Cef"
instanceOf: "TestStatusNetwork",
deploy: false,
address: "0x34358C45FbA99ef9b78cB501584E8cBFa6f85Cef"
}
}
},
rinkeby: {
contracts: {
"MiniMeTokenFactory": {
"deploy": false,
"address": "0x5bA5C786845CaacD45f5952E1135F4bFB8855469"
deploy: false,
address: "0x5bA5C786845CaacD45f5952E1135F4bFB8855469"
},
"MiniMeToken": {
"deploy": false,
"address": "0x43d5adC3B49130A575ae6e4b00dFa4BC55C71621"
deploy: false,
address: "0x43d5adC3B49130A575ae6e4b00dFa4BC55C71621"
},
"StatusRoot": {
"instanceOf": "TestStatusNetwork",
"deploy": false,
"address": "0xEdEB948dE35C6ac414359f97329fc0b4be70d3f1"
instanceOf: "TestStatusNetwork",
deploy: false,
address: "0xEdEB948dE35C6ac414359f97329fc0b4be70d3f1"
}
}
}

View File

@ -1,16 +0,0 @@
{
"config": {
"homesteadBlock": 1
},
"nonce": "0x0000000000000042",
"difficulty": "0x0",
"alloc": {
"0x3333333333333333333333333333333333333333": {"balance": "15000000000000000000"}
},
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x3333333333333333333333333333333333333333",
"timestamp": "0x00",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"extraData": "0x",
"gasLimit": "0x7a1200"
}

View File

@ -1 +0,0 @@
dev_password

View File

@ -1,6 +1,23 @@
module.exports = {
default: {
enabled: true,
available_providers: ["ens"],
provider: "ens"
},
development: {
register: {
rootDomain: "eth",
subdomains: {
'embark': '0x1a2f3b98e434c02363f3dac3174af93c1d690914'
}
}
},
testnet: {
},
livenet: {
},
rinkeby: {
}
};

5
config/pipeline.js Normal file
View File

@ -0,0 +1,5 @@
module.exports = {
typescript: false,
enabled: true
};

View File

@ -2,34 +2,37 @@ module.exports = {
default: {
enabled: true,
ipfs_bin: "ipfs",
provider: "ipfs",
available_providers: ["ipfs"],
upload: {
provider: "ipfs",
host: "localhost",
port: 5001
},
dappConnection: [
{
provider: "ipfs",
provider:"ipfs",
host: "localhost",
port: 5001,
getUrl: "http://localhost:8080/ipfs/"
}
]
// Configuration to start Swarm in the same terminal as `embark run`
/*,account: {
address: "YOUR_ACCOUNT_ADDRESS", // Address of account accessing Swarm
password: "PATH/TO/PASSWORD/FILE" // File containing the password of the account
},
swarmPath: "PATH/TO/SWARM/EXECUTABLE" // Path to swarm executable (default: swarm)*/
},
development: {
enabled: true,
provider: "ipfs",
upload: {
provider: "ipfs",
host: "localhost",
port: 5001,
getUrl: "http://localhost:8080/ipfs/"
}
},
testnet: {
},
livenet: {
},
rinkeby: {
}
};

View File

@ -1 +0,0 @@
test_password

View File

@ -1,5 +1,6 @@
module.exports = {
enabled: true,
host: "localhost",
openBrowser: true,
port: 8000
};

View File

@ -9,5 +9,7 @@
"ipfs-api": "17.2.4",
"p-iteration": "1.1.7"
},
"plugins": {}
"plugins": {
"embarkjs-connector-web3": {}
}
}

View File

@ -20,8 +20,8 @@
"elliptic": "^6.4.0"
},
"dependencies": {
"embarkjs-connector-web3": "^4.0.0",
"elliptic-curve": "^0.1.0",
"embark": "^3.0.0",
"ethereumjs-util": "^5.1.5",
"web3": "^1.0.0-beta.34"
}