Skip to content

Commit

Permalink
add check contract creation
Browse files Browse the repository at this point in the history
  • Loading branch information
giskook committed Sep 26, 2024
1 parent 0712e51 commit 5bbc426
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pool/pool_xlayer.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ import (
"sync"
"time"

"github.com/ethereum/go-ethereum/common"

"github.com/0xPolygonHermez/zkevm-node/hex"
"github.com/0xPolygonHermez/zkevm-node/log"
"github.com/ethereum/go-ethereum/common"
)

const (
Expand Down Expand Up @@ -134,6 +135,7 @@ func (p *Pool) checkFreeGp(ctx context.Context, poolTx Transaction, from common.
fromToName, freeGpList := GetSpecialFreeGasList(p.cfg.FreeGasList)
info := freeGpList[fromToName[from.String()]]
if info != nil &&
poolTx.To() != nil &&
Contains(info.ToList, *poolTx.To()) &&
ContainsMethod("0x"+common.Bytes2Hex(poolTx.Data()), info.MethodSigs) {
return true, nil
Expand Down

0 comments on commit 5bbc426

Please sign in to comment.