@hanamesh/api-contracts 0.22.4 → 0.22.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
1
  /** Provider declarations only. Runtime factories are implemented by @hanamesh/server-chain/quote-v2. */
2
2
  export type * from './provider.js';
3
- export declare const QUOTE_V2_CONTRACT: Readonly<{protocol:'release-quote-v2';revision:'2.2.0';sourceCommit:string;manifestSHA256:string;launcherDomainVersion:'4';releaseDomainVersion:'3';migrationReasons:readonly string[]}>;
3
+ export declare const QUOTE_V2_CONTRACT: Readonly<{protocol:'release-quote-v2';revision:'2.3.0';sourceCommit:string;manifestSHA256:string;launcherDomainVersion:'4';releaseDomainVersion:'3';migrationReasons:readonly string[]}>;
@@ -1 +1 @@
1
- export const QUOTE_V2_CONTRACT=Object.freeze({protocol:'release-quote-v2',revision:'2.2.0',sourceCommit:'59ddb9554286d9ba1c68a2f8227a67d2b5c8d450',manifestSHA256:'918790fd46272d591b45465780dc4747f5d16c5f2b5250f3db268c5e7e006820',launcherDomainVersion:'4',releaseDomainVersion:'3',migrationReasons:Object.freeze(['None','HistoryUnavailable','PriceOutsideBand','NoFeasibleLiquidity'])});
1
+ export const QUOTE_V2_CONTRACT=Object.freeze({protocol:'release-quote-v2',revision:'2.3.0',sourceCommit:'2bbf4a5b6e45ca0392189daf15c680b8debfe110',manifestSHA256:'bf32a54f50ef95853d2ac423dc107fcdbc5d6e5baca8f1d4d1c0640175768b72',launcherDomainVersion:'4',releaseDomainVersion:'3',migrationReasons:Object.freeze(['None','HistoryUnavailable','PriceOutsideBand','NoFeasibleLiquidity'])});
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": "release-quote-v2",
3
3
  "evidence": "SOURCE_BUILD",
4
- "revision": "2.2.0",
4
+ "revision": "2.3.0",
5
5
  "compiler": "0.8.26+commit.8a97fa7a",
