Skip to content

Commit a2117d8

Browse files
committed
update readme
1 parent 50bc84f commit a2117d8

File tree

1 file changed

+11
-14
lines changed

1 file changed

+11
-14
lines changed

README.md

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,13 @@ budget, feature set, or sysvars. These configurations are stored directly
2323
on the test harness (the `Mollusk` struct), but can be manipulated through
2424
a handful of helpers.
2525

26-
Four main API methods are offered:
27-
28-
* `process_instruction`: Process an instruction and return the result.
29-
* `process_and_validate_instruction`: Process an instruction and perform a
30-
series of checks on the result, panicking if any checks fail.
31-
* `process_instruction_chain`: Process a chain of instructions and return
32-
the result.
33-
* `process_and_validate_instruction_chain`: Process a chain of instructions
34-
and perform a series of checks on each result, panicking if any checks
35-
fail.
26+
* [Single Instructions](#single-instructions)
27+
* [Instruction Chains](#instruction-chains)
28+
* [Stateful Testing with MolluskContext](#stateful-testing-with-molluskcontext)
29+
* [Benchmarking Compute Units](#benchmarking-compute-units)
30+
* [Fixtures](#fixtures)
31+
* [Generating Fixtures from Mollusk Tests](#generating-fixtures-from-mollusk-tests)
32+
* [Loading and Executing Fixtures](#loading-and-executing-fixtures)
3633

3734
## Single Instructions
3835

@@ -332,13 +329,13 @@ let result2 = context.process_instruction(&instruction2);
332329
The `MolluskContext` API provides the same core methods as `Mollusk`:
333330

334331
* `process_instruction`: Process an instruction with automatic account management
335-
* `process_instruction_chain`: Process a chain of instructions
332+
* `process_instruction_chain`: Process a chain of instructions
336333
* `process_and_validate_instruction`: Process and validate an instruction
337334
* `process_and_validate_instruction_chain`: Process and validate an instruction chain
338335

339-
All methods return `ContextResult` instead of `InstructionResult`, which omits
340-
the `resulting_accounts` field since accounts are managed by the context's
341-
account store.
336+
All methods return `InstructionResult`, just like the base `Mollusk` methods.
337+
The `resulting_accounts` field will reflect the final state after execution,
338+
and these accounts are automatically stored in the context's account store.
342339

343340
Note that `HashMap<Pubkey, Account>` implements `AccountStore` directly,
344341
so you can use it as a simple in-memory account store without needing

0 commit comments

Comments
 (0)