Closed IvantheTricourne closed 1 year ago
The following is a code snippet taken from minting a SignalToken in a test spec:
SignalToken
let geohash = mkBytesN s32 "42" radius = mkUIntN s256 10 stake = mkUIntN s256 1 owner = account1 mintAction = SignalToken.mintSignal (txOpts # _to ?~ signalToken # _gas ?~ embed 8000000) { owner, stake, geohash, radius } -- `Signaltoken.TrackedToken` Tuple _ (SignalToken.TrackedToken token) <- assertWeb3 provider $ takeEvent (Proxy :: Proxy SignalToken.TrackedToken) signalToken mintAction liftEffect <<< log $ show geohash liftEffect <<< log $ show token.geohash token.geohash `shouldEqual` geohash token.radius `shouldEqual` radius
This results in two strings being printed for geohash and token.geohash, respectively:
geohash
token.geohash
0x42 0x4200000000000000000000000000000000000000000000000000000000000000
Workaround is to use Network.Ethereum.Core.HexString (padLeft) on geohash when making transaction.
Network.Ethereum.Core.HexString (padLeft)
The following is a code snippet taken from minting a
SignalToken
in a test spec:This results in two strings being printed for
geohash
andtoken.geohash
, respectively: