Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions lib/blockchain/botanix.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package blockchain

import (
"math/big"

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


// BotanixMultinodeClient represents a multi-node, EVM compatible client for the Botanix network
type BotanixMultinodeClient struct {
*EthereumMultinodeClient
}

// BotanixClient represents a single node, EVM compatible client for the Botanix network
type BotanixClient struct {
*EthereumClient
}

func (b *BotanixClient) EstimateGas(callData ethereum.CallMsg) (GasEstimations, error) {
gasEstimations, err := b.EthereumClient.EstimateGas(callData)
if err != nil {
return GasEstimations{}, err
}
gasEstimations.GasTipCap = big.NewInt(0)

return gasEstimations, err
}
6 changes: 6 additions & 0 deletions lib/blockchain/known_networks.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const (
WeMixClientImplementation ClientImplementation = "WeMix"
KromaClientImplementation ClientImplementation = "Kroma"
GnosisClientImplementation ClientImplementation = "Gnosis"
BotanixClientImplementation ClientImplementation="Botanix"
)

// wrapSingleClient Wraps a single EVM client in its appropriate implementation, based on the chain ID
Expand Down Expand Up @@ -66,6 +67,8 @@ func wrapSingleClient(networkSettings EVMNetwork, client *EthereumClient) EVMCli
wrappedEc = &KromaClient{client}
case GnosisClientImplementation:
wrappedEc = &GnosisClient{client}
case BotanixClientImplementation:
wrappedEc = &BotanixClient{client}
default:
wrappedEc = client
}
Expand Down Expand Up @@ -128,6 +131,9 @@ func wrapMultiClient(networkSettings EVMNetwork, client *EthereumMultinodeClient
case GnosisClientImplementation:
logMsg.Msg("Using Gnosis Client")
wrappedEc = &GnosisMultinodeClient{client}
case BotanixClientImplementation:
logMsg.Msg("Using Botanix Client")
wrappedEc = &BotanixMultinodeClient{client}
default:
log.Warn().Str("Network", networkSettings.Name).Msg("Unknown client implementation, defaulting to standard Ethereum client")
wrappedEc = client
Expand Down
30 changes: 30 additions & 0 deletions lib/networks/known_networks.go
Original file line number Diff line number Diff line change
Expand Up @@ -1007,6 +1007,34 @@ var (
DefaultGasLimit: 6000000,
}

BotanixMainnet = blockchain.EVMNetwork{
Name: "Botanix Mainnet",
SupportsEIP1559: true,
ClientImplementation: blockchain.BotanixClientImplementation,
ChainID: 3637,
Simulated: false,
ChainlinkTransactionLimit: 5000,
Timeout: blockchain.StrDuration{Duration: 3 * time.Minute},
MinimumConfirmations: 1,
GasEstimationBuffer: 10000,
DefaultGasLimit: 6000000,
FinalityTag: true,
}

BotanixTestnet = blockchain.EVMNetwork{
Name: "Botanix Testnet",
SupportsEIP1559: true,
ClientImplementation: blockchain.BotanixClientImplementation,
ChainID: 3636,
Simulated: false,
ChainlinkTransactionLimit: 5000,
Timeout: blockchain.StrDuration{Duration: 3 * time.Minute},
MinimumConfirmations: 1,
GasEstimationBuffer: 10000,
DefaultGasLimit: 6000000,
FinalityTag: true,
}

MappedNetworks = map[string]blockchain.EVMNetwork{
"SIMULATED": SimulatedEVM,
"ANVIL": Anvil,
Expand Down Expand Up @@ -1076,6 +1104,8 @@ var (
"XLAYER_SEPOLIA": XLayerSepolia,
"XLAYER_MAINNET": XLayerMainnet,
"TREASURE_RUBY": TreasureRuby,
"BOTANIX_MAINNET": BotanixMainnet,
"BOTANIX_TESTNET": BotanixTestnet,
}
)

Expand Down
Loading