Giter Site home page Giter Site logo

embarklabs / embark Goto Github PK

View Code? Open in Web Editor NEW
3.8K 135.0 495.0 88.52 MB

Framework for serverless Decentralized Applications using Ethereum, IPFS and other platforms

Home Page: https://framework.embarklabs.io/

License: MIT License

JavaScript 63.58% HTML 2.89% CSS 0.28% TypeScript 11.90% Solidity 14.22% Haml 0.01% Shell 0.01% SCSS 6.54% Handlebars 0.58%
ethereum dapp ipfs smart-contracts serverless decentralized blockchain framework whisper swarm

embark's Introduction

Embark

npm Gitter Build Status Open PRs Closed PRs GitHub commit activity the past week, 4 weeks, year Coverage Status Dependabot Status

What is Embark

Embark is a framework that allows you to easily develop and deploy Decentralized Applications (DApps).

A Decentralized Application is a serverless html5 application that uses one or more decentralized technologies.

Embark currently integrates with EVM blockchains (Ethereum), Decentralized Storages (IPFS), and Decentralized communication platforms (Whisper and Orbit). Swarm is supported for deployment.

With Embark you can:

Blockchain (Ethereum)

  • Automatically deploy contracts and make them available in your JS code. Embark watches for changes, and if you update a contract, Embark will automatically redeploy the contracts (if needed) and the dapp.
  • Contracts are available in JS with Promises.
  • Do Test Driven Development with Contracts using Javascript.
  • Keep track of deployed contracts; deploy only when truly needed.
  • Manage different chains (e.g testnet, private net, livenet)
  • Easily manage complex systems of interdependent contracts.

Decentralized Storage (IPFS, Swarm)

  • Easily Store & Retrieve Data on the DApp through EmbarkJS. Including uploading and retrieving files.
  • Deploy the full application to IPFS or Swarm.
  • Import and deploy contracts hosted on Swarm.

Decentralized Communication (Whisper, Orbit)

  • Easily send/receive messages through channels in P2P through Whisper or Orbit.

Web Technologies

  • Integrate with any web technology including React, Foundation, etc..
  • Use any build pipeline or tool you wish, including grunt, gulp and webpack.
$ npm -g install embark

See Complete Documentation.

embark's People

Contributors

0x-r4bbit avatar 3esmit avatar aakilfernandes avatar alaibe avatar atfornes avatar chamsbouzaiene avatar cryptomental avatar debris avatar dependabot-preview[bot] avatar deviatefish avatar embarkbot avatar emizzle avatar fredericheem avatar gerbrand avatar hhakala avatar iurimatias avatar jorisbontje avatar jrainville avatar linagee avatar michaelsbradleyjr avatar pvgupta24 avatar ramiromoreira avatar rbnpercy avatar richard-ramos avatar roo2 avatar santteegt avatar stevenjnpearce avatar subramanianv avatar toadkicker avatar vor0220 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

embark's Issues

dapp chain server / monitor

A dapp developer might like a server which does stuff like this:

  • records all events from a set of contracts into an off-chain db, possibly interpreting event sequences to derive additional state (read-only stuff you want to show in the GUI)
  • serves the dapp GUI
  • acts as a web3 provider for the dev cycle

discuss

pendingTransaction is not a function?

After doing embark / embark demo / embark blockchain:

js error: TypeError: 'pendingTransactions' is not a function [function() {
  var miner_var;

  if (admin.miner === undefined) {
    miner_var = miner;
  }
  else {
    miner_var = admin.miner;
  }

  var minimalAmount = (web3.eth.getBalance(web3.eth.coinbase) >= 1500000000000000000);
  var pendingTransactions = function() {
    if (web3.eth.pendingTransactions === undefined) {
      return txpool.status.pending || txpool.status.queued;
    }
    else {
      return web3.eth.pendingTransactions().length > 0;
    }
  }

  if(!web3.eth.mining && (!minimalAmount || pendingTransactions())) {
    if (!minimalAmount) { console.log("=== minimal ether amount not reached yet") }
    if (pendingTransactions()) { console.log("=== there are pending transactions") }
    console.log("=== start mining");
    miner_var.start();
  }
  else if (web3.eth.mining && minimalAmount && !pendingTransactions()) {
    if (minimalAmount) { console.log("=== minimal ether amount reached") }
    if (!pendingTransactions()) { console.log("=== no pending transactions") }
    console.log("=== stop mining");
    miner_var.stop();
  }
}]

Suggestion: configure which contracts should be deployed.

It would be nice to choose which contracts should be deployed in certain environment

eg.

