Skip to content

Commit

Permalink
abi2: add dbtypes for bool and text
Browse files Browse the repository at this point in the history
  • Loading branch information
ryandotsmith committed Oct 15, 2023
1 parent 7dcd154 commit de8ec1a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions abi2/abi2.go
Original file line number Diff line number Diff line change
Expand Up @@ -832,6 +832,12 @@ func dbtype(t string, d []byte) any {
return d[12:]
}
return d
case t == "bool":
var x uint256.Int
x.SetBytes32(d)
return x.Dec() == "1"
case t == "text":
return string(d)
default:
return d
}
Expand Down

0 comments on commit de8ec1a

Please sign in to comment.