func (i *Int) UnmarshalJSON(bz []byte) error {
	if i.Int == nil {  
		i.Int = new(big.Int)
	}
	return unmarshalJSON(i.Int, bz)
}
UnmarshalJSON defines custom decoding scheme
package repv2
import (
	"encoding/json"
	"math/big"
)
type Int struct {
	*big.Int
}
func NewInt(v int64) Int {
	return Int{
		big.NewInt(v),
	}
}
func NewIntFromBig(v *big.Int) Int {
	return Int{big.NewInt(0).Set(v)}
}
func (i Int) Clone() Int {
	return Int{big.NewInt(0).Set(i.Int)}
}
func IntMax(a, b Int) Int {
	if a.Int.Cmp(b.Int) > 0 {
		return a.Clone()
	} else {
		return b.Clone()
	}
}
func IntMin(a, b Int) Int {
	if a.Int.Cmp(b.Int) < 0 {
		return a.Clone()
	} else {
		return b.Clone()
	}
}
func IntAdd(a, b Int) Int {
	rst := big.NewInt(0)
	return Int{rst.Add(a.Int, b.Int)}
}
func IntSub(a, b Int) Int {
	rst := big.NewInt(0)
	return Int{rst.Sub(a.Int, b.Int)}
}
func IntMul(a, b Int) Int {
	rst := big.NewInt(0)
	return Int{rst.Mul(a.Int, b.Int)}
}
func IntDiv(a, b Int) Int {
	rst := big.NewInt(0)
	return Int{rst.Div(a.Int, b.Int)}
}
func IntGreater(a, b Int) bool {
	return a.Cmp(b) > 0
}
func IntGTE(a, b Int) bool {
	return a.Cmp(b) >= 0
}
func IntLess(a, b Int) bool {
	return a.Cmp(b) < 0
}
func IntDivFrac(v Int, num, denom int64) Int {
	if num == 0 || denom == 0 {
		panic("bigIntDivFrac zero num or denom")
	}
	return IntMulFrac(v, denom, num)
}
func IntMulFrac(v Int, num, denom int64) Int {
	if denom == 0 {
		panic("bigIntMulFrac zero denom")
	}
	return IntDiv(IntMul(v, NewInt(num)), NewInt(denom))
}
func (i Int) Add(b Int) {
	i.Int.Add(i.Int, b.Int)
}
func (i Int) Sub(b Int) {
	i.Int.Sub(i.Int, b.Int)
}
func (i Int) Div(b Int) {
	i.Int.Div(i.Int, b.Int)
}
func (i Int) Mul(b Int) {
	i.Int.Mul(i.Int, b.Int)
}
func (i Int) Cmp(b Int) int {
	return i.Int.Cmp(b.Int)
}
func (i Int) MarshalAmino() (string, error) {
	if i.Int == nil {  
		i.Int = new(big.Int)
	}
	return marshalAmino(i.Int)
}
func (i *Int) UnmarshalAmino(text string) error {
	if i.Int == nil {  
		i.Int = new(big.Int)
	}
	return unmarshalAmino(i.Int, text)
}
func (i Int) MarshalJSON() ([]byte, error) {
	if i.Int == nil {  
		i.Int = new(big.Int)
	}
	return marshalJSON(i.Int)
}