Skip to content

Commit

Permalink
reduce gas to reasonable values
Browse files Browse the repository at this point in the history
  • Loading branch information
tudor-malene committed Dec 16, 2024
1 parent 885048b commit c00f814
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion go/enclave/crosschain/message_bus_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func (m *MessageBusManager) GenerateMessageBusDeployTx() (*common.L2Tx, error) {
tx := &types.LegacyTx{
Nonce: 0, // The first transaction of the owner identity should always be deploying the contract
Value: gethcommon.Big0,
Gas: 500_000_000, // It's quite the expensive contract.
Gas: 5_000_000, // It's quite the expensive contract.
GasPrice: gethcommon.Big0, // Synthetic transactions are on the house. Or the house.
Data: gethcommon.FromHex(MessageBus.MessageBusMetaData.Bin),
To: nil, // Geth requires nil instead of gethcommon.Address{} which equates to zero address in order to return receipt.
Expand Down
2 changes: 1 addition & 1 deletion go/enclave/system/contracts.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func GenerateDeploymentTransaction(initCode []byte, logger gethlog.Logger) (*com
tx := &types.LegacyTx{
Nonce: 0, // The first transaction of the owner identity should always be deploying the contract
Value: gethcommon.Big0,
Gas: 500_000_000, // It's quite the expensive contract.
Gas: 10_000_000, // It's quite the expensive contract.
GasPrice: gethcommon.Big0, // Synthetic transactions are on the house. Or the house.
Data: initCode, // gethcommon.FromHex(SystemDeployer.SystemDeployerMetaData.Bin),
To: nil, // Geth requires nil instead of gethcommon.Address{} which equates to zero address in order to return receipt.
Expand Down
4 changes: 2 additions & 2 deletions integration/simulation/transaction_injector.go
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ func (ti *TransactionInjector) issueRandomWithdrawals() {
tx := &types.LegacyTx{
Nonce: fromWallet.GetNonceAndIncrement(),
Value: gethcommon.Big1,
Gas: uint64(1_000_000_000),
Gas: uint64(1_000_000),
GasPrice: price,
Data: nil,
To: &msgBusAddr,
Expand Down Expand Up @@ -530,7 +530,7 @@ func (ti *TransactionInjector) newTx(data []byte, nonce uint64, ercType testcomm
return &types.LegacyTx{
Nonce: nonce,
Value: gethcommon.Big0,
Gas: uint64(1_000_000_000),
Gas: uint64(1_000_000),
GasPrice: gethcommon.Big1,
Data: data,
To: ti.wallets.Tokens[ercType].L2ContractAddress,
Expand Down
4 changes: 2 additions & 2 deletions integration/tengateway/tengateway_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ func interactWithSmartContractUnsigned(client *ethclient.Client, sendRaw bool, n
interactionTx := types.LegacyTx{
Nonce: nonce,
To: &contractAddress,
Gas: uint64(10_000_000),
Gas: uint64(1_000_000),
GasPrice: result.ToInt(),
Data: contractInteractionData,
Value: value,
Expand Down Expand Up @@ -769,7 +769,7 @@ func testUnsubscribe(t *testing.T, _ int, httpURL, wsURL string, w wallet.Wallet
// deploy events contract
deployTx := &types.LegacyTx{
Nonce: w.GetNonceAndIncrement(),
Gas: uint64(10_000_000),
Gas: uint64(1_000_000),
GasPrice: gethcommon.Big1,
Data: gethcommon.FromHex(eventsContractBytecode),
}
Expand Down
2 changes: 1 addition & 1 deletion tools/hardhatdeployer/contract_deployer.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func (cd *contractDeployer) run() (string, error) {
deployContractTx := types.LegacyTx{
Nonce: cd.wallet.GetNonceAndIncrement(),
GasPrice: big.NewInt(params.InitialBaseFee),
Gas: uint64(500_000_000),
Gas: uint64(1_000_000),
Data: cd.contractCode,
}

Expand Down

0 comments on commit c00f814

Please sign in to comment.