aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/contract.go
diff options
context:
space:
mode:
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()
}