Skip to content
CCPEDIAby Unity Nodes
Discussions/App Development/Fetching Archive Contracts while Unit TestingForum ↗

Fetching Archive Contracts while Unit Testing

App Development4 posts234 views1 likesLast activity Feb 2022
GT
gtpaulose1OP
Feb 2022

Is there a way to fetch archived contracts in unit tests?

I wanted to assert that certain values had changed over the course of the test case, as well as assert the number of contracts created (including archived)

CO
cocreature
Feb 2022

Hi @gtpaulose1, unfortunately that’s not possible at the moment. You can only query for active contracts in Daml Script.

GT
gtpaulose1
Feb 2022

Okay thank you, i guess i will have to design my test case to add assertions in the middle as opposed at the end.

Out of curiosity, is this a feature on the roadmap?

CO
cocreature
Feb 2022

There is Expose transaction streams in Daml Script · Issue #12098 · digital-asset/daml · GitHub which by exposing transaction streams would also expose archived contracts but we don’t have a timeline for that atm.

← Back to Discussions