r/EthereumProgramming • • Feb 20 '18

Simplest code to generate an Ethereum address and key

1 Upvotes

Hi All,

I'm playing around with some old hardware (think ZX Spectrum and Commodore 64!) - and I'd like to generate a Ethereum address and public/private key paid on them.

As such, I'm looking for an absolute simplest code sample that will generate them so I can port it over to one of these platforms.

I'll post an update when I've done it!

kD


r/EthereumProgramming • • Jan 26 '18

genaroshare-daemon config questions

Thumbnail
self.genaronetwork
1 Upvotes

r/EthereumProgramming • • Dec 07 '17

How to define eth account by browsing through StateTree structure

1 Upvotes

Now I'm studying the structure of the state tree. I read an article article in which it says, that

For the state trie, the keys are ethereum addresses.

I decided to make sure of this. Using the pyethereum library I began to study the block from my local private chain.

In the chain, I found a hash of the state tree. When I started to view it, I realized that the root of the tree is a branch node. The branch node is a list of 17 elements. Among the elements of the branch node were both leaves and other branches. So, any leaf is an account. I wrote small program which print info about leaves in state root. I will give you an example of leaf located on 1 position in branch node (my state root):

['1:', ' LEAF      ']
Node place in DB (raw) : ��ۀ���a�H�v!{�w�>�?��#MU�����
Node place in DB (hash): ab8cdb808c8303bb61fb48e276217be9770fa83ecf3f90f2234d558885f5abf1
Node data  in DB (raw) : �i�4h(�V1 ��L��*�`�+pUG�1�l5}�F�D��V� �U���E���n[H��l��b/��c�!���F��#<�~}������Sʂ';{��]��p
Node data  in DB (data):    ['4h(\x80V1\x0c\x82\xaaL\x01\xa7\xe1*\x10\xf8\x11\x1a\x05`\xe7+p\x05UG\x901\xb8l5}', "\xf8D\x80\x01\xa0V\xe8\x1f\x17\x1b\xccU\xa6\xff\x83E\xe6\x92\xc0\xf8n[H\xe0\x1b\x99l\xad\xc0\x01b/\xb5\xe3c\xb4!\xa0\xc5\xd2F\x01\x86\xf7#<\x92~}\xb2\xdc\xc7\x03\xc0\xe5\x00\xb6S\xca\x82';{\xfa\xd8\x04]\x85\xa4p"]

Unpacking merkle tree leaf ab8...bf1 from DB data:
Key    : 3468288056310c82aa4c01a7e12a10f8111a0560e72b700555479031b86c357d
Data 0 : 
Data 1 : 01
Data 2 : 56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421
Data 3 : c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470

So how from 34682880..1b86c357d i can get wallet like in Geth:

eth.accounts
["0x234132b22de7037e50b9fc4ebd7476315647869e", 
"0x3706c385cb1de3d961e1cf48c1d8b116ef9c1b16", 
"0xa6fded951c2799bc6f17916d27f6f3f89d06724d", 
"0x9d373a0f53648a114f3fbc92ce8d144d05f71ab0", 
"0x42aa31f04d35a15dfad91b2a9753a1881c03f94b", 
"0xf032868db0633790166e3d6282914e48e4d908c7", 
"0x127729a83375c2d65343388f459fa18b25a9a351", 
"0xada1244c2bb3511237c0dcbcc1c787a610ce1916", 
"0xcbe16c0153975a49692c5aea419a3189df198fe3", 
"0x6103cefcae3d9b4bca60808ec5979068b8f61915", 
"0xa020c28466c0cb08f92fecf370f0eb8908753057", 
"0x18f688a32e9c5e103802df58bad2edd84e663f90"]

r/EthereumProgramming • • Nov 30 '17

Help on Ethereum coding challenge

1 Upvotes

Hi guys, I have to pass a technical interview for a crypto startup and I know pretty much nothing about Ethereum. My task is to create an interface to create and menage Ethereum addresses with NodeJs (using an Express boilerplate).

My API will need to have 3 routes:

-GET /createWallet Generates a new Ethereum wallet and return and object with the private key and the public ETH address

-GET /getBalance/:param Get the balance of an ethereum address

-POST /transaction {privateKey, destination, amount} Creates a transaction to send ETH from one address to another. It can receive 3 raw JSON params: privateKey of the source ETH address, destination is the ETH destination address and amount the number of ETH to be send.

I know that there are plenty of libraries out there to accomplish it, would you guys guide me towards the ones you think might be more suitable? Thank you a lot!


r/EthereumProgramming • • Nov 27 '17

FOAM: Crypto-Spatial Coordinates – an open and interoperable standard for location in Ethereum smart contracts.

Thumbnail
blog.foam.space
1 Upvotes

r/EthereumProgramming • • Nov 18 '17

Amazing article on how to design Private Key, Public Key and Address in Ethereum

Thumbnail
etherworld.co
1 Upvotes

r/EthereumProgramming • • Oct 28 '17

Hiring Programmer to help start Ethereum-based projects

1 Upvotes

Please let me know your level of experience, what other projects you've worked with, etc.


r/EthereumProgramming • • Oct 23 '17

Solhint: An Advanced Linter for Ethereum’s Solidity

Thumbnail
medium.com
1 Upvotes

r/EthereumProgramming • • Oct 20 '17

Scala library for integration with Ethereum clients

Thumbnail
web3scala.org
1 Upvotes

r/EthereumProgramming • • Oct 18 '17

Solidity programmers needed for Quantstamp dev

1 Upvotes

r/EthereumProgramming • • Oct 02 '17

I made Ether Academy to make to community better

1 Upvotes

I felt like most Dapps weren't based in reality. That is to say, they don't truly understand Ethereum, and because of that they cannot build their apps at a higher level (say Azure quality). These resources should help devs see the bigger picture!

*edit: misspelling in the title, to->the


r/EthereumProgramming • • Sep 06 '17

Waves to Ethereum Swap Wallet Needed

1 Upvotes

I created a Waves token and I want to send my Waves token and have it convert the Waves token to a ERC20 token which will already be created.

So I want to swap 1 Waves token to 1 Erc20 token. Both token will have the same name.

You might be able to use this code https://github.com/bokkypoobah/Blockswap


r/EthereumProgramming • • Mar 08 '17

Solidity to read file

1 Upvotes

Hello,

Is there any way you could read a string from local file to be used in a function? I would like to use a function where it will automatically read value from an excel file. For more detail, I should give a scenario:

var LVdemact=[ House1, House2, House3, House4, House5 ]

for (var x = 0; x < 5; x++){ supplier.submitActualUseWh(LVdemact[x],{from:eth.accounts[x],gas:3000000}) }

I would like a function to automatically read from a local excel file and then replace the Home1, Home2, etc. with the values from the excel. I cant explain any better but I hope you get what i'm trying to achieve. Basically, reading from a file and replace the values before running the supplier.submitActualUseWh function.


r/EthereumProgramming • • Nov 22 '16

BlobStore gas usage

Thumbnail docs.link-blockchain.org
1 Upvotes

r/EthereumProgramming • • Nov 20 '16

BlobStore: immutable storage on Ethereum blockchains

Thumbnail blog.link-blockchain.org
1 Upvotes

r/EthereumProgramming • • Sep 28 '16

firstblood raises 6m in crowdsale

Thumbnail
coinidol.com
1 Upvotes

r/EthereumProgramming • • May 19 '16

Ethereum is now supported at AlfaCashier

Thumbnail
coindesk.com
1 Upvotes

r/EthereumProgramming • • Mar 17 '16

Looking for developers interested in creating a new distributed application

1 Upvotes

Hi, I am looking for partners to develop a new dapp. The plan is to make an AI battlefield. I will reveal all details in private to anyone interested in joining! It is a part time commitment, with serious monetization potential.


r/EthereumProgramming • • Feb 28 '16

Trying to use Mix on Windows 10. Immediately stops responding.

1 Upvotes

"Qt: Untested Windows version 10.0 detected!

WARNING: This project is using the experimental QML API extensions for QtWebEngine and is therefore tied to a specific QtWebEngine release. WARNING: The experimental API will change from version to version, or even be removed. You have been warned!

QtWebEngineProcess not found at location G:/programs/Ethereum/bin\QtWebEngineProcess.exe. Trying fallback path... Layout must be attached to Item elements Layout must be attached to Item elements qml: [{"id":0,"jsonrpc":"2.0","method":"eth_accounts","params":[]}] qt.network.ssl: QSslSocket: cannot resolve TLSv1_1_client_method qt.network.ssl: QSslSocket: cannot resolve TLSv1_2_client_method qt.network.ssl: QSslSocket: cannot resolve TLSv1_1_server_method qt.network.ssl: QSslSocket: cannot resolve TLSv1_2_server_method qt.network.ssl: QSslSocket: cannot resolve SSL_select_next_proto qt.network.ssl: QSslSocket: cannot resolve SSL_CTX_set_next_proto_select_cb qt.network.ssl: QSslSocket: cannot resolve SSL_get0_next_proto_negotiated qml: [{"id":1,"jsonrpc":"2.0","method":"eth_gasPrice","params":[]}] <Unknown File>: QML QQuickLayoutAttached: Binding loop detected for property "preferredWidth" <Unknown File>: QML QQuickLayoutAttached: Binding loop detected for property "preferredWidth" <Unknown File>: QML QQuickLayoutAttached: Binding loop detected for property "preferredWidth" <Unknown File>: QML QQuickLayoutAttached: Binding loop detected for property "preferredWidth" <Unknown File>: QML QQuickLayoutAttached: Binding loop detected for property "preferredWidth" <Unknown File>: QML QQuickLayoutAttached: Binding loop detected for property "preferredWidth" <Unknown File>: QML QQuickLayoutAttached: Binding loop detected for property "preferredWidth" qrc:/QtQuick/Controls/ScrollView.qml:232:9: QML Binding: Binding loop detected for property "value" qrc:/QtQuick/Controls/ScrollView.qml:225:9: QML Binding: Binding loop detected for property "value" <Unknown File>: QML QQuickLayoutAttached: Binding loop detected for property "preferredWidth" <Unknown File>: QML QQuickLayoutAttached: Binding loop detected for property "preferredWidth" <Unknown File>: QML QQuickLayoutAttached: Binding loop detected for property "preferredWidth" i 11:11:38.190|main Killing blockchain & extras database (WithExisting::Kill). i 11:11:38.205|main Killing state database (WithExisting::Kill). qml: [{"id":1,"jsonrpc":"2.0","method":"eth_gasPrice","params":[]}] qml: [{"id":0,"jsonrpc":"2.0","method":"eth_accounts","params":[]}] qml: [{"id":1,"jsonrpc":"2.0","method":"eth_gasPrice","params":[]}] i 11:11:38.244|main Killing blockchain & extras database (WithExisting::Kill). i 11:11:38.255|main Killing state database (WithExisting::Kill). i 11:11:38.290|main Killing blockchain & extras database (WithExisting::Kill). i 11:11:38.300|main Killing state database (WithExisting::Kill). qml: Closing project qml: Loading project at file://C:/Users/Billy/Documents/Programming/Projects/Dapps/DappList/DappList qrc:///QtQuick/Controls/Private/ScrollBar.qml:98:46: Unable to assign [undefined] to bool qrc:///QtQuick/Controls/Private/ScrollBar.qml:98:46: Unable to assign [undefined] to bool qrc:/QtQuick/Controls/TextArea.qml:728:24: Unable to assign [undefined] to QColor qrc:///QtQuick/Controls/Styles/Base/TextFieldStyle.qml:75: TypeError: Cannot read property '__contentHeight' of null qrc:///QtQuick/Controls/Styles/Base/TextFieldStyle.qml:75: TypeError: Cannot read property '__contentHeight' of null qrc:///QtQuick/Controls/Styles/Base/TextFieldStyle.qml:72:42: Unable to assign TextArea_QMLTYPE_133 to TextField_QMLTYPE_82 qrc:///QtQuick/Controls/Private/ScrollBar.qml:95: TypeError: Cannot read property of null qrc:///QtQuick/Controls/Private/ScrollBar.qml:95: TypeError: Cannot read property of null i 11:11:38.430|main Killing blockchain & extras database (WithExisting::Kill). i 11:11:38.442|main Killing state database (WithExisting::Kill). Waiting for current execution to complete i 11:11:39.646|<unknown> Decreasing DB node ref count below zero with no DB node. Probably have a corrupt Trie. #84acdce9 i 11:11:39.651|<unknown> Decreasing DB node ref count below zero with no DB node. Probably have a corrupt Trie. #a71b164e "

Any ideas?


r/EthereumProgramming • • Feb 12 '16

Why do I get serialization errors in calling events?

Thumbnail
ethereum.stackexchange.com
1 Upvotes

r/EthereumProgramming • • Feb 09 '16

How can an Ethereum contract get data from a website?

Thumbnail
ethereum.stackexchange.com
1 Upvotes

r/EthereumProgramming • • Jan 07 '16

Getting ethrpc to connect to local testnet

1 Upvotes

I've been reviewing the documentation at https://github.com/AugurProject/ethrpc, and there are no instructions for connecting to a local/testnet. I'm building out the private coin example from ethereum.org and I want to put the whole thing up on Heroku. I've deployed a server running geth exclusively, but I need to have my regular node server communicate with it using ethrpc. Any help would be appreciated!!


r/EthereumProgramming • • Dec 15 '15

help with c++

1 Upvotes

I just started working on this text game can anyone help me with this problem it will print out the first if statement instead of checking it just prints it out automatically here's the code http://pastebin.com/Ns8SZ5jc


r/EthereumProgramming • • Sep 08 '15

Pyethereum and Serpent: "Not a function or opcode: def"

1 Upvotes

Hi,

I'm trying to run some very basic code with pyethereum (see below). However, I keep getting this error when trying to import the serpent code with abi_contract: "Exception: Error (file "main", line 2, char 14): Not a function or opcode: def". I'm trying to define a function with "def" so I don't understand this error. I get the same error whether I save the code inline or in a file.

Any help would be greatly appreciated!

Here's the code:

# Import tester and utils. Initiate block.

import serpent

import ethereum.tester as t

import ethereum.utils as u

s = t.state()

# Setup test keys and addresses.

key1 = u.sha3("this is an insecure passphrase")

addr1 = u.privtoaddr(key1)

# Write contract and commit to blockchain.

serpent_code='''

def multiply(a):

return(a*2)

'''

#serpent_code = open('multiply.se').read()

c = s.abi_contract(serpent_code, sender=key1)

o = c.multiply(5)

print(str(o))


r/EthereumProgramming • • Aug 16 '15

[example request] Persistent Chat Room

1 Upvotes

I've been trying to get my head around architecting Dapps, and I wanted to get your take on the best approach for building a chat room type Dapp. Nothing fancy, just the most basic implementation.

At first, I figured I could just just modify SimpleStorage, to do something like the following, but my limited Solidity knowledge has shown it's not as simple as I thought it would be.

contract SimpleChat {
  string public storedData;

  function SimpleChat(string initialValue) {
    storedData = initialValue;
  }

  function post(string x) {
    storedData += x; // <-- Doesn't work - how can I achieve the equivalent?
  }
  function get() constant returns (string retVal) {
    return storedData;
  }
}

Any suggestions on how better to get something like this working? Thanks!