()
| 32 | } |
| 33 | |
| 34 | func (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 | |
| 46 | func base62DigitsToString(digits []byte) string { |
| 47 | for i := 0; i < len(digits); i++ { |