Skip to content

Commit f0ffa79

Browse files
authored
Expose block tag in secure mint (#3917)
1 parent b7a4631 commit f0ffa79

File tree

5 files changed

+12
-0
lines changed

5 files changed

+12
-0
lines changed

.changeset/metal-tips-join.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@chainlink/secure-mint-adapter': patch
3+
---
4+
5+
Expose block tag

packages/composites/secure-mint/src/transport/supply.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ type ChainData = {
1515
token_ccip_burn: string
1616
token_pre_mint: string
1717
aggregate_pre_mint: boolean
18+
block_finality: string
1819
}
1920
export type IndexerResponse = {
2021
supply: string

packages/composites/secure-mint/test/integration/__snapshots__/adapter.test.ts.snap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ exports[`execute mintable endpoint should block overmint 1`] = `
2121
"chains": {
2222
"1": {
2323
"aggregate_pre_mint": false,
24+
"block_finality": "0",
2425
"latest_block": 5,
2526
"mintable": "8",
2627
"request_block": 7,
@@ -96,6 +97,7 @@ exports[`execute mintable endpoint should return success 1`] = `
9697
"chains": {
9798
"1": {
9899
"aggregate_pre_mint": false,
100+
"block_finality": "finalized",
99101
"latest_block": 5,
100102
"mintable": "8",
101103
"request_block": 7,

packages/composites/secure-mint/test/integration/fixtures.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ export const mockIndexerSuccess = (): nock.Scope =>
5454
token_ccip_burn: '12',
5555
token_pre_mint: '13',
5656
aggregate_pre_mint: false,
57+
block_finality: 'finalized',
5758
},
5859
},
5960
}))
@@ -79,6 +80,7 @@ export const mockIndexerSuccess = (): nock.Scope =>
7980
token_ccip_burn: '12',
8081
token_pre_mint: '13',
8182
aggregate_pre_mint: false,
83+
block_finality: '0',
8284
},
8385
},
8486
}))

packages/composites/secure-mint/test/unit/supply.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ describe('getReserve', () => {
4040
token_ccip_burn: '1000',
4141
token_pre_mint: '1100',
4242
aggregate_pre_mint: false,
43+
block_finality: 'finalized',
4344
},
4445
'56': {
4546
latest_block: 3000,
@@ -52,6 +53,7 @@ describe('getReserve', () => {
5253
token_ccip_burn: '10000',
5354
token_pre_mint: '11000',
5455
aggregate_pre_mint: true,
56+
block_finality: '10',
5557
},
5658
},
5759
}

0 commit comments

Comments
 (0)