mirror of
https://github.com/logos-storage/nim-contract-abi.git
synced 2026-01-05 23:23:13 +00:00
Support Nim 1.2.x
This commit is contained in:
parent
a1df4badab
commit
0a773eebc3
@ -61,7 +61,7 @@ func solidityType*(Tuple: type tuple): string =
|
|||||||
names.add(solidityType(typeof parameter))
|
names.add(solidityType(typeof parameter))
|
||||||
"(" & names.join(",") & ")"
|
"(" & names.join(",") & ")"
|
||||||
|
|
||||||
func solidityType*(T: distinct type): string =
|
func solidityType*[T: distinct](_: type T): string =
|
||||||
solidityType(distinctBase T)
|
solidityType(distinctBase T)
|
||||||
|
|
||||||
func signature*(function: string, Parameters: type tuple = ()): string =
|
func signature*(function: string, Parameters: type tuple = ()): string =
|
||||||
|
|||||||
@ -4,7 +4,8 @@ import contractabi
|
|||||||
import ./examples
|
import ./examples
|
||||||
|
|
||||||
type SomeDistinctType = distinct uint16
|
type SomeDistinctType = distinct uint16
|
||||||
func `==`*(a, b: SomeDistinctType): bool {.borrow.}
|
func `==`*(a, b: SomeDistinctType): bool =
|
||||||
|
uint16(a) == uint16(b)
|
||||||
|
|
||||||
suite "ABI decoding":
|
suite "ABI decoding":
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user