contracts:
  - hello.sol/Hello
  - hello.sol/World
  - my_contract.sol/Contract
  - all.sol/*

By default all contracts should be deployed (same as now).

[Docs] Be clear what the relationship is with geth & other clients

The docs don't make it clear:

  • whether or not it's safe to use embark with a running geth instance, whether that's wise, etc.
  • whether or not a running geth instance is required
  • whether or not embark works with arbitrary ethereum clients
  • whether or not embark runs its own ethereum client/node
  • whether or not embark shares any data with any existing ethereum clients

Additionally, the "Deploying to the testnet" documentation does not, at all, talk about:

  • whether a running ethereum client is needed, and if so, which one
  • what to do if your existing ethereum client is on the main net
  • whether or not embark has its own built-in ethereum client that it uses, and if so, where it stores its data

Fatal error: Port 35729 is already in use by another process.

(with embark 0.4.3)

Changing a contract file while running embark run throws a livereload error. changing a js or html file doesn't give any problems.

$ embark run
>> Local Npm module "grunt-cli" not found. Is it installed?

Running "coffee:compile" (coffee) task
>> 0 files created.

Running "deploy_contracts" task
address is : 0xb74b3732d36020e35e9e2f5dd03d9cdec6e491c8
deploying app/contracts/simple_storage.sol
address is 0xf89c6628236c2059cbd10cf6a220d8bf3b74b926
deployed SimpleStorage at 0xf89c6628236c2059cbd10cf6a220d8bf3b74b926

Running "concat:app" (concat) task
File generated/dapp/js/app.min.js created.

Running "concat:css" (concat) task
File generated/dapp/css/app.min.css created.

Running "copy:html" (copy) task
Copied 2 files

Running "copy:css" (copy) task
Copied 1 file

Running "copy:contracts" (copy) task
Copied 1 file

Running "server" task
Running web server on port http://localhost:8000

Running "watch" task
Waiting...
>> File "app/contracts/simple_storage.sol" changed.
>> Local Npm module "grunt-cli" not found. Is it installed?

Running "coffee:compile" (coffee) task
>> 0 files created.

Running "deploy_contracts" task
address is : 0xb74b3732d36020e35e9e2f5dd03d9cdec6e491c8
deploying app/contracts/simple_storage.sol
address is 0x57e3d83e22ae2b1663ef2819e57fa04b806439ba
deployed SimpleStorage at 0x57e3d83e22ae2b1663ef2819e57fa04b806439ba

Running "concat:app" (concat) task
File generated/dapp/js/app.min.js created.

Running "concat:css" (concat) task
File generated/dapp/css/app.min.css created.

Running "copy:html" (copy) task
Copied 2 files

Running "copy:css" (copy) task
Copied 1 file

Running "copy:contracts" (copy) task
Copied 1 file

Running "server" task
Running web server on port http://localhost:8000

Running "watch" task
Waiting...
Fatal error: Port 35729 is already in use by another process.
Completed in 1.393s at Thu Jul 09 2015 10:53:03 GMT+0200 (CEST) - Waiting...

"embark blockchain" fails with fatal errors

os: 10.10.3
geth version: 0.9.35
embark version: 0.4.1

I had geth/embark installed previously but this issue was not occuring.

steps to reproduce:

  1. embark demo

  2. cd embark_demo

  3. embark blockchain fails with output:

    >> Local Npm module "grunt-cli" not found. Is it installed?
    
    Running "blockchain:development" (blockchain) task
    === initializating account
    running: geth --datadir="/tmp/embark" --logfile="/tmp/embark.log" --port 30303 --rpc --rpcport 8101 --networkid 75270 --rpccorsdomain "*" --minerthreads "1" --mine --password config/password  account list
    Fatal: Could not list accounts: no keys in store
    Fatal: Could not list accounts: no keys in store
    finished
    === output is Fatal: Could not list accounts: no keys in store
    Fatal: Could not list accounts: no keys in store
    
    running: geth --datadir="/tmp/embark" --logfile="/tmp/embark.log" --port 30303 --rpc --rpcport 8101 --networkid 75270 --rpccorsdomain "*" --minerthreads "1" --mine --password config/password  account new
    Address: {2b7f9c3528a7a210297f1afe81be68dc9f295297}
    running: geth --datadir="/tmp/embark" --logfile="/tmp/embark.log" --port 30303 --rpc --rpcport 8101 --networkid 75270 --rpccorsdomain "*" --minerthreads "1" --mine --password config/password --unlock 2b7f9c3528a7a210297f1afe81be68dc9f295297 js node_modules/embark-framework/js/mine.js
    === running geth
    I0707 11:36:02.093409   26799 backend.go:304] Protocol Versions: [61 60], Network Id: 75270
    I0707 11:36:02.095025   26799 backend.go:314] Blockchain DB Version: 3
    I0707 11:36:02.099246   26799 chain_manager.go:234] Last block (#0) fd4af92a79c7fc2fd8bf0d342f2e832e1d4f485c85b9152d2039e03bc604fdca TD=131072
    I0707 11:36:02.105058   26799 cmd.go:125] Starting Geth/v0.9.35/darwin/go1.4.2
    I0707 11:36:02.105155   26799 server.go:294] Starting Server
    I0707 11:36:04.210772   26799 udp.go:189] Listening, enode://c905d0226dcd157b3e6939b3fd680b5a88d38f5e44942dc8b850c98535b6d273e01d4a29f87f7e8c4ca744872c86f4c2e173ae9f06262a114f67510aa61fdd8d@192.168.88.50:30303
    I0707 11:36:04.210931   26799 backend.go:520] Server started
    I0707 11:36:04.210946   26799 backend.go:607] Automatic pregeneration of ethash DAG ON (ethash dir: /Users/marekkotewicz/.ethash)
    I0707 11:36:04.210911   26799 server.go:531] Listening on [::]:30303
    0x2b7f9c3528a7a210297f1afe81be68dc9f295297
    I0707 11:36:04.211067   26799 backend.go:614] checking DAG (ethash dir: /Users/marekkotewicz/.ethash)
    I0707 11:36:04.665729   26799 nat.go:95] mapped network port udp:30303 -> 30303 (ethereum discovery) using UPNP IGDv1-IP1
    I0707 11:36:05.114961   26799 nat.go:95] mapped network port tcp:30303 -> 30303 (ethereum p2p) using UPNP IGDv1-IP1
    Account '2b7f9c3528a7a210297f1afe81be68dc9f295297' unlocked.
    I0707 11:36:05.388048   26799 ipc_unix.go:60] IPC service started (/tmp/embark/geth.ipc)
    I0707 11:36:05.388167   26799 backend.go:456] Cannot start mining without etherbase address: etherbase address must be explicitly specified
    Fatal: Cannot start mining without etherbase address: etherbase address must be explicitly specified
    Fatal: Cannot start mining without etherbase address: etherbase address must be explicitly specified
    

I tried removing /tmp/* but it didn't help. I do not know if this issue is caused by embark. Maybe geth cli changed.

node-sleep

Hi, "npm install embark-framework -g" doesn't work under my clean Ubuntu 14.04, because node-sleep^2.0.0 is included. Can you include ^3.0.0, so that this error message is avoided in future:

sudo npm install embark-framework -g
...
[email protected] install /home/felix/myapp/node_modules/sleep
node-gyp rebuild
make: Entering directory `/home/**/myapp/node_modules/sleep/build'
CXX(target) Release/obj.target/node_sleep/sleep.o
../sleep.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE Sleep(Nan::NAN_METHOD_ARGS_TYPE)’:
../sleep.cc:36:12: error: ‘NanScope’ was not declared in this scope
NanScope();
../sleep.cc:38:7: error: ‘args’ was not declared in this scope
if (args.Length() < 1 || !args[0]->IsUint32()) {
../sleep.cc:39:54: error: ‘NanThrowError’ was not declared in this scope
return NanThrowError("Expected number of seconds");
../sleep.cc:39:54: error: return-statement with a value, in function returning 'void' [-fpermissive]
../sleep.cc:42:9: error: ‘args’ was not declared in this scope
sleep(args[0]->Uint32Value());
../sleep.cc:44:22: error: ‘NanReturnUndefined’ was not declared in this scope
NanReturnUndefined();
../sleep.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE USleep(Nan::NAN_METHOD_ARGS_TYPE)’:
...
make: *
* [Release/obj.target/node_sleep/sleep.o] Error 1

Thank you,
Felix

ability to unlock multiple accounts

on geth you can unlock multiple accounts by specifying them as space separated value to the --unlock argument. the `config/password/ file should then contain one password per line.

for development purposes it would be useful to be able to automate this on embark blockchain, allowing you to switch between different accounts on non-trivial dapps.

embark spec requires jasmine

(with embark 0.4.3)

$ embark spec
/bin/sh: jasmine: command not found

Workaround, manually install jasmine globally:

npm install -g jasmine

Embark failing when deploying 2 contracts

Running a simple contract

Running "deploy_contracts:development" (deploy_contracts) task
address is : 0x992b3c2f93f594ef1c11d5e49f5d00e2970830c2
deploying app/contracts/multi_owner.sol
deploying app/contracts/my_storage.sol
Warning: Array.prototype.indexOf called on null or undefined Use --force to continue.

Aborted due to warnings.

Contents of contracts.yml

development:
  MultiOwner:
    args: 
    gas_price: 3000000
  MyStorage:
    args:
staging:
  MultiOwner:
    args: 
    gas_price: 3000000
  MyStorage:
    args:

Version

$ embark --version
0.4.1

Packages

 npm list
[email protected] /Users/aeufemio/projects/ethereum/embark-framework
├─┬ [email protected]
│ └── [email protected]
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ └── [email protected]
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ └─┬ [email protected]
│ │   └── [email protected]
│ ├── [email protected]
│ └── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├── [email protected]
│ │ │ └─┬ [email protected]
│ │ │   ├── [email protected]
│ │ │   └── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├── [email protected]
│ │ │ └── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ └── [email protected]
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├── [email protected]
│ │ │ └─┬ [email protected]
│ │ │   ├── [email protected]
│ │ │   └── [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ └── [email protected]
├─┬ [email protected]
│ └── [email protected]
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ └── [email protected]
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ └── [email protected]
│ └─┬ [email protected]
│   └── [email protected]
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ └── [email protected]
│ └── [email protected]
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├── [email protected]
│ │ │ └── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├─┬ [email protected]
│ │ │ │ └── [email protected]
│ │ │ └─┬ [email protected]
│ │ │   ├── [email protected]
│ │ │   ├─┬ [email protected]
│ │ │   │ ├── [email protected]
│ │ │   │ ├── [email protected]
│ │ │   │ ├── [email protected]
│ │ │   │ ├── [email protected]
│ │ │   │ └── [email protected]
│ │ │   └── [email protected]
│ │ └─┬ [email protected]
│ │   ├── [email protected]
│ │   └─┬ [email protected]
│ │     ├─┬ [email protected]
│ │     │ ├── [email protected]
│ │     │ └── [email protected]
│ │     ├─┬ [email protected]
│ │     │ └─┬ [email protected]
│ │     │   └─┬ [email protected]
│ │     │     └── [email protected]
│ │     ├── [email protected]
│ │     └── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├── [email protected]
│ │ └─┬ [email protected]
│ │   ├── [email protected]
│ │   ├── [email protected]
│ │   ├── [email protected]
│ │   └── [email protected]
│ └── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └─┬ [email protected]
│ │   ├─┬ [email protected]
│ │   │ ├── [email protected]
│ │   │ └── [email protected]
│ │   ├── [email protected]
│ │   └─┬ [email protected]
│ │     ├── [email protected]
│ │     └── [email protected]
│ ├── [email protected]
│ └─┬ [email protected]
│   ├── [email protected]
│   ├── [email protected]
│   ├─┬ [email protected]
│   │ └─┬ [email protected]
│   │   └── [email protected]
│   └── [email protected]
├─┬ [email protected]
│ └── [email protected]
├── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ └─┬ [email protected]
│ │   ├── [email protected]
│ │   └── [email protected]
│ └── [email protected]
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├── [email protected]
│ │ │ └─┬ [email protected]
│ │ │   ├── [email protected]
│ │ │   └── [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├── [email protected]
│ │ │ └── [email protected]
│ │ ├── [email protected]
│ │ └─┬ [email protected]
│ │   ├── [email protected]
│ │   └── [email protected]
│ ├── [email protected]
│ └── [email protected]
├─┬ [email protected]
│ └─┬ [email protected]
│   ├── [email protected]
│   └── [email protected]
├── [email protected]
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├── [email protected]
│ │ │ └── [email protected]
│ │ └── [email protected]
│ └── [email protected]
├── [email protected]
├─┬ [email protected]
│ └─┬ [email protected]
│   ├── [email protected]
│   └── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ └── [email protected]
└── [email protected]

Older version of solc installed

solc --version
solc, the solidity compiler commandline interface
Version: 0.1.1-0/Release-Linux/g++/int

I'm installing on ubuntu from the ppa. I believe it should be 0.9.23

hard-coded dev path

boilerplate/package.json:

   "devDependencies": {
-    "embark-framework": "/Users/iurimatias/Projects/embark-framework",

embark deploy TypeError: Cannot read property 'length' of undefined

With embark 0.8.0 and meteor, it occasionally throws:

$ embark deploy
primary account address is : 0x4ca939d5523560c4fc4391a4f75a4e368a98ea4e
address is : 0x4ca939d5523560c4fc4391a4f75a4e368a98ea4e
trying to obtain Profile address...
deployed Profile at 0x5fc5debe35f5bc34ed039739576398b27871e5ab
deployed Profile at 0x5fc5debe35f5bc34ed039739576398b27871e5ab
/usr/local/lib/node_modules/embark-framework/lib/deploy.js:127
  if (cmds.length === 0) return;
          ^
TypeError: Cannot read property 'length' of undefined
    at Deploy.execute_cmds (/usr/local/lib/node_modules/embark-framework/lib/deploy.js:127:11)
    at Deploy.deploy_contracts (/usr/local/lib/node_modules/embark-framework/lib/deploy.js:119:14)
    at Object.Embark.deployContracts (/usr/local/lib/node_modules/embark-framework/lib/index.js:43:12)
    at deploy (/usr/local/lib/node_modules/embark-framework/bin/embark:30:16)
    at Command.<anonymous> (/usr/local/lib/node_modules/embark-framework/bin/embark:59:5)
    at Command.listener (/usr/local/lib/node_modules/embark-framework/node_modules/commander/index.js:301:8)
    at Command.emit (events.js:110:17)
    at Command.parseArgs (/usr/local/lib/node_modules/embark-framework/node_modules/commander/index.js:610:12)
    at Command.parse (/usr/local/lib/node_modules/embark-framework/node_modules/commander/index.js:458:21)
    at Object.<anonymous> (/usr/local/lib/node_modules/embark-framework/bin/embark:165:9)

Running embark deploy a 2nd time works fine.

"watch" task never sees transactions

Using embark / embark demo / embark blockchain / embark run
Then I go in a browser and set the value. I see the transaction hit the blockchain log. But embark run never sees it...? Also if I reload the browser window and click "Get Value", it's empty.

Running "watch" task
Waiting...

embark deploy creates empty abi.js if contract is unchanged and already deployed

With embark 0.8.1 and using a newly generated embark_demo project:

mids@mids106 ~/Projects/embark_demo $ cat generated/tmp/abi.js
web3.setProvider(new web3.providers.HttpProvider('http://localhost:8101'));web3.eth.defaultAccount = web3.eth.accounts[0];SimpleStorageAbi = [{"constant":true,"inputs":[],"name":"storedData","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":false,"inputs":[{"name":"x","type":"uint256"}],"name":"set","outputs":[],"type":"function"},{"constant":true,"inputs":[],"name":"get","outputs":[{"name":"retVal","type":"uint256"}],"type":"function"},{"inputs":[{"name":"initialValue","type":"uint256"}],"type":"constructor"}];SimpleStorageContract = web3.eth.contract(SimpleStorageAbi);SimpleStorage = SimpleStorageContract.at('0x7510a887d68b6ebc40da38befa88726581df09f8');mids@mids106 ~/Projects/embark_demo $ embark deploy
>> Local Npm module "grunt-cli" not found. Is it installed?

Running "deploy_contracts:development" (deploy_contracts) task
primary account address is : 0xf26d7d6c41201e7d7d6938213c73142bd9f26f07
address is : 0xf26d7d6c41201e7d7d6938213c73142bd9f26f07
contract SimpleStorage is unchanged and already deployed at 0x7510a887d68b6ebc40da38befa88726581df09f8

Done, without errors.
mids@mids106 ~/Projects/embark_demo $ cat generated/tmp/abi.js
web3.setProvider(new web3.providers.HttpProvider('http://localhost:8101'));web3.eth.defaultAccount = web3.eth.accounts[0];

embark spec fails on demo project

with embark 0.4.3 and the embark demo project:

$ embark spec
Started
FF

Failures:
1) SimpleStorage should set constructor value
  Message:
    Expected '' to equal '150'.
  Stack:
    Error: Expected '' to equal '150'.
        at Object.<anonymous> (/Users/mids/Projects/embark_demo/spec/contracts/simple_storage_spec.js:9:40)

2) SimpleStorage set storage value
  Message:
    Expected '' to equal '100'.
  Stack:
    Error: Expected '' to equal '100'.
        at Object.<anonymous> (/Users/mids/Projects/embark_demo/spec/contracts/simple_storage_spec.js:14:33)

2 specs, 2 failures
Finished in 0.016 seconds

pyethereum and EtherTDD.py are installed in the active virtualenv:

$ pip freeze
bitcoin==1.1.29
ethereum==0.9.66
pyethash==23.1
pysha3==0.3
PyYAML==3.11
repoze.lru==0.6
rlp==0.3.8
structlog==15.2.0

web3 should not be initialized inside lib modules

If we want modules in lib/ to be reusable and composable, they can't each set their own web3 provider.
They should accept an initalized web3. Actually, we need a web3 wrapper which is lazily and intelligently initialized, acts as a mock, etc, uses promises, etc.

Trouble when compiling contracts, clarification of contracts.yml

I've been attempting to compile multiple contracts together using embark run, and I keep getting the same warning/error, even though when run together via the command line compiler, they compile perfectly, leading me to believe that this is something to do with embark and not necessarily the solidity files:

    Running "deploy_contracts" task
    primary account address is : 0xbc2e8acaef6b3c63a4b34773b8a21e66a39bee9f
    address is : 0xbc2e8acaef6b3c63a4b34773b8a21e66a39bee9f
    Warning: solc error: exit status 1 Use --force to continue.

since then I've tried fiddling with the contracts.yml, but I haven't been able to figure this out just yet. So I'm asking moreso for a clarification here. Do I need to declare all of my contracts in the .yml config file? Do I need to specify arguments if they contain them? What might be causing this error? Does embark currently support multiple contracts being compiled together on the same platform? Let me know. Thank you again.

embark blockchain keeps mining with periodic mining disabled

embark 0.9.0, new demo project:

$ embark blockchain
>> Local Npm module "grunt-cli" not found. Is it installed?

Running "blockchain:development" (blockchain) task
=== datadir created
running: geth --datadir="/tmp/embark" --logfile="/tmp/embark.log" --port 30303 --rpc --rpcport 8101 --rpcaddr localhost --networkid 90440 --rpccorsdomain "*" --minerthreads "1" --mine --genesis="config/genesis/dev_genesis.json" --rpcapi "eth,web3" --maxpeers 4 --password config/password account list
Fatal: Could not list accounts: no keys in store
Fatal: Could not list accounts: no keys in store
running: geth --datadir="/tmp/embark" --logfile="/tmp/embark.log" --port 30303 --rpc --rpcport 8101 --rpcaddr localhost --networkid 90440 --rpccorsdomain "*" --minerthreads "1" --mine --genesis="config/genesis/dev_genesis.json" --rpcapi "eth,web3" --maxpeers 4 --password config/password account new
Address: {dd878df7d48ff657e8a3c7c0902cad05239d2f7e}
running: geth --datadir="/tmp/embark" --logfile="/tmp/embark.log" --port 30303 --rpc --rpcport 8101 --rpcaddr localhost --networkid 90440 --rpccorsdomain "*" --minerthreads "1" --mine --genesis="config/genesis/dev_genesis.json" --rpcapi "eth,web3" --maxpeers 4 --password config/password --unlock dd878df7d48ff657e8a3c7c0902cad05239d2f7e js node_modules/embark-framework/js/mine.js
I0902 09:29:26.899273    3539 database.go:73] Alloted 16MB cache to /tmp/embark/chaindata
I0902 09:29:26.901713    3539 database.go:73] Alloted 16MB cache to /tmp/embark/dapp
I0902 09:29:26.903511    3539 backend.go:291] Protocol Versions: [62 61], Network Id: 90440
I0902 09:29:26.904384    3539 backend.go:303] Successfully wrote genesis block. New genesis hash = cd9c11da1e46f86ce40a38b6ef84cfdfa6ea92598a27538f0e87da6d7a5c73d5
I0902 09:29:26.904427    3539 backend.go:328] Blockchain DB Version: 3
I0902 09:29:26.904606    3539 chain_manager.go:237] Last block (#0) cd9c11da1e46f86ce40a38b6ef84cfdfa6ea92598a27538f0e87da6d7a5c73d5 TD=262144
I0902 09:29:26.908899    3539 cmd.go:125] Starting Geth/v1.1.0/darwin/go1.5
I0902 09:29:26.909014    3539 server.go:311] Starting Server
I0902 09:29:29.013251    3539 udp.go:207] Listening, enode://837795be8a767d902d61fae4c6865d35d201ce5fd69935767fcc5803612e5523b6e49ba66f19789ea6afac134ea6a5bb7156ef87aa54beb3c1ffd453e669512a@[::]:30303
I0902 09:29:29.013580    3539 backend.go:557] Server started
I0902 09:29:29.013673    3539 backend.go:640] Automatic pregeneration of ethash DAG ON (ethash dir: /Users/mids/.ethash)
I0902 09:29:29.013561    3539 server.go:552] Listening on [::]:30303
I0902 09:29:29.013936    3539 backend.go:647] checking DAG (ethash dir: /Users/mids/.ethash)
Account 'dd878df7d48ff657e8a3c7c0902cad05239d2f7e' unlocked.
I0902 09:29:30.051561    3539 ipc_unix.go:104] IPC service started (/tmp/embark/geth.ipc)
I0902 09:29:30.053010    3539 miner.go:119] Starting mining operation (CPU=1 TOT=3)
I0902 09:29:30.053363    3539 worker.go:540] commit new work on block 1 with 0 txs & 0 uncles. Took 315.394µs
I0902 09:29:30.053487    3539 ethash.go:202] Generating DAG for epoch 0 (0000000000000000000000000000000000000000000000000000000000000000)
== Funding account
I0902 09:29:30.095801    3539 miner.go:119] Starting mining operation (CPU=1 TOT=3)
I0902 09:29:30.096123    3539 worker.go:540] commit new work on block 1 with 0 txs & 0 uncles. Took 269.372µs
I0902 09:29:30.931159    3539 ethash.go:219] Done generating DAG for epoch 0, it took 877.695565ms
I0902 09:29:34.987144    3539 worker.go:322] 🔨  Mined block (#1 / d828ce4b). Wait 5 blocks for confirmation
I0902 09:29:34.987555    3539 worker.go:540] commit new work on block 2 with 0 txs & 0 uncles. Took 370.358µs
I0902 09:29:34.987769    3539 worker.go:540] commit new work on block 2 with 0 txs & 0 uncles. Took 176.252µs
I0902 09:29:35.219481    3539 worker.go:322] 🔨  Mined block (#2 / 4b40ec68). Wait 5 blocks for confirmation
I0902 09:29:35.219778    3539 worker.go:540] commit new work on block 3 with 0 txs & 0 uncles. Took 263.043µs
I0902 09:29:35.220036    3539 worker.go:540] commit new work on block 3 with 0 txs & 0 uncles. Took 202.756µs
I0902 09:29:35.906844    3539 worker.go:322] 🔨  Mined block (#3 / 664b3867). Wait 5 blocks for confirmation
I0902 09:29:35.907187    3539 worker.go:540] commit new work on block 4 with 0 txs & 0 uncles. Took 302.9µs
I0902 09:29:35.907502    3539 worker.go:540] commit new work on block 4 with 0 txs & 0 uncles. Took 253.467µs
== Account funded
I0902 09:29:39.125270    3539 worker.go:322] 🔨  Mined block (#4 / e48fdee9). Wait 5 blocks for confirmation
I0902 09:29:39.125656    3539 worker.go:540] commit new work on block 5 with 0 txs & 0 uncles. Took 347.644µs
I0902 09:29:39.125937    3539 worker.go:540] commit new work on block 5 with 0 txs & 0 uncles. Took 237.935µs
== Account funded
I0902 09:29:39.224179    3539 worker.go:322] 🔨  Mined block (#5 / c3671f3c). Wait 5 blocks for confirmation
I0902 09:29:39.224613    3539 worker.go:540] commit new work on block 6 with 0 txs & 0 uncles. Took 400.951µs
I0902 09:29:39.224906    3539 worker.go:540] commit new work on block 6 with 0 txs & 0 uncles. Took 234.599µs
== Account funded
I0902 09:29:42.143643    3539 worker.go:322] 🔨  Mined block (#6 / b0ea38b0). Wait 5 blocks for confirmation
I0902 09:29:42.143926    3539 worker.go:540] commit new work on block 7 with 0 txs & 0 uncles. Took 244.903µs
I0902 09:29:42.143962    3539 worker.go:420] 🔨 🔗  Mined 5 blocks back: block #1
I0902 09:29:42.144203    3539 worker.go:540] commit new work on block 7 with 0 txs & 0 uncles. Took 216.238µs
== Account funded
I0902 09:29:52.091917    3539 worker.go:322] 🔨  Mined block (#7 / 6cf5db33). Wait 5 blocks for confirmation
I0902 09:29:52.092184    3539 worker.go:540] commit new work on block 8 with 0 txs & 0 uncles. Took 232.089µs
I0902 09:29:52.092218    3539 worker.go:420] 🔨 🔗  Mined 5 blocks back: block #2
I0902 09:29:52.092412    3539 worker.go:540] commit new work on block 8 with 0 txs & 0 uncles. Took 170.819µs
== Account funded
I0902 09:29:53.560441    3539 worker.go:322] 🔨  Mined block (#8 / 060f6bc0). Wait 5 blocks for confirmation
I0902 09:29:53.560751    3539 worker.go:540] commit new work on block 9 with 0 txs & 0 uncles. Took 269.487µs
I0902 09:29:53.560789    3539 worker.go:420] 🔨 🔗  Mined 5 blocks back: block #3
I0902 09:29:53.561016    3539 worker.go:540] commit new work on block 9 with 0 txs & 0 uncles. Took 190.979µs
== Account funded
I0902 09:29:56.363243    3539 worker.go:322] 🔨  Mined block (#9 / ee4591ed). Wait 5 blocks for confirmation
I0902 09:29:56.363622    3539 worker.go:540] commit new work on block 10 with 0 txs & 0 uncles. Took 342.156µs
I0902 09:29:56.363665    3539 worker.go:420] 🔨 🔗  Mined 5 blocks back: block #4
I0902 09:29:56.363980    3539 worker.go:540] commit new work on block 10 with 0 txs & 0 uncles. Took 277.402µs
== Account funded

I would expect the mining to stop after the first Account funded message, waiting for new transactions before resuming (as it used to be the case in embark 0.8.6). Instead it keeps on mining.

Suggestion: Framework contracts

Imagine if this framework included a set of simple contracts to be deployed with your DApp that interact with the registrar and perhaps include an infoHash of the deployed app, to enable p2p fetching and hosting of the DApp.

I suppose, this might be application specific in most cases, but theres definitely room to be more framework than utility, which I feel it is at the moment (albeit a very useful one).

chains.json doesn't work nice with version control

embark version 0.8.0 now requires the chains.json file to be present in the project root directory. Minimally it contains {}, but will be updated over time to track contract deployments.

Now I don't want this file to be under version control (which would trigger unwanted commits / merge conflicts), so I would put it in .gitignore, but unfortunately embark deploy doesn't generate the file if it is missing (with the minimum {} default content), instead giving the error:

Running "deploy_contracts:development" (deploy_contracts) task
Warning: error reading ./chains.json Use --force to continue.

I can add manual installation instructions for developers, to generate the file, but ideally the file should be generated by default and/or reside outside of the project root directory.

mocha test: ReferenceError: DataSource is not defined

with embark-framework 0.8.1

$ mocha test
address is : 0x4ca939d5523560c4fc4391a4f75a4e368a98ea4e
primary account address is : 0x4ca939d5523560c4fc4391a4f75a4e368a98ea4e
address is : 0x4ca939d5523560c4fc4391a4f75a4e368a98ea4e
trying to obtain SimpleStorage address...
deployed SimpleStorage at 0x0a74c0f61dc341e8be0200c6f33cd085ada09a3b
deployed SimpleStorage at 0x0a74c0f61dc341e8be0200c6f33cd085ada09a3b
trying to obtain AnotherStorage address...
deployed AnotherStorage at 0x2a3bf22f79d71430745f3d4edd25c4af971909cf
deployed AnotherStorage at 0x2a3bf22f79d71430745f3d4edd25c4af971909cf
trying to obtain Wallet address...
deployed Wallet at 0x3c296d0044dfac6ce2d9316f34b916bda6446130
deployed Wallet at 0x3c296d0044dfac6ce2d9316f34b916bda6446130
trying to obtain Wallets address...
deployed Wallets at 0xe7b0f31c78420eff2bb6f39e0c21fa2f3cbc85af
deployed Wallets at 0xe7b0f31c78420eff2bb6f39e0c21fa2f3cbc85af
address is : 0x4ca939d5523560c4fc4391a4f75a4e368a98ea4e
primary account address is : 0x4ca939d5523560c4fc4391a4f75a4e368a98ea4e
address is : 0x4ca939d5523560c4fc4391a4f75a4e368a98ea4e
primary account address is : 0x4ca939d5523560c4fc4391a4f75a4e368a98ea4e
address is : 0x4ca939d5523560c4fc4391a4f75a4e368a98ea4e
trying to obtain token address...
deployed token at 0x3180cdf4015a9274d965dc2dd1d91cd3c95324b5
deployed token at 0x3180cdf4015a9274d965dc2dd1d91cd3c95324b5
trying to obtain Crowdsale address...
deployed Crowdsale at 0x159b5771471e99886d07ccaa6b167cf54f88a930
deployed Crowdsale at 0x159b5771471e99886d07ccaa6b167cf54f88a930
address is : 0x4ca939d5523560c4fc4391a4f75a4e368a98ea4e
primary account address is : 0x4ca939d5523560c4fc4391a4f75a4e368a98ea4e
address is : 0x4ca939d5523560c4fc4391a4f75a4e368a98ea4e
contract SimpleStorage is unchanged and already deployed at 0x0a74c0f61dc341e8be0200c6f33cd085ada09a3b
contract BarStorage is unchanged and already deployed at 0x0a74c0f61dc341e8be0200c6f33cd085ada09a3b
contract FooStorage is unchanged and already deployed at 0x0a74c0f61dc341e8be0200c6f33cd085ada09a3b
address is : 0x4ca939d5523560c4fc4391a4f75a4e368a98ea4e
primary account address is : 0x4ca939d5523560c4fc4391a4f75a4e368a98ea4e
address is : 0x4ca939d5523560c4fc4391a4f75a4e368a98ea4e
trying to obtain MyDataSource address...
deployed MyDataSource at 0x853340d62a0ea6a7d93d137cd2efd297f9ba2979
deployed MyDataSource at 0x853340d62a0ea6a7d93d137cd2efd297f9ba2979
contract DataSource is unchanged and already deployed at 0x853340d62a0ea6a7d93d137cd2efd297f9ba2979
trying to obtain Manager address...
deployed Manager at 0xdd66c90ee4879475af66e9e5f1aae1915a72d3d3
deployed Manager at 0xdd66c90ee4879475af66e9e5f1aae1915a72d3d3
address is 0x853340d62a0ea6a7d93d137cd2efd297f9ba2979
address is 0xdd66c90ee4879475af66e9e5f1aae1915a72d3d3
executing: DataSource.set(5)
undefined:1
DataSource.set(5)
^
ReferenceError: DataSource is not defined
    at eval (eval at <anonymous> (/Users/mids/Projects/embark-framework/lib/deploy.js:141:10), <anonymous>:1:1)
    at Deploy.execute_cmds (/Users/mids/Projects/embark-framework/lib/deploy.js:141:5)
    at Deploy.deploy_contracts (/Users/mids/Projects/embark-framework/lib/deploy.js:119:14)
    at Suite.<anonymous> (/Users/mids/Projects/embark-framework/test/deploy.js:136:14)
    at context.describe.context.context (/usr/local/lib/node_modules/mocha/lib/interfaces/bdd.js:49:10)
    at Suite.<anonymous> (/Users/mids/Projects/embark-framework/test/deploy.js:130:5)
    at context.describe.context.context (/usr/local/lib/node_modules/mocha/lib/interfaces/bdd.js:49:10)
    at Suite.<anonymous> (/Users/mids/Projects/embark-framework/test/deploy.js:124:3)
    at context.describe.context.context (/usr/local/lib/node_modules/mocha/lib/interfaces/bdd.js:49:10)
    at Object.<anonymous> (/Users/mids/Projects/embark-framework/test/deploy.js:19:1)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at /usr/local/lib/node_modules/mocha/lib/mocha.js:192:27
    at Array.forEach (native)
    at Mocha.loadFiles (/usr/local/lib/node_modules/mocha/lib/mocha.js:189:14)
    at Mocha.run (/usr/local/lib/node_modules/mocha/lib/mocha.js:422:31)
    at Object.<anonymous> (/usr/local/lib/node_modules/mocha/bin/_mocha:398:16)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:501:10)
    at startup (node.js:129:16)
    at node.js:814:3

Genesis block not found

With embark 0.7.0 and geth 1.0.0:

$ embark blockchain
running: geth --datadir="/tmp/embark" --logfile="/tmp/embark.log" --port 30303 --rpc --rpcport 8101 --networkid 30226 --rpccorsdomain "*" --minerthreads "1" --mine --maxpeers 0 --password config/password account list
Fatal: Could not list accounts: no keys in store
Fatal: Could not list accounts: no keys in store
running: geth --datadir="/tmp/embark" --logfile="/tmp/embark.log" --port 30303 --rpc --rpcport 8101 --networkid 30226 --rpccorsdomain "*" --minerthreads "1" --mine --maxpeers 0 --password config/password account new
Address: {6a7e981d62e812e0a709b878727c224c68849bf8}
running: geth --datadir="/tmp/embark" --logfile="/tmp/embark.log" --port 30303 --rpc --rpcport 8101 --networkid 30226 --rpccorsdomain "*" --minerthreads "1" --mine --maxpeers 0 --password config/password --unlock 6a7e981d62e812e0a709b878727c224c68849bf8 js /tmp/js/mine.js
I0729 12:07:48.259972   48378 database.go:74] Alloted 16MB cache to /tmp/embark/blockchain
I0729 12:07:48.266145   48378 database.go:74] Alloted 16MB cache to /tmp/embark/state
I0729 12:07:48.267454   48378 database.go:74] Alloted 16MB cache to /tmp/embark/extra
I0729 12:07:48.269356   48378 backend.go:290] Protocol Versions: [61 60], Network Id: 30226
I0729 12:07:48.269761   48378 backend.go:319] Blockchain DB Version: 3
Fatal: Genesis block not found. Please supply a genesis block with the "--genesis /path/to/file" argument
Fatal: Genesis block not found. Please supply a genesis block with the "--genesis /path/to/file" argument

Unable to run demo

Hi,
I've been trying to run the demo but I get:

$ embark run
>> Local Npm module "grunt-cli" not found. Is it installed?

Running "coffee:compile" (coffee) task
>> 0 files created.

Running "deploy_contracts" task
address is : 0xecb5f90c7887f3dddb38a1dc92f6dbe46894ee75
deploying app/contracts/simple_storage.sol
deployed at 0x739bbc4d85c0ddbdb73451a4c91cd101d7a3fa3a
Warning: Cannot read property 'abiDefinition' of undefined Use --force to continue.

Aborted due to warnings.

what am I doing wrong?

embark deploy fails suddenly

/usr/local/lib/node_modules/embark-framework/lib/deploy.js:78
ontract = this.chainManager.getContract(className, contract.compiled.code, rea
^
TypeError: Cannot read property 'code' of undefined
at Deploy.deploy_contracts (/usr/local/lib/node_modules/embark-framework/lib/deploy.js:78:85)
at Object.Embark.deployContracts (/usr/local/lib/node_modules/embark-framework/lib/index.js:43:12)
at deploy (/usr/local/lib/node_modules/embark-framework/bin/embark:30:16)
at Command. (/usr/local/lib/node_modules/embark-framework/bin/embark:59:5)
at Command.listener (/usr/local/lib/node_modules/embark-framework/node_modules/commander/index.js:301:8)
at Command.emit (events.js:110:17)
at Command.parseArgs (/usr/local/lib/node_modules/embark-framework/node_modules/commander/index.js:610:12)
at Command.parse (/usr/local/lib/node_modules/embark-framework/node_modules/commander/index.js:458:21)
at Object. (/usr/local/lib/node_modules/embark-framework/bin/embark:165:9)
at Module._compile (module.js:460:26)

windows 7 x64 instalation failed

C:\Users\v\AppData\Roaming\npm\node_modules\embark-framework\node_modules\methodmissing\node_modules\node-proxy>if not defined npm_config_node_gyp (no
de "C:\Users\v\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" configure build ) else (node conf
igure build )
C:\Users\v\AppData\Roaming\npm\grunt -> C:\Users\v\AppData\Roaming\npm\node_modules\grunt-cli\bin\grunt
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: 404 status code downloading 32-bit node.lib
gyp ERR! stack at Request. (C:\Users\v\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\install.js:377:20)
gyp ERR! stack at emitOne (events.js:82:20)
gyp ERR! stack at Request.emit (events.js:169:7)
gyp ERR! stack at Request.onRequestResponse (C:\Users\v\AppData\Roaming\npm\node_modules\npm\node_modules\request\request.js:1008:10)
gyp ERR! stack at emitOne (events.js:77:13)
gyp ERR! stack at ClientRequest.emit (events.js:169:7)
gyp ERR! stack at HTTPParser.parserOnIncomingClient (_http_client.js:415:21)
gyp ERR! stack at HTTPParser.parserOnHeadersComplete (_http_common.js:88:23)
gyp ERR! stack at TLSSocket.socketOnData (_http_client.js:305:20)
gyp ERR! stack at emitOne (events.js:77:13)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\Program Files (x86)\nodejs\node.exe" "C:\Users\v\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\nod
e-gyp.js" "configure" "build"
gyp ERR! cwd C:\Users\v\AppData\Roaming\npm\node_modules\embark-framework\node_modules\methodmissing\node_modules\node-proxy
gyp ERR! node -v v4.0.0
gyp ERR! node-gyp -v v2.0.2
gyp ERR! not ok

[email protected] install C:\Users\v\AppData\Roaming\npm\node_modules\embark-framework\node_modules\sync-me\node_modules\deasync
node ./build.js

Build failed
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Program Files (x86)\nodejs\node.exe" "C:\Users\v\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "install" "-g" "em
bark-framework" "grunt-cli"
npm ERR! node v4.0.0
npm ERR! npm v2.14.1
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node-gyp configure build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp configure build'.
npm ERR! This is most likely a problem with the node-proxy package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp configure build
npm ERR! You can get their info via:
npm ERR! npm owner ls node-proxy
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\v\npm-debug.log

Configure gruntfile to issue minified versions only on deploy/dynamic dapp capabilities

This is a simple thing to get done. Unfortunately, I am not big on .coffee scripts and have opted instead to convert them into .js scripts so if I make a PR, perhaps translation is necessary for a merge?

I think that when developing, a minified version is a handicap, not a benefit, as they are obviously impossible to read, so my suggestion would be to make the pre installed Gruntfile only deploy a minified version if the deploy command is actually called. For testing purposes, it should take the files as they are and push them into the generated dapp folder.

My second proposal is to automatically apply the express server with a view engine capable of dynamic dapps. This too is simple to do and I can get a PR request to you on that soon.

Any thoughts?

Ctrl+C on Ubuntu 14.04 LTS doesn't kill geth, geth takes massive amounts of CPU

@iurimatias I've already made this issue clear via Gitter, but I want to see if there would be other people willing to help tackle this.

This happens after I try to end the session following a embark blockchain command. It kills geth in the shell, however, geth is not dead and lives. PIDs show that it takes up to 50% of CPU resources. Prior to this, the automatic miner works just as you would expect. It's kind of an annoyance having to go into the task manager and seek out and kill geth, so any and all help in solving this is greatly appreciated. Much thanks guys.

Convert to promises or something async

It doesn't work for me. I'm running Ubuntu 14.10, embark 0.7.0, geth 0.9.39
This seems like a really bad way to implement it (but then, I was told it was a hack, so, eh..)

lib/deploy.js

      while ((receipt = web3.eth.getTransactionReceipt(transactionHash)) === null) {
          sleep.sleep(1);
      }

Sometimes I get "CONNECTION ERROR" (and sometimes it just quietly returned back to my shell without doing anything), I think web3 just trying over and over again to do JSON-RPC to geth. I tried to convert this into a way to use the callbacks on the .new() call to a contract that tell you the address, but then everything else broke. (Such as when it goes to write the ABI, it wasn't waiting for the transaction to finish being deployed, it was depending on this loop to repeat.)

I'm not sure what the best way to fix all of this is, unfortunately I'm not a JS expert. :-(

Good luck converting it to promises/async stuff.

Contract dependencies

Currently (as far as I understand), embark assumes that each solidity file in the contracts folder is completely independent and self contained. This will be false for anything but the simplest code bases. Would it be possible to support the import keywords? I.e. If a contract solidity file imports another file, then concatenate the two files before sending them to the compiler.

Additionally, a bigger project will contain a lot of helper contracts that are used as interfaces or base contracts inherited from. These should not be deployed. Even if I don't specify these contracts in the contract.yaml file, embark still deploys them, which is imho undesired behavior.

grunt-cli not found when running embark run

Running "concat:css" (concat) task
File generated/dapp/css/app.min.css created.

Done, without errors.
Completed in 0.938s at Fri Jun 26 2015 18:56:00 GMT+0900 (JST) - Waiting...
>> File "app/js/index.js" changed.
>> Local Npm module "grunt-cli" not found. Is it installed?

Running "concat:app" (concat) task
File generated/dapp/js/app.min.js created.

Running "concat:css" (concat) task
File generated/dapp/css/app.min.css created.

instance variable not defined in onDeploy

with embark 0.8.6, with the following contracts.yml:

development:
  MinHeap:
    args:
  BidsHeap:
    instanceOf: MinHeap
    gas_limit: 600000
  AsksHeap:
    instanceOf: MinHeap
    gas_limit: 600000
  Market:
   args:
    onDeploy:
      - Market.initialize($BidsHeap, $AsksHeap)

I get the exception upon deployment:

$ embark deploy
primary account address is : 0x11d542fcf2000fd070b61d74f998a4cda650a383
address is : 0x11d542fcf2000fd070b61d74f998a4cda650a383
trying to obtain MinHeap address...
=========
contract was deployed at 0x2f2a19f6b97f2f311698e2f96d340d58d312a37e but doesn't seem to be working
try adjusting your gas values
=========
contract Market is unchanged and already deployed at 0x13a790315d3b985f668bf1df3fedd59d2ce79752
address is 0x2f2a19f6b97f2f311698e2f96d340d58d312a37e
address is 0x13a790315d3b985f668bf1df3fedd59d2ce79752
executing: Market.initialize($BidsHeap, $AsksHeap)
undefined:1
Market.initialize($BidsHeap, $AsksHeap)
                  ^
ReferenceError: $BidsHeap is not defined
    at eval (eval at <anonymous> (/usr/local/lib/node_modules/embark-framework/lib/deploy.js:141:10), <anonymous>:1:19)
    at Deploy.execute_cmds (/usr/local/lib/node_modules/embark-framework/lib/deploy.js:141:5)
    at Deploy.deploy_contracts (/usr/local/lib/node_modules/embark-framework/lib/deploy.js:83:14)
    at Object.Embark.deployContracts (/usr/local/lib/node_modules/embark-framework/lib/index.js:43:12)
    at deploy (/usr/local/lib/node_modules/embark-framework/bin/embark:30:16)
    at Command.<anonymous> (/usr/local/lib/node_modules/embark-framework/bin/embark:59:5)
    at Command.listener (/usr/local/lib/node_modules/embark-framework/node_modules/commander/index.js:301:8)
    at Command.emit (events.js:110:17)
    at Command.parseArgs (/usr/local/lib/node_modules/embark-framework/node_modules/commander/index.js:610:12)
    at Command.parse (/usr/local/lib/node_modules/embark-framework/node_modules/commander/index.js:458:21)

I would expect that $BidsHeap would point to the address of the BidsHeap instance of the MinHeap contract.

block timestamp wrong on development chain

with embark 0.8.6 on the development blockchain:

 geth attach ipc://tmp/embark/geth.ipc
instance: Geth/v1.1.0/darwin/go1.5
 datadir: /tmp/embark
coinbase: 0x1fd8dca4c80e43b66e07853f625a0759f8ffe424
at block: 4 (Thu, 01 Jan 1970 01:00:04 CET)
modules: admin:1.0 db:1.0 debug:1.0 eth:1.0 miner:1.0 net:1.0 personal:1.0 shh:1.0 txpool:1.0 web3:1.0
> web3.eth.getBlock(web3.eth.blockNumber).timestamp;
4

the block timestamp of mined blocks doesn't seem to reflect the current time:

$ date -u
Tue Aug 25 19:50:58 UTC 2015
$ date +%s
1440532282

error handling when solc is not found

When solc is not present on the system, embark run fail with the following error:

Warning: Cannot call method 'slice' of undefined Use --force to continue.

build pipeline features

Parent issue for figuring out high-level build process for contract systems.

  • Solidity preprocessing: there are a few compelling use cases for c-style preprocessor macros. You could actually just use gcc for this.
  • Singleton contract awareness: The deploy process should be aware of contracts which are only deployed once within a blockchain. These can be categorized "external apps" (eg namereg) and "factory contracts"
  • sufficiently expressive declarative build format: is a contract dependency graph enough?
  • Better testing: Use the evm as one possible test environment for contract tests. Maybe js-based tests should be restricted to frontend integration testing

using 'className' in Deploy.deployedContracts is not reliable

Because of this line deploy will fail everytime when:

  • one contract is deployed twice (via config/contracts.yml)
  • two contracts (in different files) have the same contract name

The solution is to make Deploy.deployedContracts an object where:

  • key is transactionHash
  • value is an object with fields:
    • class
    • file (for logs readability)
    • address

eg:

{
  "0x230366eb93a55766d8c73188aaf7869b8c343a6ee0e8de43fc9d888ef4b83070":
  {
    "class": "SimpleContract",
    "file": "simple_contract.sol",
    "address": "0x096c0cda9103c9641f2b94fa28ed8827426c445a"
  }
}

embark spec on demo app: no values stored

Seen in Embark 0.9.1, solc 0.1.1, Ubuntu 14.04, Node 0.12.7.

Steps:

  1. Install embark-framework following instructions
  2. embark demo && cd embark-demo
  3. embark spec

Result:

address is : 0x2590d888270ab16214e4ea686cb36186c9618794
Started
FF

Failures:
1) SimpleStorage should set constructor value
  Message:
    Expected '' to equal '150'.
  Stack:
    Error: Expected '' to equal '150'.
        at Object.<anonymous> (/home/aron/dev/embark_demo/spec/contracts/simple_storage_spec.js:17:40)

2) SimpleStorage set storage value
  Message:
    Expected '' to equal '100'.
  Stack:
    Error: Expected '' to equal '100'.
        at Object.<anonymous> (/home/aron/dev/embark_demo/spec/contracts/simple_storage_spec.js:22:33)

2 specs, 2 failures
Finished in 0.02 seconds

Embark is using a very old version of web3.js

[email protected] /usr/local/lib/node_modules/embark-framework
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected])
└── [email protected] ([email protected], [email protected], [email protected])

The latest is 0.8.1

In case of a compilation error, show the actual solc error message

compiling app/contracts/simple_storage.sol
Warning: solc error: exit status 1 Use --force to continue.

Aborted due to warnings.

Instead embark should show the full solc message:

$ solc app/contracts/simple_storage.sol
app/contracts/simple_storage.sol:12:17: Parser error: Expected primary expression.
    storedData =* 2;
                ^

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.