aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/contract.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-02-15 08:34:18 +0800
committerobscuren <geffobscura@gmail.com>2014-02-15 08:34:18 +0800
commit73fd358d940418b15dec850f50407bd2e504d88c (patch)
treea1202689cf2e715fef9c31fa17ca4ad241de1d0f /ethchain/contract.go
parentf247f0c518c6e848061462e3234f32cc7d854a46 (diff)
downloadgo-tangerine-73fd358d940418b15dec850f50407bd2e504d88c.tar
go-tangerine-73fd358d940418b15dec850f50407bd2e504d88c.tar.gz
go-tangerine-73fd358d940418b15dec850f50407bd2e504d88c.tar.bz2
go-tangerine-73fd358d940418b15dec850f50407bd2e504d88c.tar.lz
go-tangerine-73fd358d940418b15dec850f50407bd2e504d88c.tar.xz
go-tangerine-73fd358d940418b15dec850f50407bd2e504d88c.tar.zst
go-tangerine-73fd358d940418b15dec850f50407bd2e504d88c.zip
Removed RlpValue in favour of Value
Diffstat (limited to 'ethchain/contract.go')
-rw-r--r--ethchain/contract.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/ethchain/contract.go b/ethchain/contract.go
index d1fcec3b4..70189593b 100644
--- a/ethchain/contract.go
+++ b/ethchain/contract.go
@@ -23,11 +23,11 @@ func (c *Contract) RlpEncode() []byte {
}
func (c *Contract) RlpDecode(data []byte) {
- decoder := ethutil.NewRlpValueFromBytes(data)
+ decoder := ethutil.NewValueFromBytes(data)
- c.Amount = decoder.Get(0).AsBigInt()
- c.Nonce = decoder.Get(1).AsUint()
- c.state = ethutil.NewTrie(ethutil.Config.Db, decoder.Get(2).AsRaw())
+ c.Amount = decoder.Get(0).BigInt()
+ c.Nonce = decoder.Get(1).Uint()
+ c.state = ethutil.NewTrie(ethutil.Config.Db, decoder.Get(2).Interface())
}
func (c *Contract) State() *ethutil.Trie {
@@ -59,8 +59,8 @@ func (a *Address) RlpEncode() []byte {
}
func (a *Address) RlpDecode(data []byte) {
- decoder := ethutil.NewRlpValueFromBytes(data)
+ decoder := ethutil.NewValueFromBytes(data)
- a.Amount = decoder.Get(0).AsBigInt()
- a.Nonce = decoder.Get(1).AsUint()
+ a.Amount = decoder.Get(0).BigInt()
+ a.Nonce = decoder.Get(1).Uint()
}