Skip to content

Commit bd1d90f

Browse files
committed
fix: optimize Hash implementations and update tests for ExUnits class
- Optimize Hash.symbol implementations to use minimal hashing strategy: - BootstrapWitness: only hash publicKey (identifying field) - ExUnitPrices: only hash memPrice - ExUnits: only hash mem - PoolVotingThresholds: only hash t1 - DRepVotingThresholds: only hash t1 - Redeemer: only hash tag + index - All Hash implementations use Hash.cached() for performance - Fix computeTotalExUnits to use ExUnits class properties instead of tuple - Fix Redeemer creation in TxBuilderImpl to use ExUnits class constructor - Fix assetsToValue to build MultiAsset map correctly without using empty() - Update all test files to use ExUnits class properties (.mem, .steps) instead of tuple indexing - Update all test files to access MultiAsset via .map property - Remove @example blocks from core modules (ProtocolVersion, TSchema, PoolParams) - All 652 tests passing
1 parent ddb5bea commit bd1d90f

File tree

223 files changed

+7575
-6555
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

223 files changed

+7575
-6555
lines changed

packages/evolution/docs/examples/src-core-TSchema.ts-function-Struct-0.ts

Lines changed: 0 additions & 4 deletions
This file was deleted.

packages/evolution/docs/examples/src-core-TSchema.ts-function-Struct-1.ts

Lines changed: 0 additions & 5 deletions
This file was deleted.

packages/evolution/docs/examples/src-core-TSchema.ts-function-Struct-2.ts

Lines changed: 0 additions & 4 deletions
This file was deleted.

packages/evolution/docs/examples/src-core-TSchema.ts-function-Union-0.ts

Lines changed: 0 additions & 8 deletions
This file was deleted.

packages/evolution/docs/examples/src-core-TSchema.ts-function-Union-1.ts

Lines changed: 0 additions & 8 deletions
This file was deleted.

packages/evolution/docs/examples/src-core-TSchema.ts-function-Union-2.ts

Lines changed: 0 additions & 8 deletions
This file was deleted.

packages/evolution/docs/examples/src-sdk-PoolParams.ts-typealias-PoolParams-0.ts

Lines changed: 0 additions & 12 deletions
This file was deleted.

packages/evolution/docs/examples/src-utils-effect-runtime.ts-function-runEffect-0.ts

Lines changed: 0 additions & 12 deletions
This file was deleted.

packages/evolution/docs/examples/src-utils-effect-runtime.ts-function-runEffectPromise-0.ts

Lines changed: 0 additions & 14 deletions
This file was deleted.

packages/evolution/docs/modules/core/Address.ts.md

Lines changed: 37 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,20 @@ Added in v1.0.0
1818
- [fromBech32](#frombech32)
1919
- [Schema](#schema)
2020
- [Address (class)](#address-class)
21+
- [toJSON (method)](#tojson-method)
2122
- [toString (method)](#tostring-method)
22-
- [[Symbol.for("nodejs.util.inspect.custom")] (method)](#symbolfornodejsutilinspectcustom-method)
23+
- [[Inspectable.NodeInspectSymbol] (method)](#inspectablenodeinspectsymbol-method)
24+
- [[Equal.symbol] (method)](#equalsymbol-method)
25+
- [[Hash.symbol] (method)](#hashsymbol-method)
2326
- [Transformations](#transformations)
2427
- [FromBech32](#frombech32-1)
2528
- [FromBytes](#frombytes)
2629
- [FromHex](#fromhex)
2730
- [Utils](#utils)
28-
- [equals](#equals)
2931
- [getNetworkId](#getnetworkid)
3032
- [hasStakingCredential](#hasstakingcredential)
3133
- [isEnterprise](#isenterprise)
3234
- [utils](#utils-1)
33-
- [AddressError (class)](#addresserror-class)
34-
- [Either (namespace)](#either-namespace)
3535
- [fromBytes](#frombytes-1)
3636
- [fromHex](#fromhex-1)
3737
- [toBech32](#tobech32)
@@ -58,12 +58,12 @@ Added in v1.0.0
5858
5959
## fromBech32
6060
61-
Sync functions using Function module utilities
61+
Sync functions using Schema utilities
6262
6363
**Signature**
6464
6565
```ts
66-
export declare const fromBech32: (input: string) => Address
66+
export declare const fromBech32: (i: string, overrideOptions?: ParseOptions) => Address
6767
```
6868
6969
Added in v1.0.0
@@ -80,6 +80,14 @@ export declare class Address
8080

8181
Added in v1.0.0
8282

83+
### toJSON (method)
84+
85+
**Signature**
86+
87+
```ts
88+
toJSON()
89+
```
90+
8391
### toString (method)
8492

8593
**Signature**
@@ -88,12 +96,28 @@ Added in v1.0.0
8896
toString(): string
8997
```
9098

91-
### [Symbol.for("nodejs.util.inspect.custom")] (method)
99+
### [Inspectable.NodeInspectSymbol] (method)
100+
101+
**Signature**
102+
103+
```ts
104+
[Inspectable.NodeInspectSymbol](): unknown
105+
```
106+
107+
### [Equal.symbol] (method)
108+
109+
**Signature**
110+
111+
```ts
112+
[Equal.symbol](that: unknown): boolean
113+
```
114+
115+
### [Hash.symbol] (method)
92116

93117
**Signature**
94118

95119
```ts
96-
[Symbol.for("nodejs.util.inspect.custom")](): string
120+
[Hash.symbol](): number
97121
```
98122

99123
# Transformations
@@ -152,18 +176,6 @@ Added in v1.0.0
152176

153177
# Utils
154178

155-
## equals
156-
157-
Check if two AddressStructure instances are equal.
158-
159-
**Signature**
160-
161-
```ts
162-
export declare const equals: (a: Address, b: Address) => boolean
163-
```
164-
165-
Added in v1.0.0
166-
167179
## getNetworkId
168180

169181
Get network ID from AddressStructure
@@ -202,52 +214,42 @@ Added in v1.0.0
202214

203215
# utils
204216

205-
## AddressError (class)
206-
207-
**Signature**
208-
209-
```ts
210-
export declare class AddressError
211-
```
212-
213-
## Either (namespace)
214-
215217
## fromBytes
216218

217219
**Signature**
218220

219221
```ts
220-
export declare const fromBytes: (input: any) => Address
222+
export declare const fromBytes: (i: any, overrideOptions?: ParseOptions) => Address
221223
```
222224

223225
## fromHex
224226

225227
**Signature**
226228

227229
```ts
228-
export declare const fromHex: (input: string) => Address
230+
export declare const fromHex: (i: string, overrideOptions?: ParseOptions) => Address
229231
```
230232

231233
## toBech32
232234

233235
**Signature**
234236

235237
```ts
236-
export declare const toBech32: (input: Address) => string
238+
export declare const toBech32: (a: Address, overrideOptions?: ParseOptions) => string
237239
```
238240

239241
## toBytes
240242

241243
**Signature**
242244

243245
```ts
244-
export declare const toBytes: (input: Address) => any
246+
export declare const toBytes: (a: Address, overrideOptions?: ParseOptions) => any
245247
```
246248

247249
## toHex
248250

249251
**Signature**
250252

251253
```ts
252-
export declare const toHex: (input: Address) => string
254+
export declare const toHex: (a: Address, overrideOptions?: ParseOptions) => string
253255
```

0 commit comments

Comments
 (0)