add value for all method
This commit is contained in:
parent
6b9daa4d14
commit
a7a6f24ceb
@ -153,10 +153,8 @@ var sendCmd = &cli.Command{
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
totalCost := types.BigMul(msg.GasFeeCap, types.NewInt(uint64(msg.GasLimit)))
|
totalCost := types.BigAdd(types.BigMul(msg.GasFeeCap, types.NewInt(uint64(msg.GasLimit))), msg.Value)
|
||||||
if msg.Method == builtin.MethodSend {
|
|
||||||
totalCost = types.BigAdd(totalCost, msg.Value)
|
|
||||||
}
|
|
||||||
if fromBalance.LessThan(totalCost) {
|
if fromBalance.LessThan(totalCost) {
|
||||||
fmt.Printf("From balance %s attoFIL less than total cost %s attoFIL\n", fromBalance, totalCost)
|
fmt.Printf("From balance %s attoFIL less than total cost %s attoFIL\n", fromBalance, totalCost)
|
||||||
if !cctx.Bool("really-do-it") {
|
if !cctx.Bool("really-do-it") {
|
||||||
|
Loading…
Reference in New Issue
Block a user