diff --git a/lib/ethereum/formatter.rb b/lib/ethereum/formatter.rb index 5316b7b..9ce9dc3 100644 --- a/lib/ethereum/formatter.rb +++ b/lib/ethereum/formatter.rb @@ -112,7 +112,7 @@ def uint_to_payload(uint) end def int_to_payload(int) - self.to_twos_complement(uint).rjust(64, '0') + self.to_twos_complement(int).rjust(64, '0') end def bytes_to_payload(bytes)