-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #979 from Zilliqa/conversions_fix
Fix typo bug in Conversions.scillib and add test
- Loading branch information
Showing
10 changed files
with
106 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
let i = Uint128 12345 in | ||
let empty_x = 0x in | ||
|
||
let empty = builtin to_bystr empty_x in | ||
|
||
let ile = append_uint128_le empty i in | ||
|
||
let big_endian = BigEndian in | ||
let extract_uint128_be = extract_uint128 big_endian in | ||
let append_uint128_be = append_uint128 big_endian in | ||
|
||
let ibe = append_uint128_be empty i in | ||
|
||
Pair {ByStr ByStr} ile ibe | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
let i = Uint256 12345 in | ||
let empty_x = 0x in | ||
|
||
let empty = builtin to_bystr empty_x in | ||
|
||
let ile = append_uint256_le empty i in | ||
|
||
let big_endian = BigEndian in | ||
let extract_uint256_be = extract_uint256 big_endian in | ||
let append_uint256_be = append_uint256 big_endian in | ||
|
||
let ibe = append_uint256_be empty i in | ||
|
||
Pair {ByStr ByStr} ile ibe | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
let i = Uint32 12345 in | ||
let empty_x = 0x in | ||
|
||
let empty = builtin to_bystr empty_x in | ||
|
||
let ile = append_uint32_le empty i in | ||
|
||
let big_endian = BigEndian in | ||
let extract_uint32_be = extract_uint32 big_endian in | ||
let append_uint32_be = append_uint32 big_endian in | ||
|
||
let ibe = append_uint32_be empty i in | ||
|
||
Pair {ByStr ByStr} ile ibe | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
let i = Uint64 12345 in | ||
let empty_x = 0x in | ||
|
||
let empty = builtin to_bystr empty_x in | ||
|
||
let ile = append_uint64_le empty i in | ||
|
||
let big_endian = BigEndian in | ||
let extract_uint64_be = extract_uint64 big_endian in | ||
let append_uint64_be = append_uint64 big_endian in | ||
|
||
let ibe = append_uint64_be empty i in | ||
|
||
Pair {ByStr ByStr} ile ibe | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
(Pair (ByStr 0x39300000000000000000000000000000) (ByStr 0x00000000000000000000000000003039)), | ||
{ [ibe -> (ByStr 0x00000000000000000000000000003039)], | ||
[append_uint128_be -> <closure>], | ||
[extract_uint128_be -> <closure>], | ||
[big_endian -> (Conversions.BigEndian)], | ||
[ile -> (ByStr 0x39300000000000000000000000000000)], | ||
[empty -> (ByStr 0x)], | ||
[empty_x -> (ByStr0 0x)], | ||
[i -> (Uint128 12345)] } | ||
Gas remaining: 4001096 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
(Pair (ByStr 0x3930000000000000000000000000000000000000000000000000000000000000) (ByStr 0x0000000000000000000000000000000000000000000000000000000000003039)), | ||
{ [ibe -> (ByStr 0x0000000000000000000000000000000000000000000000000000000000003039)], | ||
[append_uint256_be -> <closure>], | ||
[extract_uint256_be -> <closure>], | ||
[big_endian -> (Conversions.BigEndian)], | ||
[ile -> (ByStr 0x3930000000000000000000000000000000000000000000000000000000000000)], | ||
[empty -> (ByStr 0x)], | ||
[empty_x -> (ByStr0 0x)], | ||
[i -> (Uint256 12345)] } | ||
Gas remaining: 4000984 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
(Pair (ByStr 0x39300000) (ByStr 0x00003039)), | ||
{ [ibe -> (ByStr 0x00003039)], | ||
[append_uint32_be -> <closure>], | ||
[extract_uint32_be -> <closure>], | ||
[big_endian -> (Conversions.BigEndian)], | ||
[ile -> (ByStr 0x39300000)], | ||
[empty -> (ByStr 0x)], | ||
[empty_x -> (ByStr0 0x)], | ||
[i -> (Uint32 12345)] } | ||
Gas remaining: 4001180 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
(Pair (ByStr 0x3930000000000000) (ByStr 0x0000000000003039)), | ||
{ [ibe -> (ByStr 0x0000000000003039)], | ||
[append_uint64_be -> <closure>], | ||
[extract_uint64_be -> <closure>], | ||
[big_endian -> (Conversions.BigEndian)], | ||
[ile -> (ByStr 0x3930000000000000)], | ||
[empty -> (ByStr 0x)], | ||
[empty_x -> (ByStr0 0x)], | ||
[i -> (Uint64 12345)] } | ||
Gas remaining: 4001152 |