Skip to content

Commit

Permalink
steps
Browse files Browse the repository at this point in the history
  • Loading branch information
ahangsu committed Aug 24, 2023
1 parent 1176d6e commit 98c9d64
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions features/integration/simulate.feature
Original file line number Diff line number Diff line change
Expand Up @@ -209,19 +209,21 @@ Feature: Simulating transactions
@simulate.exec_trace_with_state_change_and_hash
Scenario: Simulate app with response containing state changes and hash of executed byte code
Given a new AtomicTransactionComposer
When I build an application transaction with the transient account, the current application, suggested params, operation "create", approval-program "programs/state-changes.teal", clear-program "programs/eight.teal", global-bytes 0, global-ints 0, local-bytes 0, local-ints 0, app-args "", foreign-apps "", foreign-assets "", app-accounts "", extra-pages 0, boxes ""
When I build an application transaction with the transient account, the current application, suggested params, operation "create", approval-program "programs/state-changes.teal", clear-program "programs/eight.teal", global-bytes 1, global-ints 1, local-bytes 1, local-ints 1, app-args "", foreign-apps "", foreign-assets "", app-accounts "", extra-pages 0, boxes ""
And I sign and submit the transaction, saving the txid. If there is an error it is "".
And I wait for the transaction to be confirmed.
Given I remember the new application ID.

Given I add the nonce "simulate-with-exec-trace-state-changes"
When I make a new simulate request.
When I create the Method object from method signature "local()void"
When I create the Method object from method signature "global()void"
* I create a new method arguments array.
* I add a nonced method call with the transient account, the current application, suggested params, on complete "noop", current transaction signer, current method arguments.

Then I allow exec trace options "stack,scratch" on that simulate request.
Then I allow exec trace options "state" on that simulate request.
Then I simulate the transaction group with the simulate request.
And the simulation should succeed without any failure message

# TODO
Then "approval" hash at txn-groups path "0" should be "4NiVKyKI3huK1nHi/etuy5rbgnP1ODRaN77WF2swNNY=".
Then 13th unit in the "approval" trace at txn-groups path "0" should write to "global" state "global-int-key" with new value "uint64:3735928559".
Then 16th unit in the "approval" trace at txn-groups path "0" should write to "global" state "global-bytes-key" with new value "bytes:d2VsdCBhbSBkcmFodA==".

0 comments on commit 98c9d64

Please sign in to comment.