You can find so many tools for using ruby to access the Ethereum Blockchain.
You have for example (like 5chdn♦ said in a comment):
ethereum-ruby made by DigixGlobal.
ruby-ethereum made by janx.
rails-eth-api made by rexmadden.
Also, here you have an Ethereum StackExchange answer which tells about how to connect Geth by IPC on rails.
I solved this by installing solc with apt-get like
sudo apt-get install solc
Then I typed which solc and it told me it was installed at /usr/bin/solc. So I fired up geth console and used the command
to point to the path. Then it worked.
You are using the wrong command, the command is coinbase, not eth_coinbase.
I suggest to use this code:
eth = Ethereum::IpcClient.new
This will automatically use the default path to get geth.ipc
And this will return your coinbase.
You can see that this line, used to create the new method, is not getting the first part of ...
There are a number of payment gateways that work with cryptocoins, bitpay and gocoin being examples I'm aware of. Just googled 'ether payment gateway' and found coinpayments as well.
If you build it yourself you have to run a node, tie your business transaction to an expectation on the blockchain, wait for that expectation to be validated by the number of ...
Just added this to the eth gem.
encrypted_key_json = Eth::Key.encrypt key, 'p455w0rD'
decrypted_key = Eth::Key.decrypt File.read('./some/path.json'), 'p455w0rD'
It doesn't write to disk like your code does, but it does handle the encryption and works with geth and myetherwallet. You can find the encryption code here, and the decryption code here.
There is also the ethereum-tx gem. It is intended for keeping the signing and building of transactions separate from the full node. You could host your full node on the same server, but you don't need to. For a lot of Ethereum applications, you only need to be able to read the blockchain and send transactions. Depending on the frequency with which you need ...
Indeed it is violation of decentralisation. If multiple users are sending transactions to a single server then this makes it a centralised system.
Ethereum.rb is a client written in ruby. Just like we have geth written in go.
These clients though are written in back-end languages but are meant to serve webpages, they actually make p2p connections, store keys ...
Figured this out.
The problem was that I had multiple contracts in the .sol file, where the actual main contract was being assembled (inherited?) from several smaller ones. This tutorial1_contract.sol file served as a template from which I made my own contract.
To fix this, I specified the contract_index to the Ethereum::Contract.create() call:
There are many ways to connect with ethereum,
recently I used this coinfalcon
1: https://docs.coinfalcon.com/ this for both python and ruby.this provide api for place order with the help of this.
This help to you connect with ethereum,
Here you can do:
1 IPC Client Connection
2 Solidity contract compilation and deployment
3 Transacting and ...
I have never programmed Ruby but I know a little bit about Bitcoin and Ethereum signatures. I hope I can help you.
A bitcoin signature consists of two parts: (r,s).
An Ethereum signature consists of three parts: (v,r,s).
The extra value v which is only one byte allows for the derivation of the public key from the signature. There are only four possible ...