Skip to content

Commit

Permalink
Improved multicallErc20 token decimals assigning
Browse files Browse the repository at this point in the history
  • Loading branch information
k-karuna committed Sep 4, 2024
1 parent 1b21992 commit e2e2c26
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cmd/metadata/filler.go
Original file line number Diff line number Diff line change
Expand Up @@ -472,9 +472,11 @@ func (f Filler) multicallErc20(ctx context.Context, address data.Felt, selectorN
}
task.Metadata[entrypointName] = response[1].ToAsciiString()
task.Metadata[entrypointSymbol] = response[2].ToAsciiString()
unicodeDecimals := response[3].ToAsciiString()
runeDecimals := []rune(unicodeDecimals)[0]
task.Metadata[entrypointDecimals] = int(runeDecimals)
decimals, err := response[3].Uint64()
if err != nil {
return err
}
task.Metadata[entrypointDecimals] = decimals
return nil
}

Expand Down

0 comments on commit e2e2c26

Please sign in to comment.