1. 06 6月, 2016 1 次提交
    • T
      accounts/abi: Negative numbers not properly converted in ABI encoding · 89c6c5bb
      Thomas Bocek 提交于
      When converting a negative number e.g., -2, the resulting ABI encoding
      should look as follows:
      fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe.
      However, since the check of the type is for an uint instead of an
      int, it results in the following ABI encoding:
      0101010101010101010101010101010101010101010101010101010101010102. The
      Ethereum ABI
      (https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI) says,
      that signed integers are stored in two's complement which should be
      of the form ffffff.... and not 01010101..... for e.g. -1. Thus, I
      removed the type check in numbers.go as well as the function S256
      as I don't think they are correct. Or maybe I'm missing something?
      89c6c5bb
  2. 20 5月, 2016 2 次提交
  3. 12 5月, 2016 2 次提交
  4. 11 5月, 2016 1 次提交
    • J
      accounts/abi: fixed unpacking in to already slice interfaces · 91a7a4a7
      Jeffrey Wilcke 提交于
      Previously it was assumed that wheneven type `[]interface{}` was given
      that the interface was empty. The abigen rightfully assumed that
      interface slices which already have pre-allocated variable sets to be
      assigned.
      
      This PR fixes that by checking that the given `[]interface{}` is larger
      than zero and assigns each value using the generic `set` function (this
      function has also been moved to abi/reflect.go) and checks whether the
      assignment was possible.
      
      The generic assignment function `set` now also deals with pointers
      (useful for interface slice mentioned above) by dereferencing the
      pointer until it finds a setable type.
      91a7a4a7
  5. 02 5月, 2016 1 次提交
  6. 28 4月, 2016 4 次提交
  7. 27 4月, 2016 1 次提交
  8. 25 4月, 2016 1 次提交
  9. 20 4月, 2016 1 次提交
    • J
      accouns/abi: refactored ABI package · 5127ec10
      Jeffrey Wilcke 提交于
      Refactored the abi package parsing and type handling. Relying mostly on
      package reflect as opposed to most of our own type reflection. Our own
      type reflection is still used however for cases such as Bytes and
      FixedBytes (abi: bytes•).
      
      This also inclused several fixes for slice handling of arbitrary and
      fixed size for all supported types.
      
      This also further removes implicit type casting such as assigning,
      for example `[2]T{} = []T{1}` will fail, however `[2]T{} == []T{1, 2}`
      (notice assigning *slice* to fixed size *array*). Assigning arrays to
      slices will always succeed if they are of the same element type.
      
      Incidentally also fixes #2379
      5127ec10
  10. 15 4月, 2016 3 次提交
  11. 13 4月, 2016 1 次提交
  12. 12 4月, 2016 9 次提交
  13. 05 4月, 2016 4 次提交
  14. 01 4月, 2016 3 次提交
  15. 31 3月, 2016 3 次提交
  16. 26 3月, 2016 1 次提交
  17. 25 3月, 2016 1 次提交
  18. 24 3月, 2016 1 次提交