Hot answers tagged

17

Embark is a development framework. It's used to make development faster and more streamlined by providing a set of tools / functionalities to make you more productive. In the case of embark it makes/will make the process of creating a dapp faster by simplifying the interaction between your app front end and the contract (e.g. running your own blockchain for ...


7

As per the documentation Set the provider: EmbarkJS.Messages.setProvider('orbit', {server: 'localhost', port: 5001}) Saving Text EmbarkJS.Storage.saveText("hello world").then(function(hash) {}); Retrieving Data/Text EmbarkJS.Storage.get(hash).then(function(content) {}); Deploying to IPFS To deploy a dapp to IPFS, all you need to do is run a local IPFS ...


3

Both frameworks are fairly similar: Contract code would be the same because it is just solidity Front end code would be the same because it is just js, html, css However you would need to change Configuration files Some of the web3 stuff because truffle uses pudding wrapper around Web3. They also have different default test frameworks.


3

I'm guessing it's because getOwner() is not marked as constant. So what you'd be seeing is a transaction hash, not the owner. If I'm right, you'll be able to see that what it's giving you is actually 32 bytes of hexidecimal, not 20 (for an address). But there's an even simpler way. Since you've made owner public, solidity has automatically made a getter for ...


3

It seems you are mixing up EmbarkJS.Storage and EmbarkJS.Messages. You should be configuring the storage provider not the messages one: EmbarkJS.Storage.setProvider('ipfs',{server: 'localhost', port: '5001'});


2

This has been fixed in 2.2.0, please update to 2.2.0 and use the new command embark upload ipfs. you'll need to have a ipfs node running.


2

This issue is related to Embark and not Ethereum. The source of the error is this line from ipfs.js: var cmd = ipfs_bin + " add -r " + build_dir; Make sure you follow Installation & EmbarkJS The documentation specifies: To deploy a dapp to IPFS, all you need to do is run a local IPFS node and then run embark ipfs. If you want to deploy to the ...


2

You may store links in Ethereum blockchain using smart contract similar to this one: contract LinkRegistrar { address private owner; event Link (string link); constructor () public { owner = msg.sender; } function registerLink (string memory link) public { require (msg.sender == owner); emit Link (link); } } This will put links ...


2

Try specifying the gas value by using the options object as the last parameter when calling the transaction. e.g YourContract.method(your_args, {gas: 800000})


2

What is the simplest way I can build a blockchain app using embark framework? The simplest way to get started is to follow the embark demo example as described in the documentation. If you are looking for a step by step tutorial, here is a good example of one. where does it store the data if I don't use IPFS? The use of IPFS is optional, is just one ...


2

You can set testrpc's port using the -p (or --port) option, as per the usage details: $ testrpc <options> Options: -a or --accounts: Specify the number of accounts to generate at startup. -b or --blocktime: Specify blocktime in seconds for automatic mining. Default is 0 and no auto-mining. -d or --deterministic: Generate deterministic addresses based ...


1

You can set the port in which embark blockchain is listening at config/blockchain.json's rpcPort param of the used network (i.e. livenet/testnet/privatenet) as explained here: https://github.com/iurimatias/embark-framework#working-with-different-chains


1

This is fixed with installing properly, Prerequisites In order to make Embark work on our computer, we need to have some tools installed first. Make sure you have the following ready and in the correct version: Node Ethereum Client Installing Embark We can install Embark using the Node Package Manager (no worries, that one comes with Node), like this: $...


1

Found the answer.. pretty easy. Simply change the version in embark.json


1

I've found the issue. The 'import' in solidity contract was referring to a file that wasn't available in the folder. It wasn't highlighted by my editor.


1

I don't think DApp is a challenge because in the end it is just an application and you can face general problems that you face writing any application. Most of the complex part is handled by the Web3.js library (given you are using JS/NodeJS to write your code) and similarly other libraries to handle the JSON-RPC communication. The documentation and ...


1

That tutorial is for version 2.5.2 of embark and is not compatible with version 2.6.0; to make it work with 2.6.0 you need to convert the js calls to web3.js 1.0 and update the contract code to be compatible with the latest solc. The tutorial will be updated at some point to reflect the changes made in 2.6.0.


1

I can't speak to your use-case but I think I see a missing step. This all-important line: weatherapicall.update(to ,datetime, {from: account}).then(function(value) { You're going to get a transaction hash that indicates the transaction was submitted to the blockchain. If I'm not mistaken, this is what is appearing in the console log. It doesn't contain ...


1

You are setting up the provider for Messages instead of Storage. Note that the Orbit provider being used in Messages is intended for pub-sub messages just like whisper and not for database storage.


1

I found truffle to be very useful as a beginner. Pros : 1. truffle enables easy deployment on testrpc networks using migrations 2. very easy to install (npm install -g truffle) if you have npm setup 3. detailed documentation and a lot of help pages. useful for debugging 4. makes interaction with contracts easy through the truffle-...


1

I have worked in Embark so i will answer for Embark framework Pros Easy to start private network. Easy to configure the Ethereum network parameters. Auto deploy of contracts whenever the file changes. Easy to edit genesis block. Support IPFS. Support Javascript and html page integration. Support ethereum based commands no new commands for deployment once ...


1

There is nothing connecting Embark dapps to any type of database. Your best bet would be to treat connecting to a database as a separate application.


1

msg.sender will have the address of the caller. In your function you can do if (msg.sender != addressOfVoteMaster) throw;. See also: What's the difference between 'msg.sender' and 'tx.origin'? You get a hex string, which is the transaction hash. Depending on the type of function, you could make it constant to get the function's return ...


1

Please update to the lastest version 2.4.2 which should be compatible with the newest version of geth. you can update with npm install -g embark@2.4.2


1

There are plenty of good reasons to run a server-side ethereum connection. If you want to do so: install web3 directly. Embark has it's own version of web3, but I found it easiest just to install it local to my site npm install web3 Instantiate Web3 in your node.js script var Web3 = require('web3'); web3 = new Web3(new Web3.providers.HttpProvider("http:...


1

DApps are meant to be client side only, the dev webserver of embark is there as a convenience to easy access the dapp for development purposes. You can put the dapp anywhere: in your own webserver, ipfs and even distribute it as a zip file since the dapp can be even open directly in the browser as a file.


1

So i found the solution and it was rather obvious and simple. I needed to meteor add ethereum:web3 and then on the server side it's needed to create a Web3 object web3 = new Web3(). The issue with the meteor example is to load the generated embark.js file just after the web3 object was created, otherwise you will get an error. Ideally embark would create ...


1

Summary Downgrading geth back to the stable version instead of using the dev version fixed the issue. Details --logfile, when this option was available, did not take a parameter. The log file was placed in the data directory. And it was removed. See geth, what happened to --logfile? . Regarding your --genesis is deprecated message, see geth init, what ...


1

This is really a general node.js question, not isolated to Embark. After you've written your code using node.js modules, you must translate it for browser use via Browserify.


1

fs is node js file system module. You have used a script that was meant for node in the browser. Instead of using this script, you should follow these instructions on how to include the ipfs api in the browser


Only top voted, non community-wiki answers of a minimum length are eligible