Assignment Update
Update an existing assignment submission
Course Student Assignment Update
Update an existing assignment submission with new information while keeping the same SLT hash commitment.
API Endpoint
POST /v2/tx/course/student/assignment/updateCost Summary
| Cost Type | Amount | Notes |
|---|---|---|
| Transaction Fee | ~0.27 ADA | Network fee |
| MinUTxO Delta | ~0.06 ADA | If datum grows |
| Protocol Fee | 0 ADA | No service fee |
| Total Wallet Delta | ~0.33 ADA | May vary with datum size |
The minUTxO increases when the datum grows (longer assignment_info string).
Request Body
{
"alias": "student_001",
"course_id": "e276a1f2729f06036299998f046765ffdde7ad8fd47f689690fbe2b1",
"slt_hash": "10dde6f0936b3dba3339356838e59b1af0f511a777a8701c49d941351b3abcf0",
"assignment_info": "updated assignment evidence hash"
}| Field | Type | Required | Description |
|---|---|---|---|
alias | string | Yes | Student's access token alias |
course_id | string | Yes | Course NFT policy ID (56 char hex) |
slt_hash | string | Yes | Module token name (must match current commitment) |
assignment_info | string | Yes | Updated evidence hash or description |
Transaction Pattern
Spend and Recreate - No minting. Consumes and recreates course state UTxO with updated datum.
┌─────────────────────────────────────────────────────────────────┐
│ ASSIGNMENT UPDATE TRANSACTION │
├─────────────────────────────────────────────────────────────────┤
│ │
│ INPUTS OUTPUTS │
│ ────── ─────── │
│ ┌─────────────────┐ ┌─────────────────┐ │
│ │ Course State │───────────▶│ Course State │ │
│ │ (current │ SPEND │ (UPDATED │ │
│ │ submission) │ │ submission) │ │
│ └─────────────────┘ └─────────────────┘ │
│ │
│ ┌─────────────────┐ ┌─────────────────┐ │
│ │ Wallet │───────────▶│ User Wallet │ │
│ │ (u-token + ADA) │ │ (u-token + │ │
│ └─────────────────┘ │ change) │ │
│ └─────────────────┘ │
│ NO MINTING │
│ │
│ REFERENCE INPUTS │
│ ──────────────── │
│ • global-state-v2 script ref │
│ • LocalStateToken (course validator) │
│ │
└─────────────────────────────────────────────────────────────────┘Inputs
| Input | Type | Validator | Description |
|---|---|---|---|
| Course State | Script | course-state-validator | Student's course state (spent) |
| Access Token | Wallet | - | Student's u-token |
| Wallet UTxOs | Wallet | - | ADA for fees |
Outputs
| Output | Validator | Value | Description |
|---|---|---|---|
| Course State | course-state-validator | ~1.50 ADA + token | Updated assignment info |
| User Wallet | wallet | u-token + change | Access token returned |
Datum Changes
Only the assignment_info field changes - the SLT hash and completed_modules remain the same:
Before:
Constructor 1:
├── slt_hash: "{module_token_name}"
├── assignment_info: "original info"
└── completed_modules: []After:
Constructor 1:
├── slt_hash: "{module_token_name}"
├── assignment_info: "updated assignment info"
└── completed_modules: []Redeemers
| Script | Constructor | Fields | Description |
|---|---|---|---|
| course-state-validator (spend) | 1 | slt_hash, assignment_info | Update action |
{
"constructor": 1,
"fields": [
{ "bytes": "<slt_hash>" },
{ "bytes": "<new_assignment_info>" }
]
}Note: The redeemer is a flat constructor 1 with two fields, NOT a nested structure.
Reference Inputs
| UTxO | Description |
|---|---|
| Script Ref | global-state-v2 script reference |
| LocalStateToken | Course's LocalStateToken (validator script_ref) |
Key Notes
- SLT hash is unchanged between input and output
- Datum stays as constructor 1 (active commitment state)
- MinUTxO increases when assignment_info grows (student pays the difference)
- No protocol fee for assignment updates
- Student must own the course state token being updated
See Also
- Assignment Commit - Initial enrollment and commitment
- Assignments Assess - Teacher assessment
- Credential Claim - Claim credential