Support Nim 1.2.x
This commit is contained in:
parent
1ac5eca540
commit
f23f3e8aba
|
@ -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…
Reference in New Issue