Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: add auto restore functionality for contract client #991

Merged
merged 21 commits into from
Jun 14, 2024
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
8307a74
add auto restore functionality for contract client
BlaineHeffron May 28, 2024
56ccdd8
Update test/unit/server/soroban/assembled_transaction_test.js
BlaineHeffron May 29, 2024
5ba241a
Update test/unit/server/soroban/assembled_transaction_test.js
BlaineHeffron May 29, 2024
133051a
Update src/contract/assembled_transaction.ts
BlaineHeffron May 29, 2024
f5092b2
extract getAccount to utils
BlaineHeffron May 29, 2024
2dcfbaa
TSDoc format
BlaineHeffron May 29, 2024
986ee7c
make account optional for restoreFootprint
BlaineHeffron May 29, 2024
26a2648
remove bald booleans
BlaineHeffron May 29, 2024
ad02f9f
cleanup, remove updateTimeout workaround, dont rebuild sorobandata
BlaineHeffron Jun 5, 2024
2a2ce15
add changelog entry for auto restore functionality
BlaineHeffron Jun 5, 2024
0d096d1
remove comment
BlaineHeffron Jun 5, 2024
08ab269
remove unused var
BlaineHeffron Jun 5, 2024
e5db079
simpler wording
BlaineHeffron Jun 5, 2024
1dccd9b
fixed position of changelog entry
BlaineHeffron Jun 5, 2024
87ca94f
add space after `if` in src/contract/assembled_transaction.ts
chadoh Jun 13, 2024
319d577
add space after `if` in src/contract/assembled_transaction.ts
chadoh Jun 13, 2024
d009c0e
switch order of isSimulationRestore and `restore` check
chadoh Jun 13, 2024
ead51f5
add stub result when simulation returns blank
chadoh Jun 13, 2024
2654c10
add note about restoreTransaction arg
chadoh Jun 13, 2024
c96e8c6
fix missing check from merge with toXDR / fromXDR feature
BlaineHeffron Jun 14, 2024
1c761ef
fix empty scVal construction
BlaineHeffron Jun 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update src/contract/assembled_transaction.ts
Better auto restore failure message.

Co-authored-by: Chad Ostrowski <221614+chadoh@users.noreply.github.com>
  • Loading branch information
BlaineHeffron and chadoh committed Jun 13, 2024
commit 133051a7b6e68357d877417f30e83c9b8a61aafd
2 changes: 1 addition & 1 deletion src/contract/assembled_transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ export class AssembledTransaction<T> {
return this;
}
throw new AssembledTransaction.Errors.RestoreFailure(
`You need to restore some contract state before invoking this method. Automatic restore failed:\n${JSON.stringify(result)}`
`Automatic restore failed! You set 'restore: true' but the attempted restore did not work. Result:\n${JSON.stringify(result)}`
);
}

Expand Down