Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Zenroom
Zenroom
Commits
75478fff
Commit
75478fff
authored
May 16, 2022
by
Alberto Lerda
Committed by
Jaromil
May 16, 2022
Browse files
fix: ethereum nonce exported as number
parent
29ca85a2
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lua/zencode_ethereum.lua
View file @
75478fff
...
...
@@ -85,8 +85,13 @@ ZEN.add_schema(
export
=
O
.
to_hex
},
ethereum_address
=
{
import
=
O
.
from_hex
,
export
=
O
.
to_hex
},
ethereum_nonce
=
function
(
obj
)
return
ZEN
.
get
(
obj
,
'.'
,
INT
.
new
,
tonumber
)
end
,
-- TODO generic import from string in zenroom.big,
-- if a number begins with 0x import it as hex
-- otherwise as decimal (here we have to use tonumber
-- in order to contemplate hex strings)
ethereum_nonce
=
{
import
=
function
(
o
)
return
INT
.
new
(
tonumber
(
o
))
end
,
export
=
function
(
o
)
return
o
:
decimal
()
end
},
ethereum_transaction
=
{
import
=
import_eth_tx
,
export
=
export_eth_tx
},
signed_ethereum_transaction
=
{
import
=
O
.
from_hex
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment