Skip to content

Commit b61e2f4

Browse files
cowanatorfleupold
andauthored
Remove Bond Map (#29)
* remove bond map * update test --------- Co-authored-by: Felix Leupold <[email protected]>
1 parent 8617902 commit b61e2f4

File tree

4 files changed

+1
-14
lines changed

4 files changed

+1
-14
lines changed

.env.sample

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ ZODIAC_ROLE_KEY=
1818
FINE_MIN=0.001
1919
BOND_THRESHOLD=10.0
2020
PAYMENT_QUERY=3742749
21-
BOND_MAP="('0xa489faf6e337d997b8a23e2b6f3a8880b1b61e19', '0xfd39bc23d356a762cf80f60b7bc8d2a4b9bcfe67')"
2221

2322
# Secrets: Required for both Billing & Drafting
2423
DUNE_API_KEY=

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,6 @@ PAYMENT_QUERY=3742749
7272
FINE_MIN=0.001
7373
# Minimum account balance required to stay connected to the network. (in ETH)
7474
BOND_THRESHOLD=10
75-
# For accounts who are loosely linked to the bond provider account.
76-
BOND_MAP="('0xa489faf6e337d997b8a23e2b6f3a8880b1b61e19', '0xfd39bc23d356a762cf80f60b7bc8d2a4b9bcfe67')"
7775
```
7876

7977
Notes on:

src/dune.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,28 +23,23 @@ export class QueryRunner {
2323
private readonly paymentQuery: number;
2424
private readonly feeQuery: number;
2525
private readonly options: RuntimeOptions;
26-
// This should be formatted as comma separated list of tuples of SQL hex string
27-
// E.g. ('0x12', '0x34'),('0x56', '0x78')
28-
private readonly bondMap: string;
2926

3027
constructor(
3128
apiKey: string,
3229
billingQuery: number,
3330
paymentQuery: number,
3431
feeQuery: number,
35-
bondMap: string,
3632
options?: RuntimeOptions,
3733
) {
3834
this.dune = new DuneClient(apiKey);
3935
this.billingQuery = billingQuery;
4036
this.paymentQuery = paymentQuery;
4137
this.feeQuery = feeQuery;
42-
this.bondMap = bondMap;
4338
this.options = options || {};
4439
}
4540

4641
static fromEnv(): QueryRunner {
47-
const { FEE_QUERY, BILLING_QUERY, PAYMENT_QUERY, DUNE_API_KEY, BOND_MAP } =
42+
const { FEE_QUERY, BILLING_QUERY, PAYMENT_QUERY, DUNE_API_KEY } =
4843
process.env;
4944
// TODO - make this configurable.
5045
const options = {
@@ -58,7 +53,6 @@ export class QueryRunner {
5853
parseInt(BILLING_QUERY!),
5954
parseInt(PAYMENT_QUERY!),
6055
parseInt(FEE_QUERY!),
61-
BOND_MAP!,
6256
options,
6357
);
6458
}
@@ -121,7 +115,6 @@ export class QueryRunner {
121115
try {
122116
console.log(`Retrieving latest payment status...`);
123117
const paymentResponse = await this.dune.runQuery({
124-
query_parameters: [QueryParameter.text("BondMapping", this.bondMap)],
125118
queryId: this.paymentQuery,
126119
...this.options,
127120
});

tests/e2e/e2e.test.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,11 @@ describe("e2e - Sepolia", () => {
1212
const feeQuery = 3678625;
1313
const paymentQuery = 3781897;
1414

15-
const bondMap =
16-
"('0xa489faf6e337d997b8a23e2b6f3a8880b1b61e19', '0xfd39bc23d356a762cf80f60b7bc8d2a4b9bcfe67')";
1715
const dataFetcher = new QueryRunner(
1816
DUNE_API_KEY!,
1917
billingQuery,
2018
paymentQuery,
2119
feeQuery,
22-
bondMap,
2320
{},
2421
);
2522
const billDate = new Date();

0 commit comments

Comments
 (0)