@@ -21,6 +21,7 @@ import (
2121 "syscall"
2222 "time"
2323
24+ "github.com/ethereum/go-ethereum/common"
2425 "github.com/ethersphere/bee/v2"
2526 "github.com/ethersphere/bee/v2/pkg/accesscontrol"
2627 "github.com/ethersphere/bee/v2/pkg/bmt"
@@ -285,6 +286,14 @@ func buildBeeNode(ctx context.Context, c *command, cmd *cobra.Command, logger lo
285286 logger .Info ("SIMD hashing enabled" , "batch_width" , keccak .BatchWidth (), "avx512" , keccak .HasAVX512 ())
286287 }
287288
289+ var bzzTokenAddress common.Address
290+ if a := c .config .GetString (optionNameBzzTokenAddress ); a != "" {
291+ if ! common .IsHexAddress (a ) {
292+ return nil , errors .New ("malformed bzz token address" )
293+ }
294+ bzzTokenAddress = common .HexToAddress (a )
295+ }
296+
288297 b , err := node .NewBee (ctx , c .config .GetString (optionNameP2PAddr ), signerConfig .publicKey , signerConfig .signer , networkID , logger , signerConfig .libp2pPrivateKey , signerConfig .pssPrivateKey , signerConfig .session , & node.Options {
289298 Addr : c .config .GetString (optionNameP2PAddr ),
290299 AllowPrivateCIDRs : c .config .GetBool (optionNameAllowPrivateCIDRs ),
@@ -297,6 +306,7 @@ func buildBeeNode(ctx context.Context, c *command, cmd *cobra.Command, logger lo
297306 BlockchainRpcTLSTimeout : c .config .GetDuration (configKeyBlockchainRpcTLSTimeout ),
298307 BlockchainRpcIdleTimeout : c .config .GetDuration (configKeyBlockchainRpcIdleTimeout ),
299308 BlockchainRpcKeepalive : c .config .GetDuration (configKeyBlockchainRpcKeepalive ),
309+ BzzTokenAddress : bzzTokenAddress ,
300310 BlockProfile : c .config .GetBool (optionNamePProfBlock ),
301311 BlockTime : networkConfig .blockTime ,
302312 BlockSyncInterval : c .config .GetUint64 (optionNameBlockSyncInterval ),
0 commit comments