aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-02-23 08:57:22 +0800
committerobscuren <geffobscura@gmail.com>2014-02-23 08:57:22 +0800
commita4a4ffbeff2fd9082f2c96330ea0915ae1b6e6c1 (patch)
tree2258f5e5ab5c1b99cfb39e10b56d9eef00381bb9 /ethchain
parentf5737b929a972102b16e4b206a52b1e36b508860 (diff)
downloaddexon-a4a4ffbeff2fd9082f2c96330ea0915ae1b6e6c1.tar
dexon-a4a4ffbeff2fd9082f2c96330ea0915ae1b6e6c1.tar.gz
dexon-a4a4ffbeff2fd9082f2c96330ea0915ae1b6e6c1.tar.bz2
dexon-a4a4ffbeff2fd9082f2c96330ea0915ae1b6e6c1.tar.lz
dexon-a4a4ffbeff2fd9082f2c96330ea0915ae1b6e6c1.tar.xz
dexon-a4a4ffbeff2fd9082f2c96330ea0915ae1b6e6c1.tar.zst
dexon-a4a4ffbeff2fd9082f2c96330ea0915ae1b6e6c1.zip
Moved address
Diffstat (limited to 'ethchain')
-rw-r--r--ethchain/contract.go31
1 files changed, 0 insertions, 31 deletions
diff --git a/ethchain/contract.go b/ethchain/contract.go
index 5dccb8728..68ec39f0b 100644
--- a/ethchain/contract.go
+++ b/ethchain/contract.go
@@ -41,34 +41,3 @@ func (c *Contract) SetAddr(addr []byte, value interface{}) {
func (c *Contract) State() *ethutil.Trie {
return c.state
}
-
-type Address struct {
- Amount *big.Int
- Nonce uint64
-}
-
-func NewAddress(amount *big.Int) *Address {
- return &Address{Amount: amount, Nonce: 0}
-}
-
-func NewAddressFromData(data []byte) *Address {
- address := &Address{}
- address.RlpDecode(data)
-
- return address
-}
-
-func (a *Address) AddFee(fee *big.Int) {
- a.Amount.Add(a.Amount, fee)
-}
-
-func (a *Address) RlpEncode() []byte {
- return ethutil.Encode([]interface{}{a.Amount, a.Nonce})
-}
-
-func (a *Address) RlpDecode(data []byte) {
- decoder := ethutil.NewValueFromBytes(data)
-
- a.Amount = decoder.Get(0).BigInt()
- a.Nonce = decoder.Get(1).Uint()
-}