Documentation
¶
Index ¶
- Variables
- func Abs(a *big.Int) *big.Int
- func Accounts() (*key.MemoryKey, common.Address, []key.Key, []common.Address, error)
- func Add(a, b *big.Int) *big.Int
- func AddBlock(cn *chain.Chain, ctx *types.Context, tx *types.Transaction, signer key.Key) (hash.Hash256, error)
- func AddC(a *big.Int, b int64) *big.Int
- func Approx(a, b, _precision float64) bool
- func Chain(idx int, ctx *types.Context, adm common.Address) (*chain.Chain, error)
- func Clone(a *big.Int) *big.Int
- func CloneAmountSlice(input []*amount.Amount) []*amount.Amount
- func CloneSlice(input []*big.Int) []*big.Int
- func CubicFunc(a, b, c, d, x float64) float64
- func CubicRoot(a, b, c, d float64) (float64, error)
- func DeployTokens(ctx *types.Context, classId uint64, size uint8, deployer common.Address) []common.Address
- func Div(a, b *big.Int) *big.Int
- func DivC(a *big.Int, b int64) *big.Int
- func ExType(cc *types.ContractContext, cont common.Address) (uint8, error)
- func Exec(ctx *types.Context, user common.Address, contAddr common.Address, ...) ([]interface{}, error)
- func Exp(a, b *big.Int) *big.Int
- func FeeAddress(cc *types.ContractContext, cont, from common.Address) (uint64, error)
- func GPrintf(format string, v ...interface{})
- func GPrintln(v ...interface{})
- func GPrintlnT(title string, v ...interface{})
- func GetCC(ctx *types.Context, contAddr common.Address, user common.Address) (*types.ContractContext, error)
- func GetDy(cc *types.ContractContext, cont common.Address, in, out uint8, dx *big.Int, ...) (*big.Int, error)
- func GetMintAdminFee(cc *types.ContractContext, cont common.Address, _reserve0, _reserve1 *big.Int) (*big.Int, error)
- func IsPlus(a *big.Int) bool
- func MakeAmountSlice(size uint8) []*amount.Amount
- func MakeSlice(size uint8) []*big.Int
- func MaxInArray(a []*big.Int) (int, *big.Int)
- func Min(a, b *big.Int) *big.Int
- func MinInArray(a []*big.Int) (int, *big.Int)
- func MintedAdminBalance(cc *types.ContractContext, cont common.Address) (*big.Int, error)
- func Mul(a, b *big.Int) *big.Int
- func MulC(a *big.Int, b int64) *big.Int
- func MulDiv(a, b, denominator *big.Int) *big.Int
- func MulDivC(a, b *big.Int, denominator int64) *big.Int
- func MulDivCC(a *big.Int, b, denominator int64) *big.Int
- func MulF(a *big.Int, b float64) (*big.Int, error)
- func Newtonian(a, b, c, d, x0 float64) (float64, error)
- func Owner(cc *types.ContractContext, cont common.Address) (common.Address, error)
- func Pow10(a int) *big.Int
- func Printf(format string, v ...interface{})
- func Println(v ...interface{})
- func PrintlnT(title string, v ...interface{})
- func RemoveChain(idx int) (string, error)
- func SafeTransfer(cc *types.ContractContext, token, to common.Address, am *big.Int) error
- func SafeTransferFrom(cc *types.ContractContext, token, from, to common.Address, am *big.Int) error
- func Sleep(cn *chain.Chain, ctx *types.Context, tx *types.Transaction, seconds uint64, ...) (*types.Context, error)
- func Sqrt(a *big.Int) *big.Int
- func Sub(a, b *big.Int) *big.Int
- func SubC(a *big.Int, b int64) *big.Int
- func Sum(a []*big.Int) *big.Int
- func ToAmount(b *big.Int) *amount.Amount
- func ToAmounts(b []*big.Int) []*amount.Amount
- func ToBigInt(a float64) (*big.Int, error)
- func ToBigInts(b []*amount.Amount) []*big.Int
- func ToFloat64(a *big.Int) float64
- func TokenAllowance(cc *types.ContractContext, token, owner, spender common.Address) (*big.Int, error)
- func TokenApprove(cc *types.ContractContext, token, to common.Address, am *big.Int) error
- func TokenBalanceOf(cc *types.ContractContext, token, from common.Address) (*big.Int, error)
- func TokenIndex(cc *types.ContractContext, cont, _token common.Address) (uint8, error)
- func TokenTotalSupply(cc *types.ContractContext, token common.Address) (*big.Int, error)
- func ViewAddress(ctx *types.Context, contAddr common.Address, methodName string) (common.Address, error)
- func ViewAmount(ctx *types.Context, contAddr common.Address, methodName string) (*amount.Amount, error)
- func WhoIs(addr common.Address) string
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func DeployTokens ¶
func FeeAddress ¶
func GetMintAdminFee ¶
func MakeAmountSlice ¶
func MintedAdminBalance ¶
func SafeTransfer ¶
token.Transfer(to,Amount)
func SafeTransferFrom ¶
token.TansferFrom(from, to, Amount)
func ToFloat64 ¶
max uint256 = 115792089237316195423570985008687907853269984665640564039457584007913129639935 ~ 1.1e+77 max float64 = 1.7976931348623157e+308 max float32 = 3.4028234663852886e+38
func TokenAllowance ¶
func TokenAllowance(cc *types.ContractContext, token, owner, spender common.Address) (*big.Int, error)
token.BalanceOf(from)
func TokenApprove ¶
token.Apporve(to,Amount)
func TokenBalanceOf ¶
token.BalanceOf(from)
func TokenIndex ¶
func TokenTotalSupply ¶
token.TotalSupply()
func ViewAddress ¶
func ViewAmount ¶
func WhoIs ¶
admin 0xDC5b20847F43d67928F49Cd4f85D696b5A7617B5 alice 0xcca18d832a5C4fA1235e6c1cEa7E4645cca00395 bob 0x678658741a8A61B92EF6B5700397a83C92729d60 charlie 0x632B713ABAA2cBC9ef18B61678c5d65027a4d2f0 eve 0xf3dA6Ce653D680EBAcC26873d38F91aCf33C56Ac factory 0xD9840365E3C375fF1B8c20fFC69EA8B1553B0C8d router 0x989f4aB3c2A695Ee43c67077927c3ca12e1e6a7b pair 0xc65bc0ED7dd73Aa66A8C0f7049e861D5CB7eb0B0 swap 0x0000000000000000000000000000000000000000 token0 0xa2C894E874E9A0ed61Ad4f35CBEdFA861c49c7BF token1 0xe2E3a5952D2Ac311017280601F8354280394946e stableToken0 0x83F875dBa87a5D2387B73222a19259A3a31a1495 stableToken1 0xC59B7d36115849B750b45E498bbE500F0282193A stableToken2 0x5C0F85555eCAFc734BCE666D0eCe5E902A26DC4c
Types ¶
This section is empty.