aboutsummaryrefslogtreecommitdiffstats
path: root/common/hexutil
Commit message (Collapse)AuthorAgeFilesLines
* GraphQL master FF for review (#18445)Kris Shinn2019-01-211-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Initial work on a graphql API * Added receipts, and more transaction fields. * Finish receipts, add logs * Add transactionCount to block * Add types and . * Update Block type to be compatible with ethql * Rename nonce to transactionCount in Account, to be compatible with ethql * Update transaction, receipt and log to match ethql * Add query operator, for a range of blocks * Added ommerCount to Block * Add transactionAt and ommerAt to Block * Added sendRawTransaction mutation * Add Call and EstimateGas to graphQL API * Refactored to use hexutil.Bytes instead of HexBytes * Replace BigNum with hexutil.Big * Refactor call and estimateGas to use ethapi struct type * Replace ethgraphql.Address with common.Address * Replace ethgraphql.Hash with common.Hash * Converted most quantities to Long instead of Int * Add support for logs * Fix bug in runFilter * Restructured Transaction to work primarily with headers, so uncle data is reported properly * Add gasPrice API * Add protocolVersion API * Add syncing API * Moved schema into its own source file * Move some single use args types into anonymous structs * Add doc-comments * Fixed backend fetching to use context * Added (very) basic tests * Add documentation to the graphql schema * Fix reversion for formatting of big numbers * Correct spelling error * s/BigInt/Long/ * Update common/types.go * Fixes in response to review * Fix lint error * Updated calls on private functions * Fix typo in graphql.go * Rollback ethapi breaking changes for graphql support Co-Authored-By: Arachnid <arachnid@notdot.net>
* common: all golint warnings removed (#16852)kiel barry2018-06-141-0/+1
| | | | | | * common: all golint warnings removed * common: fixups
* build: enable unconvert linter (#15456)ferhat elmas2017-11-112-4/+2
| | | | | | | | | * build: enable unconvert linter - fixes #15453 - update code base for failing cases * cmd/puppeth: replace syscall.Stdin with os.Stdin.Fd() for unconvert linter
* common: fix megacheck warningsEgon Elbre2017-08-071-5/+4
|
* common/hexutil: wrap errors in json.UnmarshalTypeErrorFelix Lange2017-06-273-53/+83
| | | | | | | This adds type and struct field context to error messages. Instead of "hex string of odd length" users will now see "json: cannot unmarshal hex string of odd length into Go struct field SendTxArgs.from of type common.Address".
* common/hexutil: add UnmarshalFixedUnprefixedTextFelix Lange2017-03-232-5/+62
|
* common/hexutil: ensure negative big.Int is encoded sensiblyFelix Lange2017-03-023-16/+5
| | | | Restricting encoding is silly.
* common/hexutil: implement TextMarshaler, TextUnmarshalerFelix Lange2017-03-024-66/+207
| | | | | | | | | | | | | This commit makes the wrapper types more generally applicable. encoding.TextMarshaler is supported by most codec implementations (e.g. for yaml). The tests now ensure that package json actually recognizes the custom marshaler implementation irrespective of how it is implemented. The Uint type has new tests, too. These are tricky because uint size depends on the CPU word size. Turns out that there was one incorrect case where decoding returned ErrUint64Range instead of ErrUintRange.
* common/hexutil: don't leak encoding/hex errors in DecodeFelix Lange2017-03-022-6/+9
| | | | | All other functions return errors from package hexutil, ensure that Decode does too.
* common/hexutil: reject big integer inputs > 256 bitsFelix Lange2017-03-024-3/+30
| | | | This follows the change to common/math big integer parsing in PR #3699.
* common/hexutil: fix EncodeBig, Big.MarshalJSONFelix Lange2017-01-163-13/+4
| | | | | The code was too clever and failed to include zeros on a big.Word boundary.
* common/hexutil: allow empty strings when decoding JSON (#3559)Felix Lange2017-01-132-5/+5
|
* common/hexutil: fix Test{Decode,Unmarshal}Uint64 on 32bit arch (#3363)Felix Lange2016-11-282-2/+2
|
* common/hexutil: new package for 0x hex encodingFelix Lange2016-11-284-0/+947
The new package is purpose-built to handle the encoding consumed and produced by the RPC API.