Skip to content

Commit

Permalink
Fix only replay-protected (EIP-155) txn error
Browse files Browse the repository at this point in the history
  • Loading branch information
lwYeo committed Aug 11, 2021
1 parent 3895484 commit 07b2cfd
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Crypto LP Compounder/Compounder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ public Compounder(Settings.CompounderSettings settings)
Log.WriteLine("IsLogAll: " + _Settings.IsLogAll.ToString());
Log.WriteLine("RPC URL: " + _Settings.RPC_URL);
Log.WriteLine("RPC_Timeout: " + _Settings.RPC_Timeout.ToString() + " s");
Log.WriteLine("RPC_ChainID: " + _Settings.RPC_ChainID?.ToString() ?? "null");
Log.WriteLine("GasPriceOffsetGwei:" + _Settings.GasPriceOffsetGwei.ToString() + " Gwei");
Log.WriteLine("FixedGasPriceGwei: " + sFixedGasGwei);
Log.WriteLine("MinGasPriceGwei: " + _Settings.GetUserMinGasPrice().ToString() + " Gwei");
Expand Down Expand Up @@ -201,7 +202,7 @@ public Compounder(Settings.CompounderSettings settings)
Log.WriteLine("PoolID: " + _Settings.Farm.FarmPoolID.ToString());
Log.WriteLine("ProcessAllRewards: " + _Settings.Farm.ProcessAllRewards.ToString());

Account account = new(Crypto_Crypt.Factory.Instance.Decrypt(_Settings.Wallet.PrivateKeyCrypt));
Account account = new(Crypto_Crypt.Factory.Instance.Decrypt(_Settings.Wallet.PrivateKeyCrypt), _Settings.RPC_ChainID);

if (!account.Address.Equals(_Settings.Wallet.Address, StringComparison.OrdinalIgnoreCase))
{
Expand Down
2 changes: 2 additions & 0 deletions Crypto LP Compounder/Settings/CompounderSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,8 @@ public BigInteger GetGasPrice(Web3 web3)

public uint RPC_Timeout { get; set; } = 120;

public ulong? RPC_ChainID { get; set; } = null;

public float GasPriceOffsetGwei { get; set; } = 0.0f;

public float FixedGasPriceGwei { get; set; } = 0.0f;
Expand Down
1 change: 1 addition & 0 deletions Crypto LP Compounder/Settings/settings_WBNB-MOMA.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"IsLogAll": true,
"RPC_URL": "https://bsc-dataseed1.binance.org/",
"RPC_Timeout": 120,
"RPC_ChainID": 56,
"GasPriceOffsetGwei": 0.0,
"FixedGasPriceGwei": 0.0,
"MinGasPriceGwei": 0.0,
Expand Down
1 change: 1 addition & 0 deletions Crypto LP Compounder/Settings/settings_WFTM-TOMB.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"IsLogAll": true,
"RPC_URL": "https://rpc.fantom.network/",
"RPC_Timeout": 120,
"RPC_ChainID": 250,
"GasPriceOffsetGwei": 0.0,
"FixedGasPriceGwei": 0.0,
"MinGasPriceGwei": 0.0,
Expand Down
1 change: 1 addition & 0 deletions Crypto LP Compounder/Settings/settings_WFTM-YEL.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"IsLogAll": true,
"RPC_URL": "https://rpc.fantom.network/",
"RPC_Timeout": 120,
"RPC_ChainID": 250,
"GasPriceOffsetGwei": 0.0,
"FixedGasPriceGwei": 0.0,
"MinGasPriceGwei": 0.0,
Expand Down

0 comments on commit 07b2cfd

Please sign in to comment.