ethereum

How to check if the system has AMD or NVIDIA in C#?

霸气de小男生 提交于 2019-12-24 20:29:17
问题 I'm trying to make an Ethereum mining client using C#, and I need to check whether the system has AMD or NVIDIA. This is because the program needs to know whether it should mine Ethereum via CUDA or OpenCL. 回答1: You need to use System.Management Namespace (You can find under references/Assemblies) After adding namespace you need to navigate all properties of ManagementObject and navigate all properties of propertydata till founding description on name property. I wrote this solution for

npm install web3 into Appcelerator Titanium SDK > 6.x

孤街醉人 提交于 2019-12-24 07:46:50
问题 I would like to install web3 into my mobile App project. However I am having issues with accessing it without having a buch of red screens saying I can't access these files within it. I tried to manually update the paths etc; What I've done is in my App folder: npm install web3 Then I see the node_modules folder in my App directory... however, I am not able to require the module in my index.js file with a simple: var Web3 = require('web3'); // throws error var web3 = new Web3(); function

Read-only Functions Iteration Cost

谁说我不能喝 提交于 2019-12-24 03:06:01
问题 I am developing smart contracts for some use-cases and currently I'm working on optimization of smart contracts. I am confused with something that I found interesting on Hitchiker's Guide. In the section 4- Iterating the contract code // returns true if proof is stored // *read-only function* function hasProof(bytes32 proof) constant returns (bool) { for (uint256 i = 0; i < proofs.length; i++) { if (proofs[i] == proof) { return true; } } return false; } For this code above, He states that

What's the meaning of the ethereum Parity console output lines?

浪子不回头ぞ 提交于 2019-12-23 22:11:55
问题 Parity doesn't seem to have any documentation on what it's console output means. At least none that I've found which admittedly doesn't mean a whole lot. Can anyone give me a breakdown of the meaning of the following line? 2018-03-09 00:05:12 UTC Syncing #4896969 61ee…bdad 2 blk/s 508 tx/s 16 Mgas/s 645+ 1 Qed #4897616 17/25 peers 4 MiB chain 135 MiB db 42 MiB queue 5 MiB sync RPC: 0 conn, 0 req/s, 182 µs Thanks. 回答1: Why document when you can just read code? (bleh) 2018-03-09 00:05:12 UTC(1)

Solidity compiler - problem with HelloWorld smart contract

我们两清 提交于 2019-12-23 05:15:37
问题 Im trying to run my first HelloWorld smart contract on the Enthereum network. This is my HelloWorld.sol contract. pragma solidity ^0.5.0; contract HelloWorld { bytes32 message; constructor (bytes32 myMessage) public { message = myMessage; } function getMessage() public returns(bytes32) { return message; } } When I try to build this using solcjs HelloWorld.sol --bin , there is just one Warning and no errors. I have installed web3 and solc using npm. When I run this on a node var solc = require

One of ethereum solidity methods is not working properly got error Returned values aren't valid, did it run Out of Gas

隐身守侯 提交于 2019-12-23 04:47:40
问题 I'm trying to deploy a solidity program to my private ethereum network. However, when i call a method it's not working properly. This is what i'vd done before the call method. $ truffle console truffle(development)> var dApp undefined truffle(development)> Hello.deployed().then(function(instance) { dApp = instance; }) undefined truffle(development)> dApp.message.call() test env is below truffle@5.0.28 solc@0.5.10 linux centOS 7 geth@1.8.23 I tried all of the solution in answer about the below

Quorum Ethereum Truffle) Error: Number can only safely store up to 53 bits

一世执手 提交于 2019-12-23 04:14:16
问题 I am actually learning smart contract programming on ethereum and I work with truffle. Right now I am making this tutorial here: https://truffleframework.com/tutorials/building-dapps-for-quorum-private-enterprise-blockchains Where you learn how to create a dapp with quorum. But now I have a problem. I did everything exactly as described, but when I do: truffle migrate I get this error here: $ truffle migrate ⚠️ Important ⚠️ If you're using an HDWalletProvider, it must be Web3 1.0 enabled or

Storing and Retrieving Data in Ethereum Blockchain

旧城冷巷雨未停 提交于 2019-12-23 03:06:52
问题 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? 回答1: I will

Out of gas while migrating a contract

非 Y 不嫁゛ 提交于 2019-12-22 10:26:10
问题 I have looked at the other "out of gas" SO posts and they haven't solved my problem. I am using ganache-cli started with ganache-cli --account="0xce2ddf7d4509856c2b7256d002c004db6e34eeb19b37cee04f7b493d2b89306d, 2000000000000000000000000000000" I then execute truffle migrate --reset It returns with an error Error encountered, bailing. Network state unknown. Review successful transactions manually. Error: VM Exception while processing transaction: out of gas (Full error is at the end) These

Truffle command not found after installation

霸气de小男生 提交于 2019-12-22 03:49:11
问题 I installed truffle through npm with the following: sudo npm install -g truffle but when I run truffle list on the console it just gives me bash: truffle: command not found 回答1: Please make sure you have the latest version of npm and node installed. I had the same issue, I updated npm and node to latest version and it worked. npm install -g truffle works. 回答2: I had a similar problem. I ran npm i -g truffle and then when I tried to run truffle init I got an error: zsh: command not found: