mortgage

package
v0.0.0-...-3f068a8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2019 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MortgageSystemK                   = big.NewInt(10000)
	MortgageOneBlockFullReward        = new(big.Int).Mul(big.NewInt(168), bigInt10e18)
	MortgageSystemMaxReward           = new(big.Int).Mul(big.NewInt(210000000), bigInt10e18)
	MortgageContractAddr              = common.BytesToAddress([]byte{129})
	MortgageSystemCode         []byte = hexutil.MustDecode("0x" + "60606040526000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063396ffa1b1461005f57806343794dda146100a6578063d8a830c6146100f5578063db006a7514610118575b610000565b3461000057610090600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061014d565b6040518082815260200191505060405180910390f35b6100db600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610197565b604051808215151515815260200191505060405180910390f35b34610000576101026102d3565b6040518082815260200191505060405180910390f35b346100005761013360048080359060200190919050506102de565b604051808215151515815260200191505060405180910390f35b6000600060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490505b919050565b6000600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156101d757600090506102cd565b3373ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051809050600060405180830381858888f193505050501561021d57600090506102cd565b81600060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550816001600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff167fbddecaad150f4a9f75fb6864ff351a7f06b19c5b9cf533c22b5bc05ecebc0790836040518082815260200191505060405180910390a2600190505b92915050565b600060015490505b90565b600081600060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156103305760009050610426565b3073ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051809050600060405180830381858888f19350505050156103765760009050610426565b81600060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550816001600082825403925050819055503373ffffffffffffffffffffffffffffffffffffffff167f222838db2794d11532d940e8dec38ae307ed0b63cd97c233322e221f998767a6836040518082815260200191505060405180910390a2600190505b9190505600a165627a7a723058207e421fa2dcbcd7c959b6bef29e877962d006a7c9203251cbeec9598aa467a7490029")
	MortgageMappingPos                = hexutil.MustDecode("0x0000000000000000000000000000000000000000000000000000000000000000")
	MortgageTotalMortgagePos          = hexutil.MustDecode("0x0000000000000000000000000000000000000000000000000000000000000001")
	MortgageTotalRewardedPos          = hexutil.MustDecode("0x0000000000000000000000000000000000000000000000000000000000000002")
)
View Source
var (
	PrivateTestAddress    = common.BytesToAddress(hexutil.MustDecode("0x50c5650E9c1f1D2AC839c587c687D447cD5143fa"))
	PrivateTestBalance, _ = big.NewInt(0).SetString("2000000000000000000000000", 10)
)

Functions

func AddTotalRewarded

func AddTotalRewarded(state *state.StateDB, r *big.Int)

func CalcReward

func CalcReward(coinbase common.Address, nonce uint64, state *state.StateDB) *big.Int

Calculate miner reward

func F

func F(x *big.Int) *big.Int

Calculate mortgage amount function

func GetTotalMortgage

func GetTotalMortgage(state *state.StateDB) *big.Int

Total Mortgage POC

func GetTotalRewarded

func GetTotalRewarded(state *state.StateDB) *big.Int

Total inner system reward

func M

func M(x *big.Int, nonce uint64) *big.Int

func R

func R(reserve *big.Int) *big.Int

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL