@@ -29,6 +29,7 @@ use super::parcel::{AssetTransferInput, AssetTransferOutput};
2929pub enum Transaction {
3030 #[ serde( rename_all = "camelCase" ) ]
3131 AssetMint {
32+ network_id : u64 ,
3233 metadata : String ,
3334 lock_script_hash : H256 ,
3435 parameters : Vec < Bytes > ,
@@ -101,16 +102,17 @@ impl Decodable for Transaction {
101102 fn decode ( d : & UntrustedRlp ) -> Result < Self , DecoderError > {
102103 match d. val_at ( 0 ) ? {
103104 ASSET_MINT_ID => {
104- if d. item_count ( ) ? != 7 {
105+ if d. item_count ( ) ? != 8 {
105106 return Err ( DecoderError :: RlpIncorrectListLen )
106107 }
107108 Ok ( Transaction :: AssetMint {
108- metadata : d. val_at ( 1 ) ?,
109- lock_script_hash : d. val_at ( 2 ) ?,
110- parameters : d. val_at ( 3 ) ?,
111- amount : d. val_at ( 4 ) ?,
112- registrar : d. val_at ( 5 ) ?,
113- nonce : d. val_at ( 6 ) ?,
109+ network_id : d. val_at ( 1 ) ?,
110+ metadata : d. val_at ( 2 ) ?,
111+ lock_script_hash : d. val_at ( 3 ) ?,
112+ parameters : d. val_at ( 4 ) ?,
113+ amount : d. val_at ( 5 ) ?,
114+ registrar : d. val_at ( 6 ) ?,
115+ nonce : d. val_at ( 7 ) ?,
114116 } )
115117 }
116118 ASSET_TRANSFER_ID => {
@@ -134,14 +136,16 @@ impl Encodable for Transaction {
134136 fn rlp_append ( & self , s : & mut RlpStream ) {
135137 match self {
136138 Transaction :: AssetMint {
139+ network_id,
137140 metadata,
138141 lock_script_hash,
139142 parameters,
140143 amount,
141144 registrar,
142145 nonce,
143- } => s. begin_list ( 7 )
146+ } => s. begin_list ( 8 )
144147 . append ( & ASSET_MINT_ID )
148+ . append ( network_id)
145149 . append ( metadata)
146150 . append ( lock_script_hash)
147151 . append ( parameters)
0 commit comments