6
6
  "settings": {
7
7
  "remappings": [
@@ -25,18 +25,18 @@
25
25
  "HanaLauncherQuoteV2": {
26
26
  "path": "HanaLauncherQuoteV2.json",
27
27
  "source": "src/HanaLauncherQuoteV2.sol",
28
- "fileSHA256": "f2e3925cdc58b8a8340049373b5c0cc9cafcac19406b06b8781d0e9183e1220e",
28
+ "fileSHA256": "01917fab37a2c46725b7b2cbfd8bb807fe6edd4da54fc5e8113f3ce57d2a3056",
29
29
  "sourceSHA256": "91afeebbfe96a05b50fa049f32d047cbe1c38c854e466f45ab007bf2fb21b1fe",
30
30
  "abiSHA256": "811b774c71131beac41afba6986a4c7a55d37491a9d18aef8897ad97320c90d3",
31
- "creationKeccak": "0xd5945667a94cf4ab5636f2b60c9ab45ee0c6515293e24cc86c11e92f224f7069",
32
- "runtimeTemplateKeccak": "0xad200b42c3a47b8f35a9fc1e564f4c015f5db464b22b749198aa2c2ea9410dc5",
33
- "runtimeBytes": 14681,
31
+ "creationKeccak": "0xc2b4b3b86e419e525190bc90cbe8812d1dbddb6329a7462165312ff4540df8e3",
32
+ "runtimeTemplateKeccak": "0x692bd10bc20c007743d728cdbebb3e26618d3bc86ddfdb84b94571f177617918",
33
+ "runtimeBytes": 22021,
34
34
  "immutableSlots": 24
35
35
  },
36
36
  "HanaBondFactoryQuoteV2": {
37
37
  "path": "HanaBondFactoryQuoteV2.json",
38
38
  "source": "src/HanaBondQuoteV2.sol",
39
- "fileSHA256": "966560f06a8e24d685fbba0a08a74934c84c5d775f182366fbf129e4baea5c9b",
39
+ "fileSHA256": "0b1c33827b3bf23d57106d379e558535ba31b42c05a6f127490e0d1326590e87",
40
40
  "sourceSHA256": "54f1aacacc2ff4a7e86677e1864a5a625ccdf8bcd506867ab6b95a0f600ca4f1",
41
41
  "abiSHA256": "8058aca9fdab82c01e9437686d00ffaca6a8f49dffde949e6479cb7f4ca7802a",
42
42
  "creationKeccak": "0x02642f54a54e23c8845c99ddcfc1a97af1efac3de8a83a78f64365d4fe0be0f6",
@@ -47,7 +47,7 @@
47
47
  "HanaBondQuoteV2": {
48
48
  "path": "HanaBondQuoteV2.json",
49
49
  "source": "src/HanaBondQuoteV2.sol",
50
- "fileSHA256": "4a754dee89ea4e8b07cd9da54bd32889f6a236c049c518d533ec7d72e7a5c8a8",
50
+ "fileSHA256": "606602250893fcb93de5a09a346cb99bfbac76f72a7687a126ebc9c19207bc85",
51
51
  "sourceSHA256": "54f1aacacc2ff4a7e86677e1864a5a625ccdf8bcd506867ab6b95a0f600ca4f1",
52
52
  "abiSHA256": "5e913ac833dc86b9cc268b35f37d22d52fd3be56932349e9570e3790c1bb080a",
53
53
  "creationKeccak": "0xa06e328d33b13f2b901d7c18b3cda7360914a8d79fa4fdc96029caaab473376e",
@@ -58,18 +58,18 @@
58
58
  "HanaTokenQuoteV2": {
59
59
  "path": "HanaTokenQuoteV2.json",
60
60
  "source": "src/HanaTokenQuoteV2.sol",
61
- "fileSHA256": "5a2fab3e94d642a88eb6fea627c80370462e88d764073cf85b073fca42a0e1b0",
62
- "sourceSHA256": "acd89ff6bf4647429d0396f7cc28a4789c630a4a2bdef5044cfafc3655bad6fa",
63
- "abiSHA256": "6a9eee53d9e09ec26a7c854d8ba765a0dac9c6eca652daba1e080de001a3dd1c",
64
- "creationKeccak": "0x5ee558e9707eb57bc982738fcc803a21eb278c9d76d0a9816de2ba56984535e8",
65
- "runtimeTemplateKeccak": "0x5474253257db29ccd0d9786907da1a0a4d718b1835a4e5cbf9f4341b2f2e5c57",
66
- "runtimeBytes": 1900,
67
- "immutableSlots": 1
61
+ "fileSHA256": "5d3babc331fb2e3ce8b0ffc6463fe3523d18b82c52cb02d88aa03b718b958861",
62
+ "sourceSHA256": "29ecc7bb352ac52d8cecfcd23257662718aebb61a238592e9a8d8f39db190533",
63
+ "abiSHA256": "d77c3be77feffa7f9dd5ffde39e185f58096112b2e80edebc80c203391951245",
64
+ "creationKeccak": "0x810d76b87b69cf9ae81a1789023df45b5f3beb6712a95232adb6f51bed434cbe",
65
+ "runtimeTemplateKeccak": "0x7e39605acc62200a118f92691b3e5e09d0ddb985df83d2c330bc4e14236ae50b",
66
+ "runtimeBytes": 7466,
67
+ "immutableSlots": 8
68
68
  },
69
69
  "BatchVestingDistributorQuoteV2": {
70
70
  "path": "BatchVestingDistributorQuoteV2.json",
71
71
  "source": "src/BatchVestingDistributorQuoteV2.sol",
72
- "fileSHA256": "8a342f2f14c9c0dafbf156aa763818a470e7477197a4488f9f25d85631b576d4",
72
+ "fileSHA256": "a5c88864462a468b70a07bcdf96fd386a1495e366a2ab36de722e11e0dfc1734",
73
73
  "sourceSHA256": "027a5b5274e3785eb18352cfcd5afb455eeb31a1faec4aaad46c0c0a993e1649",
74
74
  "abiSHA256": "98c4c55e3390104361166342d3c4ee1412f9feeabb8e1a6c90b1ad0332bf19f7",
75
75
  "creationKeccak": "0x95ab394179d3609dedbf3170921da7dc5762006447f00f03f269d87f35512cab",
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "provider": "@hanamesh/server-chain/quote-v2",
3
3
  "sourceRepository": "yzsnstotz/hanamesh-contracts",
4
- "sourceCommit": "59ddb9554286d9ba1c68a2f8227a67d2b5c8d450",
5
- "revision": "2.2.0",
6
- "manifestSHA256": "918790fd46272d591b45465780dc4747f5d16c5f2b5250f3db268c5e7e006820",
4
+ "sourceCommit": "2bbf4a5b6e45ca0392189daf15c680b8debfe110",
5
+ "revision": "2.3.0",
6
+ "manifestSHA256": "bf32a54f50ef95853d2ac423dc107fcdbc5d6e5baca8f1d4d1c0640175768b72",
7
7
  "evidence": "SOURCE_BUILD",
8
8
  "providerRepository": "yzsnstotz/hanamesh-server-chain",
9
- "providerCommit": "11569ecfa34a47e08be872978b018887abc97dae",
10
- "providerVersion": "0.39.5",
9
+ "providerCommit": "160756b5324d3fe59d5a65837f426fd9fcdfca6b",
10
+ "providerVersion": "0.39.6",
11
11
  "providerDeclarationsSHA256": "b6adb917f1644c85df7514ea516f29301fae1306d2b94dd4c21a0e16dadbcda1",
12
12
  "gasHandling": {
13
13
  "project": "Uniswap/interface",
@@ -15,6 +15,6 @@
15
15
  "commit": "e9148b30c9aff44613003b83daacc83d24b157f0",
16
16
  "source": "src/utils/calculateGasMargin.ts",
17
17
  "walletFlow": "src/hooks/useSwapCallback.ts",
18
- "adopted": "single viem estimateContractGas then fixed20% gas margin; user wallet sends"
18
+ "adopted": "single eth_estimateGas on latest block with blockOverrides time=latest+1, then fixed20% gas margin; user wallet sends"
19
19
  }
20
20
  }
@@ -48,7 +48,7 @@ export interface QuoteV2BondFact extends QuoteV2Fact{hanaId:Hex;token:Address;bo
48
48
  export interface QuoteV2MigrationEvent{eventName:'BondClosed'|'MigrationDeferred'|'Migrated';args:Readonly<Record<string,string|number|boolean>>;blockNumber:string;blockHash:Hex;transactionHash:Hex;logIndex:number}
49
49
  export interface QuoteV2BuyQuote extends QuoteV2Fact{hanaId:Hex;bond:Address;quote:Address;kind:'exact'|'budget';hana:string;principal:string;hanaFee:string;meshFee:string;total:string;nativePaymentAvailable:boolean}
50
50
  export interface QuoteV2SellQuote extends QuoteV2Fact{hanaId:Hex;bond:Address;quote:Address;account:Address;amount:string;principal:string;hanaFee:string;meshFee:string;receive:string;sellable:string;nativeProceeds:boolean}
51
- export interface QuoteV2Reader{readonly deployment:QuoteV2Deployment;readonly mode:'test-only'|'production';readonly evidence:'FIXTURE'|'READ_ONLY_RPC';readReleaseState(input:QuoteV2ReleaseStateQuery):Promise<QuoteV2ReleaseStateFact>;readReleaseStart(input:{hanaId:Hex}):Promise<QuoteV2ReleaseStartFact>;quoteBuy(input:{hanaId:Hex;kind:'exact'|'budget';amount:bigint}):Promise<QuoteV2BuyQuote>;quoteSell(input:{hanaId:Hex;amount:bigint;account:Address}):Promise<QuoteV2SellQuote>;verifyDeployment():Promise<QuoteV2Fact&{deployment:QuoteV2Deployment}>;readQuoteConfig(input:{quote:Address}):Promise<QuoteV2Fact&{quote:Address;virtualQuote:string;enabled:boolean}>;readIssuance(input:{hanaId:Hex}):Promise<QuoteV2IssuanceFact>;readReserveHistory(input:{hanaKey:Hex;bucket:0|1;limit:number;scanBlockSpan:number;cursor?:string}):Promise<QuoteV2ReserveHistoryPage>;readReserveProposal(input:{proposalId:Hex}):Promise<QuoteV2ReserveProposalFact>;readIssuedAt(input:{hanaKey:Hex;scanBlockSpan:number}):Promise<QuoteV2IssuedAtFact>;listQuotes(input:{scanBlockSpan:number}):Promise<QuoteV2QuoteList>;readMarketFacts(input:{hanaKey:Hex;anchor?:QuoteV2MarketAnchor}):Promise<QuoteV2MarketFacts>;listIssuedHanaKeys(input:{limit:number;scanBlockSpan:number;cursor?:string;anchor?:QuoteV2MarketAnchor}):Promise<QuoteV2IssuedHanaKeysPage>;readHoldersAllocation(input:QuoteV2MarketPageQuery):Promise<QuoteV2HoldersPage>;readTimeline(input:QuoteV2MarketPageQuery):Promise<QuoteV2TimelinePage>;readMarketHistory(input:QuoteV2MarketHistoryQuery):Promise<QuoteV2MarketHistoryPage>;readBond(input:{hanaId:Hex;account:Address}):Promise<QuoteV2BondFact>;readMigrationEvents(input:{hanaId:Hex}):Promise<QuoteV2Fact&{hanaId:Hex;bond:Address;events:readonly QuoteV2MigrationEvent[]}>}
51
+ export interface QuoteV2Reader{readonly deployment:QuoteV2Deployment;readonly mode:'test-only'|'production';readonly evidence:'FIXTURE'|'READ_ONLY_RPC';readReleaseState(input:QuoteV2ReleaseStateQuery):Promise<QuoteV2ReleaseStateFact>;readReleaseStart(input:{hanaId:Hex}):Promise<QuoteV2ReleaseStartFact>;quoteBuy(input:{hanaId:Hex;kind:'exact'|'budget';amount:bigint}):Promise<QuoteV2BuyQuote>;quoteSell(input:{hanaId:Hex;amount:bigint;account:Address}):Promise<QuoteV2SellQuote>;verifyDeployment():Promise<QuoteV2Fact&{deployment:QuoteV2Deployment}>;readQuoteConfig(input:{quote:Address}):Promise<QuoteV2Fact&{quote:Address;virtualQuote:string;enabled:boolean}>;readIssuance(input:{hanaId:Hex}):Promise<QuoteV2IssuanceFact>;readReserveHistory(input:{hanaKey:Hex;bucket:0|1;limit:number;scanBlockSpan:number;cursor?:string}):Promise<QuoteV2ReserveHistoryPage>;readReserveProposal(input:{proposalId:Hex}):Promise<QuoteV2ReserveProposalFact>;readIssuedAt(input:{hanaKey:Hex;scanBlockSpan:number}):Promise<QuoteV2IssuedAtFact>;listQuotes(input:{scanBlockSpan:number}):Promise<QuoteV2QuoteList>;readMarketBalances(input:{hanaKeys:readonly Hex[];account:Address;anchor:QuoteV2MarketAnchor}):Promise<QuoteV2MarketBalances>;readMarketFacts(input:{hanaKey:Hex;anchor?:QuoteV2MarketAnchor}):Promise<QuoteV2MarketFacts>;listIssuedHanaKeys(input:{limit:number;scanBlockSpan:number;cursor?:string;anchor?:QuoteV2MarketAnchor}):Promise<QuoteV2IssuedHanaKeysPage>;readHoldersAllocation(input:QuoteV2MarketPageQuery):Promise<QuoteV2HoldersPage>;readTimeline(input:QuoteV2MarketPageQuery):Promise<QuoteV2TimelinePage>;readMarketHistory(input:QuoteV2MarketHistoryQuery):Promise<QuoteV2MarketHistoryPage>;readBond(input:{hanaId:Hex;account:Address}):Promise<QuoteV2BondFact>;readMigrationEvents(input:{hanaId:Hex}):Promise<QuoteV2Fact&{hanaId:Hex;bond:Address;events:readonly QuoteV2MigrationEvent[]}>}
52
52
  /** One canonical Launcher ReserveWithdrawn event; amounts are decimal strings. */
53
53
  export interface QuoteV2ReserveRecord{readonly proposalId:Hex;readonly expectedRemaining:string;readonly bucket:0|1;readonly to:Address;readonly token:Address;readonly amount:string;readonly remaining:string;readonly transactionHash:Hex;readonly transactionIndex:number;readonly logIndex:number;readonly blockNumber:string;readonly blockHash:Hex;readonly blockTimestamp:string}
54
54
  /** Same-block reserveState counters plus one page of the selected bucket; every page of a cursor chain has the same asOf block. */
@@ -92,7 +92,7 @@ export interface QuoteV2MarketHistoryPage extends QuoteV2MarketFact{readonly sch
92
92
  readonly phaseBoundary:{readonly migratedAt:string;readonly event:QuoteV2CanonicalEvent;readonly tailState:QuoteV2HistoryState;readonly initialPoolState:QuoteV2HistoryState;readonly initialPoolSync:QuoteV2CanonicalEvent;readonly initialPoolMint:QuoteV2CanonicalEvent}|null}
93
93
  /** Registry market publicFailure: QuoteV2Error only; generic message; null for any other error. */
94
94
  export declare function publicQuoteV2ReadError(error:unknown):{readonly statusCode:400|404|503;readonly code:string;readonly message:string;readonly need:{readonly action:string}}|null;
95
- export declare function createQuoteV2Reader(options:{deployment:QuoteV2Deployment;publicClient:Pick<PublicClient,'getChainId'|'getBlock'|'getCode'|'readContract'|'getLogs'|'getTransaction'>;confirmations:number;fromBlock:bigint;mode:'test-only'|'production'}):Promise<QuoteV2Reader>;
95
+ export declare function createQuoteV2Reader(options:{deployment:QuoteV2Deployment;publicClient:Pick<PublicClient,'getChainId'|'getBlock'|'getCode'|'readContract'|'getLogs'|'getTransaction'|'multicall'>;confirmations:number;fromBlock:bigint;mode:'test-only'|'production'}):Promise<QuoteV2Reader>;
96
96
 
97
97
  /** Fixed20% gas margin from Uniswap/interface v4.0.0 calculateGasMargin. */
98
98
  export declare function calculateQuoteV2GasMargin(estimate:bigint):bigint;
@@ -133,3 +133,6 @@ export interface QuoteV2ReleasePorts {
133
133
  readonly releaseStartFacts:{readonly protocol:'custody-release-start-v1';readonly deploymentProtocol:'release-quote-v2';readonly evidence:'FIXTURE'|'TRUSTED';readReleaseStart(input:{hanaId:string;campaignId:string;asOf:string}):Promise<QuoteV2CustodyStartFact>};
134
134
  }
135
135
  export declare function createQuoteV2ReleasePorts(options:{reader:QuoteV2Reader;hanaKey:(hanaId:string)=>Hex;now?:()=>Date}):QuoteV2ReleasePorts;
136
+
137
+ /** Exact ERC20 balances over the supplied Issued keys, read by multicall at one explicit anchor. */
138
+ export interface QuoteV2MarketBalances extends QuoteV2MarketFact {readonly account:Address;readonly records:readonly {readonly hanaKey:Hex;readonly token:Address;readonly balance:string}[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanamesh/api-contracts",
3
- "version": "0.22.4",
3
+ "version": "0.22.7",
4
4
  "description": "Consumed quote-v2 provider declarations and exact current contract artifacts.",
5
5
  "type": "module",
6
6
  "license": "MIT",