ethereum

Error when Installing Ethereum: Package 'ethereum' has no installation candidate

陌路散爱 提交于 2019-12-10 16:50:27
问题 I am installing Ethereum on Ubuntu 17.10 following the steps in this article: https://medium.com/@mvmurthy/full-stack-hello-world-voting-ethereum-dapp-tutorial-part-2-30b3d335aa1f But when executing the following command: sudo apt-get install ethereum I get the following: Reading package lists... Done Building dependency tree Reading state information... Done Package ethereum is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted

用Docker构建⼀个区块链工作和开发环境(上)

泪湿孤枕 提交于 2019-12-10 16:39:55
预读先知 区块链(Blockchain)是一种安全的在线交易方式。区块链是一种分布式数字账目,在全球数以千计的计算机上记录交易,使得注册的交易不能被追溯改变。他们通过集体自利的大规模协作进行认证。结果是产生一个以参与者的数据安全的不确定性为边际的健壮的工作流。区块链的使用消除了来自数字资产的无限再现性的特性。它确认每个单位的数字现金只花了一次,解决了长期存在的双重支出问题。区块链被描述为价值交换协议。这种价值交换可以更快,更安全,更便宜地通过区块链完成。区块链可以分配所有权,因为它提供了强制提供和接受的记录。 以太坊(Ethereum)是一个运行智能合约的分布式平台:保证应用程序完全按照程序运行,没有任何宕机,审查,欺诈或第三方干扰的可能性。 这些应用程序运行在一个定制的区块链上。这使开发者能够创建市场,存储债务或承诺的记录,根据很久以前给出的指令转移资金(如遗嘱或期货合约)以及很多尚未出现的未来应用场景,所有的这些都没有中间人或者交易对手风险。 在传统的服务器体系结构上,每个应用程序都必须设置自己的服务器,在独立的孤岛中运行自己的代码,使数据共享变得困难。如果单个应用遭到入侵或离线,许多用户和其他应用都会受到影响。 在区块链上,任何人都可以设置一个节点,复制所有节点的必要数据以达成协议,并由用户和应用程序开发人员进行补偿。这允许用户数据保持私有和应用程序分散像互联网应该工作。

How to get Ethereum transaction list by address

纵然是瞬间 提交于 2019-12-10 08:11:16
问题 I'm looking for a way to get a list of transactions for a given address. If there are too many transactions I'd expect to be able to page the results. It would be better if I can give the latest processed transaction as parameter so I could get the latest transactions from a given point. Something like this: var page = 1; txList = getTransactionList("0x323432432...", page, lastProcessedTx); 回答1: From my research so far there is no way to get transaction list for an address. You should check

Unable to resolve module crypto in reactnative

天大地大妈咪最大 提交于 2019-12-09 18:47:31
问题 I have posted this here have created react-native app using react-native init myapp added web3 in package.json npm install react-native run-ios but i am getting the error unable to resolve module crypto from web3-eth-accounts. Is there any way to fix this unable to resolve crypto 回答1: Crypto is a node js module, when React Native is run - it uses Javascript Core. Crypto isn't include within this. When I installed crypto I used the following package: https://www.npmjs.com/package/react-native

Private blockchains Vs Hashgraph, Ripple, BigChainDb

ぃ、小莉子 提交于 2019-12-09 16:48:43
问题 I have been investigating different blockchains for some use cases. In the end, I came to the conclusion that setting up a private blockchain is equivalent to having a distributed database with blockchain concepts like immutability, digital signatures on top of it. Eg: Bigchaindb. (Well, If we do need smart contract feature then distributed database might not work) Theoretically, hashgraph consensus algorithm doesn't look secure enough for a public chain. It looks like a close alternate

Test ethereum Event Logs with truffle

落花浮王杯 提交于 2019-12-09 08:59:15
问题 I have a contract's function which emit events on each call. I would like to have an event emitted on each test which are passing, here are some tests : it("should emit Error event when sending 5 ether", function(done){ var insurance = CarInsurance.deployed(); insurance.send({from: accounts[0], value: web3.toWei(5, 'ether')}).then(done).catch(done); }); it("should emit Error event when sending 5 ether", function(done){ var insurance = CarInsurance.deployed(); insurance.send({from: accounts[0]

Different ways to invoke contract method

空扰寡人 提交于 2019-12-09 03:56:08
问题 I have one contract with method name as getValues().From Dapp I am invoking contract method as 'contractCAt.getValues.call(function(error,result){...})' this works fine and by using 'contractCAt.getValues(function(error,result){...})' this syntax also works fine.I didn't get any difference between those two ways to invoke contract method.So could anyone help me to give idea about those syntax. 回答1: See the web3j documentation: contractCAt.getValues.call() is run locally and will not alter the

Unhandled rejection Error: This contract object doesn't have address set yet, please set an address first

一曲冷凌霜 提交于 2019-12-08 19:42:14
问题 Im currently trying to use Infura to run on my machine thru Web3. When I set to run my node index.js file I get the following error: Unhandled rejection Error: This contract object doesn't have address set yet, please set an address first. at Object._processExecuteArguments (/Users/Oso.Lu/cryptokitty-miner/node_modules/web3-eth-contract/src/index.js:739:15) at Object._executeMethod (/Users/Oso.Lu/cryptokitty-miner/node_modules/web3-eth-contract/src/index.js:760:54 var helpers = require(".

Storing and Retrieving Data in Ethereum Blockchain

放肆的年华 提交于 2019-12-08 15:24:28
I am a beginner in blockchian and I want to store a personal demographics data in a ethereum blockchain via solidity.I have some basic questions regarding that: Do I have to store the data in a smart contract ? Say I store multiple personal data in the blockchain , in that case would each personal data get stored in separate blocks using the same instance of the smart contract ? Are there any open source tools through which I can view the blocks in my local ethereum block chain? I will try to answer this in easy terms. Do I have to store the data in a smart contract ? Yes you need to store the

Can I transfer tokens from an ERC20 contract using PHP?

落爺英雄遲暮 提交于 2019-12-08 10:56:01
问题 I'm developing a website using Web3 with Metamask, users can purchase tokens by sending ETH to an address. What I want to have done is that after the ETH is received it sends the tokens to the users ETH address automatically with backend code. The actual contract code Sending is not working unless the account is on Metamask Any tips on how I can get it to send the tokens through the backend by specifying the private key of an address with tokens? Thanks for your help. 回答1: Yes, you can, I