Skip to content

Instantly share code, notes, and snippets.

View matthieu's full-sized avatar

Matthieu Riou matthieu

View GitHub Profile
Verifying I am +matthieu on my passcard. https://onename.com/matthieu
@matthieu
matthieu / bc-contract-doc
Created July 12, 2016 18:55
Contract creation with BlockCypher
# The contract API includes the following endpoints (API token always required):
#
# POST /v1/eth/main/contracts
# Creates a new contract. Expects the solidity definition, the private key paying for the publication, the name of the
# contract to be published, the gas amount to use and eventual constructor parameters. The solidity code is compiled
# and the contract creation transaction built and broadcasted. Both the code and the ABI are saved for further
# retrieval. If invoked without contracts to publish, simply compiles and returns the result of compilation.
# Otherwise, along with the compilation results, will return the contract address and creation transaction hash and the
# contract methods will be exposed as endpoints (see below).
#
@matthieu
matthieu / eth-split
Last active August 11, 2021 13:33
Calling the Ethereum splitting contract using BlockCypher
# Contract at:
# https://api.blockcypher.com/v1/eth/main/contracts/aa1a6e3e6ef20068f7f8d8c835d2d22fd5116444?token=$TOKEN
# http://etherscan.io/address/0xaa1a6e3e6ef20068f7f8d8c835d2d22fd5116444#code
# See also https://blog.ethereum.org/2016/07/26/onward_from_the_hard_fork/
$ cat split.json
{
"private": "...",
"gas_amount": 200000,
"params": ["3f071e84604d712ee034d776ed8f6405e1444c48", "34de916d2afc28564b118a4f2723d0274b223f32"],