Skip to content

Commit 0bfc3c0

Browse files
committed
Add TransactionCount
1 parent 9747c76 commit 0bfc3c0

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

kernel/evm/evm.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package evm
22

33
import (
44
"encoding/hex"
5-
"fmt"
65
"math/big"
76
"strconv"
87

@@ -40,7 +39,7 @@ func NewEVMProxy(manager contract.Manager) (EVMProxy, error) {
4039
registry.RegisterKernMethod(CONTRACT_EVM, "SendRawTransaction", p.sendRawTransaction)
4140
registry.RegisterKernMethod(CONTRACT_EVM, "GetTransactionReceipt", p.getTransactionReceipt)
4241
registry.RegisterKernMethod(CONTRACT_EVM, "BalanceOf", p.balanceOf)
43-
registry.RegisterKernMethod(CONTRACT_EVM, "TransactionCount", p.transactionCount)
42+
registry.RegisterKernMethod(CONTRACT_EVM, "GetTransactionCount", p.transactionCount)
4443
return &p, nil
4544
}
4645

@@ -225,7 +224,6 @@ func (p *proxy) transfer(ctx contract.KContext, from, to []byte, amount *big.Int
225224
toBalance = toBalance.Add(toBalance, amount)
226225

227226
// 这里不能直接存 bytes, 当结果是0的时候会有大问题
228-
fmt.Println(fromBalance.String())
229227
if err := ctx.Put(BALANCE_PREFIX, from, []byte(fromBalance.String())); err != nil {
230228
return err
231229
}

0 commit comments

Comments
 (0)