gnolang / gno

Gno: An interpreted, stack-based Go virtual machine to build succinct and composable apps + Gno.land: a blockchain for timeless code and fair open-source
https://gno.land/
Other
844 stars 344 forks source link

[GNOLANG] uint parsed as hex instead of uint (not urgent) #369

Closed slashbinslashnoname closed 1 year ago

slashbinslashnoname commented 1 year ago

Bug in the gnodev test ?

Test is functionnal

I've tested a GRC20 token for Decimals Token :

func init() {
    const test1 = std.Address("g1ah79e3txw2kd2e8dscr2y2ucr888lm3qwm3v6e")
    minter := grc20.NewAdminToken("Slashcoin", "SLASH", 18)
    minter.Mint(test1, 1000000)
    Slashcoin = minter.GRC20()
}

Test :

    // check token Decimals.
    {
        got := Slashcoin.GetDecimals()
        t.Fatalf(" got %q.", got)

        expected := 18
        if got != expected {
            t.Fatalf("expected %q, got %q.", expected, got)
        }
    }

Result of the test :

output: got '\x12'.

Expected :

output: got 18
slashbinslashnoname commented 1 year ago

Closing as it is not really a bug :)