MCPcopy Create free account
hub / github.com/SmartPool/smartpool-client / ToUint256Array

Method ToUint256Array

types.go:34–44  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32}
33
34func (w Word) ToUint256Array() []*big.Int {
35 result := []*big.Int{}
36 for i := 0; i < WordLength/32; i++ {
37 z := big.NewInt(0)
38 // reverse the bytes because contract expects
39 // big Int is construct in little endian
40 z.SetBytes(rev(w[i*32 : (i+1)*32]))
41 result = append(result, z)
42 }
43 return result
44}
45
46func base62DigitsToString(digits []byte) string {
47 for i := 0; i < len(digits); i++ {

Callers 1

DAGElementArrayMethod · 0.80

Calls 1

revFunction · 0.70

Tested by

no test coverage detected