Skip to content
Open

Dev #75

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
911bf22
Added fees
bohdan-titan Sep 12, 2023
4af0597
Merge pull request #71 from Lumerin-protocol/feat/fee
alex-sandrk Sep 13, 2023
bae2f51
feat: new proxy api
alex-sandrk Sep 13, 2023
877c41c
Merge pull request #72 from Lumerin-protocol/feat/new-proxy
alex-sandrk Sep 13, 2023
8131ca9
update smart-contracts
alex-sandrk Sep 14, 2023
d42cd03
Fix gas fee
bohdan-titan Sep 14, 2023
4b9e3fd
Update version
bohdan-titan Sep 14, 2023
beea422
feat: contract version
alex-sandrk Sep 21, 2023
4d63f8a
Merge pull request #73 from Lumerin-protocol/feature/contract-version
lsheva Sep 21, 2023
b194ab1
Stg bugfixes (#74)
srt0422 Sep 23, 2023
3d681f1
feat: check port
alex-sandrk Sep 25, 2023
23cc390
use overloaded web3 instance instead of single provider. required fo…
srt0422 Sep 28, 2023
6d77bc7
polling for new blocks
alex-sandrk Oct 3, 2023
16795ff
new retry implementation web3
alex-sandrk Oct 9, 2023
a00b29b
avoid infinite loop
alex-sandrk Oct 9, 2023
928b7e4
check nullable
alex-sandrk Oct 9, 2023
b945126
Merge pull request #77 from Lumerin-protocol/feature/new-retry-web3
alex-sandrk Oct 9, 2023
e40769b
update ecies-geth lib
alex-sandrk Nov 6, 2023
cf02876
release 1.0.75
alex-sandrk Nov 6, 2023
2607918
fix: cycling on too many requests
alex-sandrk Nov 14, 2023
b59b6e8
1.0.77
alex-sandrk Nov 14, 2023
f2b10f8
1.0.78
alex-sandrk Nov 14, 2023
6265c85
1.0.78
alex-sandrk Nov 14, 2023
0a3f046
feat: 1.0.79
alex-sandrk Nov 14, 2023
8ba706c
handle specific error
alex-sandrk Nov 14, 2023
32dd3a9
feat: handle all nodes 429
alex-sandrk Nov 16, 2023
9010bc4
1.0.82
alex-sandrk Nov 17, 2023
3027f84
fix: use explorerApiURLs instead of mapping chainID to explorer api url
shev-titan Nov 21, 2023
20b933c
feat: additional error handling
alex-sandrk Dec 7, 2023
12e12cf
Update auto-tag.yml
alex-sandrk Dec 7, 2023
56d073d
Profit target change
bohdan-titan Jan 2, 2024
fc2b427
Added v2
bohdan-titan Jan 9, 2024
21ff51e
fix: do not pay for contract update
alex-sandrk Jan 12, 2024
025de27
Merge branch 'dev' into feature/profit-target
alex-sandrk Jan 12, 2024
4f2686c
remove comments
alex-sandrk Jan 12, 2024
bf38a1c
Merge branch 'feature/profit-target' of github.com:Lumerin-protocol/W…
alex-sandrk Jan 12, 2024
5d40dee
Merge pull request #79 from Lumerin-protocol/feature/profit-target
alex-sandrk Jan 15, 2024
319b61a
allow negative profit target
alex-sandrk Jan 17, 2024
f007876
refresh contract data after purchase
alex-sandrk Jan 24, 2024
b200545
fix: slow ui updates
alex-sandrk Feb 2, 2024
418bfb6
fix: additional error handling, more logs, more retries
alex-sandrk Feb 8, 2024
ba596f8
group if condition
alex-sandrk Feb 8, 2024
00e96ce
Merge pull request #80 from Lumerin-protocol/fix/web3-retries
abs2023 Feb 8, 2024
7fccd3d
fix: handle additional public node error
alex-sandrk Mar 4, 2024
ecc41ba
feat: auto-close + indexer
alex-sandrk Mar 26, 2024
795483c
Merge pull request #81 from Lumerin-protocol/feature/auto-close
alex-sandrk Mar 26, 2024
0207e1c
feat: dynamic block reward
alex-sandrk Apr 16, 2024
4ee8460
Merge pull request #82 from Lumerin-protocol/feature/dynamic-block-re…
alex-sandrk Apr 16, 2024
ec72246
Removed whitelist check
bohdan-titan Jan 16, 2025
b2e85eb
Added new plugin
bohdan-titan Jan 24, 2025
ec92156
feat: validator registry contract integration
lsheva Feb 2, 2025
536a357
Merge pull request #84 from Lumerin-protocol/feature/validator-registry
shev-titan Feb 2, 2025
e9dc828
fix: move multicall to deps
lsheva Feb 2, 2025
8b85e97
Merge pull request #85 from Lumerin-protocol/feature/validator-registry
shev-titan Feb 2, 2025
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
4 changes: 2 additions & 2 deletions .github/workflows/auto-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: butlerlogic/action-autotag@stable
- uses: butlerlogic/action-autotag@1.1.2
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
strategy: package
strategy: package
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lumerin/wallet-core",
"version": "1.0.64",
"version": "1.1.5",
"author": {
"name": "Lumerin",
"email": "developer@lumerin.io",
Expand Down Expand Up @@ -31,15 +31,16 @@
"dependencies": {
"@azure/abort-controller": "^1.1.0",
"@mhoc/axios-digest-auth": "^0.8.0",
"@dopex-io/web3-multicall": "^0.1.10",
"abi-decoder": "^2.4.0",
"axios": "0.21.1",
"axios-cookiejar-support": "1.0.1",
"bottleneck": "^2.19.5",
"chalk": "^2.4.2",
"cheerio": "^1.0.0-rc.12",
"contracts-js": "github:Lumerin-protocol/contracts-js#v0.0.24",
"contracts-js": "github:Lumerin-protocol/contracts-js#v1.2.1",
"cross-port-killer": "^1.4.0",
"debug": "4.1.1",
"ecies-geth": "^1.6.2",
"ecies-geth": "^1.7.0",
"electron-log": "^4.4.8",
"ethereumjs-wallet": "1.0.1",
"ip": "^1.1.8",
Expand Down Expand Up @@ -83,4 +84,4 @@
"engines": {
"node": ">=12"
}
}
}
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const pluginCreators = [
require('./plugins/proxy-router'),
require('./plugins/contracts'),
require('./plugins/devices'),
require('./plugins/validator-registry')
]
Comment on lines 14 to 18

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Performance and Memory Usage Issue

Loading all plugins at the start using require can lead to high memory usage and potentially slow down the application startup, especially if some plugins are not immediately needed. Consider using a lazy loading technique, where plugins are only required when they are actually needed. This can be achieved by storing plugin identifiers or paths in the array and requiring them dynamically when initializing.

Suggested Change:

const pluginCreators = [
  './plugins/rates',
  './plugins/eth',
  // other plugins
];

// Later, when initializing:
plugins = pluginCreators.map(pluginPath => require(pluginPath)());

Comment on lines 14 to 18

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error Handling Issue

There is no error handling for the scenario where a plugin might fail to load due to issues such as missing files or syntax errors. This can cause the application to crash. To improve the robustness of the application, consider wrapping the require calls in a try-catch block and handling the errors appropriately, possibly logging them or attempting a fallback mechanism.

Suggested Change:

const pluginCreators = [];
const pluginPaths = [
  './plugins/rates',
  './plugins/eth',
  // other plugins
];

pluginPaths.forEach(path => {
  try {
    const plugin = require(path);
    pluginCreators.push(plugin);
  } catch (error) {
    logger.error('Failed to load plugin:', path, error);
  }
});


function createCore() {
Expand Down
Loading
Loading