Skip to content

Commit

Permalink
Merge branch 'unprofitable_queue' into use_txmgr
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberhorsey committed Mar 25, 2024
2 parents 782eec8 + 536c6e3 commit 0d0e5bb
Show file tree
Hide file tree
Showing 11 changed files with 172 additions and 976 deletions.
8 changes: 4 additions & 4 deletions packages/bridge-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@typescript-eslint/eslint-plugin": "^7.3.1",
"@typescript-eslint/parser": "^7.0.2",
"@vitest/coverage-v8": "^1.3.1",
"@wagmi/cli": "^2.1.2",
"@wagmi/cli": "^2.1.4",
"abitype": "^1.0.0",
"ajv": "^8.12.0",
"autoprefixer": "^10.4.18",
Expand Down Expand Up @@ -60,9 +60,9 @@
},
"type": "module",
"dependencies": {
"@wagmi/connectors": "^4.1.14",
"@wagmi/core": "^2.6.5",
"@walletconnect/ethereum-provider": "^2.11.2",
"@wagmi/connectors": "^4.1.18",
"@wagmi/core": "^2.6.9",
"@walletconnect/ethereum-provider": "^2.11.3",
"@walletconnect/modal": "^2.6.2",
"@web3modal/wagmi": "^4.1.1",
"@zerodevx/svelte-toast": "^0.9.5",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@

{#if customTokens.length > 0}
<div class="flex h-full w-full flex-col justify-between mt-6">
<h3 class="title-body-bold mb-7">Your imported tokens:</h3>
<h3 class="title-body-bold mb-7">{$t('token_dropdown.imported_tokens')}</h3>
{#each customTokens as ct (ct.symbol)}
<div class="flex items-center justify-between">
<div class="flex items-center m-2 space-x-2">
Expand All @@ -222,7 +222,7 @@
</div>
{/if}
</div>
<!-- We catch key events aboe -->
<!-- We catch key events above -->
<!-- svelte-ignore a11y-click-events-have-key-events -->
<div role="button" tabindex="0" class="overlay-backdrop" on:click={closeModalIfClickedOutside} />
</dialog>
3 changes: 2 additions & 1 deletion packages/bridge-ui/src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,8 @@
"description": "You can add your own token by entering the contract address below. Make sure you are on the chain where the token is deployed.",
"title": "Add your own token"
},
"label": "Select token"
"label": "Select token",
"imported_tokens": "Your imported tokens:"
},
"transactions": {
"actions": {
Expand Down
2 changes: 1 addition & 1 deletion packages/guardian-prover-health-check-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
},
"type": "module",
"dependencies": {
"@wagmi/core": "^1.4.13",
"@wagmi/core": "^2.6.9",
"axios": "^1.6.7",
"svelte-i18n": "^4.0.0",
"viem": "^1.21.4"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import type { GuardianProverIdsMap, SignedBlock, SignedBlocks } from '$lib/types';
import type { GuardianProverIdsMap, SignedBlocks } from '$lib/types';

export const getGuardianProverIdsPerBlockNumber = (blocks: SignedBlocks): GuardianProverIdsMap => {
const result: GuardianProverIdsMap = {};

for (const blockNumber in blocks) {
result[blockNumber] = blocks[blockNumber].map((block: SignedBlock) => block.guardianProverID);
}

return result;
const blockNumbers = Object.keys(blocks);
return blockNumbers.reduce((prev, blockNumber) => {
return {
...prev,
[blockNumber]: blocks[blockNumber].map(block => block.guardianProverID)
}
}, {});
};
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
import { get } from 'svelte/store';
import { signedBlocks } from '$stores';
import type { SignedBlock, SortedSignedBlocks } from '$lib/types';
import type { SortedSignedBlocks } from '$lib/types';

export function signedBlocksPerGuardian(guardianProverId: number): number {
const allSortedSignedBlocks: SortedSignedBlocks = get(signedBlocks);
let count = 0;
allSortedSignedBlocks.forEach((blockGroup) => {
blockGroup.blocks.forEach((block: SignedBlock) => {
if (block.guardianProverID === Number(guardianProverId)) {
count++;
}
});
});
const targetId = Number(guardianProverId);

return count;
return allSortedSignedBlocks
.reduce((total, blockGroup) => {
const matchingBlocks = blockGroup.blocks.filter(block => block.guardianProverID === targetId);
return total + matchingBlocks.length;
}, 0);
}
1 change: 1 addition & 0 deletions packages/relayer/docker-compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ services:
ports:
- 5672:5672
- 15672:15672
- 15692:15692
volumes:
- ~/.docker-conf/rabbitmq/data/:/var/lib/rabbitmq/
- ~/.docker-conf/rabbitmq/log/:/var/log/rabbitmq
Expand Down
4 changes: 4 additions & 0 deletions packages/relayer/docker-compose/prometheus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ scrape_configs:
scrape_interval: 15s
static_configs:
- targets: ["localhost:9090"]

- job_name: "rabbitmq"
static_configs:
- targets: ["host.docker.internal:15692"]
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ CREATE TABLE IF NOT EXISTS events (
kind VARCHAR(255) NOT NULL DEFAULT "",
data JSON NOT NULL,
canonical_token_address VARCHAR(255) DEFAULT "",
canonical_token_symbol VARCHAR(10) DEFAULT "",
canonical_token_symbol VARCHAR(255) DEFAULT "",
canonical_token_name VARCHAR(255) DEFAULT "",
canonical_token_decimals int DEFAULT 0,
amount VARCHAR(255) NOT NULL DEFAULT 0,
Expand Down

This file was deleted.

Loading

0 comments on commit 0d0e5bb

Please sign in to comment.