File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -147,13 +147,18 @@ pub struct StreamMetadata {
147147
148148#[ contracttype]
149149#[ derive( Clone , Debug ) ]
150+ /// Parameters required to initialize and start a stream.
150151pub struct CreateStreamParams {
152+ /// Unique identifier for the stream recipient.
151153 pub recipient : Address ,
152154 pub token : Address ,
155+ /// Total amount of tokens allocated for the stream duration.
153156 pub total_amount : i128 ,
157+ /// Unix timestamp marking when token streaming begins.
154158 pub start_time : u64 ,
155159 pub end_time : u64 ,
156160 pub cliff_time : u64 ,
161+ /// Amount of tokens unlocked immediately at start_time.
157162 pub cliff_amount : i128 ,
158163}
159164
@@ -281,8 +286,6 @@ pub struct UnpauseEvent {
281286 pub timestamp : u64 ,
282287}
283288
284-
285-
286289// ─── Contract ────────────────────────────────────────────────────────────────
287290
288291#[ contract]
@@ -358,7 +361,11 @@ impl StreamingContract {
358361 /// Upgrade the contract wasm. Only callable by the admin.
359362 pub fn upgrade ( env : Env , admin : Address , new_wasm_hash : BytesN < 32 > ) -> Result < ( ) , StreamError > {
360363 admin. require_auth ( ) ;
361- let stored_admin: Address = env. storage ( ) . instance ( ) . get ( & DataKey :: Admin ) . ok_or ( StreamError :: NotInitialized ) ?;
364+ let stored_admin: Address = env
365+ . storage ( )
366+ . instance ( )
367+ . get ( & DataKey :: Admin )
368+ . ok_or ( StreamError :: NotInitialized ) ?;
362369 if admin != stored_admin {
363370 return Err ( StreamError :: Unauthorized ) ;
364371 }
@@ -976,8 +983,6 @@ impl StreamingContract {
976983 Ok ( ( ) )
977984 }
978985
979-
980-
981986 // ── Read: Stream data ────────────────────────────────────────────────────
982987
983988 /// Get a stream by ID.
You can’t perform that action at this time.
0 commit comments