algorand / graviton

🧑‍🔬 verify your TEAL program by experiment and observation
MIT License
17 stars 8 forks source link

Update DryRun cost fields and expose DryRun accounts to users #31

Closed algoidurovic closed 1 year ago

algoidurovic commented 1 year ago

For certain use cases, it's necessary to set the balance of the app account to some nonzero value. One example is testing inner app calls. This PR allows the users to set balances for accounts and updates the existing dryrun cost field (which is now deprecated) and adds support for the new cost fields BudgetAdded and BudgetConsumed.

Testing: Unit tests.

tzaffi commented 1 year ago

Looks good. There are a number of minor suggestions that I don't feel strongly about. In particular of note:

  • a suggestion to remove a print statement
  • removal of Account() info from pre-existing test that doesn't need it
  • suggested assertion about the error message received in the case that app account for inner txn call wasn't funded

Also, I just realized that I still have the outstanding suggestion to create a new type alias DryRunAccountType = Union[str, Account]

tzaffi commented 1 year ago

Closing in favor of #33