Request options for the Build Create Contract Tx endpoint

Example

  • Minimal Simple Contract Close
 { "changeAddress" : "addr_test1qqe342swyfn75mp2anj45f8ythjyxg6m7pu0pznptl6f2d84kwuzrh8c83gzhrq5zcw7ytmqc863z5rhhwst3w4x87eq0td9ja",
"contract" : "close",
"tags" : {"ts-sdk.documentation.example" : {"infoA" : 5} },
"version" : "v1"
}
  • Simple Contract Close with Optional Fields
 { "changeAddress" : "addr_test1qqe342swyfn75mp2anj45f8ythjyxg6m7pu0pznptl6f2d84kwuzrh8c83gzhrq5zcw7ytmqc863z5rhhwst3w4x87eq0td9ja",
"usedAddresses": ["addr_test1qqe342swyfn75mp2anj45f8ythjyxg6m7pu0pznptl6f2d84kwuzrh8c83gzhrq5zcw7ytmqc863z5rhhwst3w4x87eq0td9ja"],
"collateralUTxOs": [],
"contract" : "close",
"tags" : {"ts-sdk.documentation.example" : {"infoA" : 5} },
"minimumLovelaceUTxODeposit" : 3000000,
"threadRoleName" : "ThreadRoleToken",
"version" : "v1"
}
  • Swap Contract Copy/Pasted from Playground with Role Token Configuration (NFT Open Role for Both)
 { "changeAddress" : "addr_test1qqe342swyfn75mp2anj45f8ythjyxg6m7pu0pznptl6f2d84kwuzrh8c83gzhrq5zcw7ytmqc863z5rhhwst3w4x87eq0td9ja",
"usedAddresses": ["addr_test1qqe342swyfn75mp2anj45f8ythjyxg6m7pu0pznptl6f2d84kwuzrh8c83gzhrq5zcw7ytmqc863z5rhhwst3w4x87eq0td9ja"],
"collateralUTxOs": [],
"contract" : {"when":[{"then":{"when":[{"then":{"token":{"token_name":"","currency_symbol":""},"to":{"party":{"role_token":"Dollar provider"}},"then":{"token":{"token_name":"dollar","currency_symbol":"85bb65"},"to":{"party":{"role_token":"Ada provider"}},"then":"close","pay":0,"from_account":{"role_token":"Dollar provider"}},"pay":{"times":0,"multiply":1000000},"from_account":{"role_token":"Ada provider"}},"case":{"party":{"role_token":"Dollar provider"},"of_token":{"token_name":"dollar","currency_symbol":"85bb65"},"into_account":{"role_token":"Dollar provider"},"deposits":0}}],"timeout_continuation":"close","timeout":1701773934770},"case":{"party":{"role_token":"Ada provider"},"of_token":{"token_name":"","currency_symbol":""},"into_account":{"role_token":"Ada provider"},"deposits":{"times":0,"multiply":1000000}}}],"timeout_continuation":"close","timeout":1701772134770},
"tags" : {"ts-sdk.documentation.example" : {"infoA" : 5} },
"roles" : {"Ada provider" : {"recipients": {"OpenRole" : 1} }
,"Dollar provider" : {"recipients": {"OpenRole" : 1} } },
"minimumLovelaceUTxODeposit" : 3000000,
"threadRoleName" : "ThreadRoleToken",
"version" : "v1"
}