$ sudo yum -y update
$ sudo yum -y install golang
$ sudo yum -y install gmp-devel
$ sudo yum -y install git
$ git clone https://github.com/ethereum/go-ethereum
$ cd go-ethereum/
$ make geth
$ ls -al build/bin/geth
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "context" | |
| "log" | |
| "net/http" | |
| "os" | |
| "os/signal" | |
| "syscall" | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| web3.eth.sendSignedTransaction(raw) | |
| .on('transactionHash', (hash) => { | |
| console.log('sent tx with hash: ' + hash); | |
| }) | |
| .on('error', (err) => { | |
| console.log('error: ' + err); | |
| }); |
I hereby claim:
- I am hadv on github.
- I am dvietha (https://keybase.io/dvietha) on keybase.
- I have a public key ASAm1r0IYGKtBL7GQIkzqcAxxskaUhX4l4VH-wP7wFuGego
To claim this, I am signing this object:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| First, install nginx for mac with "brew install nginx". | |
| Then follow homebrew's instructions to know where the config file is. | |
| 1. To use https you will need a self-signed certificate: https://devcenter.heroku.com/articles/ssl-certificate-self | |
| 2. Copy it somewhere (use full path in the example below for server.* files) | |
| 3. sudo nginx -s reload | |
| 4. Access https://localhost/ | |
| Edit /usr/local/etc/nginx/nginx.conf: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pragma solidity ^0.5.8; | |
| contract Storage { | |
| uint public val; | |
| constructor(uint v) public { | |
| val = v; | |
| } | |
| function setValue(uint v) public { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pragma solidity ^0.5.8; | |
| import "./Storage.sol"; | |
| contract Machine { | |
| Storage public s; | |
| constructor(Storage addr) public { | |
| s = addr; | |
| calculateResult = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pragma solidity ^0.5.8; | |
| interface StorageInterface { | |
| function saveValue(uint x) public returns (bool); | |
| } | |
| contract Machine { | |
| StorageInterface public s; | |
| constructor(StorageInterface addr) public { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pragma solidity ^8.0.0; | |
| contract Machine { | |
| address immutable public s; | |
| constructor(address addr) public { | |
| s = addr; | |
| calculateResult = 0; | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pragma solidity ^0.8.3; | |
| contract Proxy { | |
| address immutable public implementation; | |
| event Received(uint indexed value, address indexed sender, bytes data); | |
| constructor(address _implementation) { | |
| implementation = _implementation; |
OlderNewer