ethereum / btcrelay

Ethereum contract for Bitcoin SPV: Live on https://etherscan.io/address/0x41f274c0023f83391de4e0733c609df5a124c3d4
http://btcrelay.org
MIT License
609 stars 409 forks source link

Solidity library that parses a Bitcoin transaction #36

Open ethers opened 8 years ago

ethers commented 8 years ago

For those that are interested, a Solidity library that parses a Bitcoin transaction would be a great compliment to BTC Relay. The first version could parse a "standard" Bitcoin transaction that just has 1 input and 1 output, like the following in Serpent: https://github.com/ethereum/btcrelay/blob/master/example-btc-eth/btcSpecialTx.se

A more general, but outdated (since it accepts input as hex string instead of bytes) example is: https://github.com/ethereum/btcrelay/blob/master/example-btc-eth/btcTx.se

ethers commented 8 years ago

Thanks to @rainbeam https://github.com/rainbeam/solidity-btc-parser