@@ -13,6 +13,7 @@ import (
13
13
"github.com/ethereum/go-ethereum/log"
14
14
15
15
"github.com/taikoxyz/taiko-client/bindings/encoding"
16
+ "github.com/taikoxyz/taiko-client/internal/utils"
16
17
handler "github.com/taikoxyz/taiko-client/prover/event_handler"
17
18
proofProducer "github.com/taikoxyz/taiko-client/prover/proof_producer"
18
19
proofSubmitter "github.com/taikoxyz/taiko-client/prover/proof_submitter"
@@ -39,20 +40,20 @@ func (p *Prover) setApprovalAmount(ctx context.Context, contract common.Address)
39
40
return err
40
41
}
41
42
42
- log .Info ("Existing allowance for the contract" , "allowance" , allowance . String ( ), "contract" , contract )
43
+ log .Info ("Existing allowance for the contract" , "allowance" , utils . WeiToEther ( allowance ), "contract" , contract )
43
44
44
45
// If the existing allowance is greater or equal to the configured allowance, skip setting allowance.
45
46
if allowance .Cmp (p .cfg .Allowance ) >= 0 {
46
47
log .Info (
47
48
"Skipping setting allowance, allowance already greater or equal" ,
48
- "allowance" , allowance . String ( ),
49
- "approvalAmount" , p .cfg .Allowance . String () ,
49
+ "allowance" , utils . WeiToEther ( allowance ),
50
+ "approvalAmount" , p .cfg .Allowance ,
50
51
"contract" , contract ,
51
52
)
52
53
return nil
53
54
}
54
55
55
- log .Info ("Approving the contract for taiko token" , "allowance" , p .cfg .Allowance . String () , "contract" , contract )
56
+ log .Info ("Approving the contract for taiko token" , "allowance" , p .cfg .Allowance , "contract" , contract )
56
57
data , err := encoding .TaikoTokenABI .Pack ("approve" , contract , p .cfg .Allowance )
57
58
if err != nil {
58
59
return err
@@ -84,7 +85,7 @@ func (p *Prover) setApprovalAmount(ctx context.Context, contract common.Address)
84
85
return err
85
86
}
86
87
87
- log .Info ("New allowance for the contract" , "allowance" , allowance . String ( ), "contract" , contract )
88
+ log .Info ("New allowance for the contract" , "allowance" , utils . WeiToEther ( allowance ), "contract" , contract )
88
89
89
90
return nil
90
91
}
0 commit comments