@@ -38,19 +38,17 @@ sol! {
3838 // should coincide with signer
3939 address payer;
4040 // should coincide with indexer
41- address payee ;
41+ address recipient ;
4242 // data service that will initiate payment collection
4343 address service;
44- // initial indexing amount max
44+
45+ uint32 durationEpochs;
46+
4547 uint256 maxInitialAmount;
46- uint256 maxOngoingAmountPerEpoch;
47- // time to accept the agreement, intended to be on the order
48- // of hours or mins
49- uint64 deadline;
48+ uint256 minOngoingAmountPerEpoch;
49+
5050 uint32 maxEpochsPerCollection;
5151 uint32 minEpochsPerCollection;
52- // after which the agreement is complete
53- uint32 durationEpochs;
5452 bytes metadata;
5553 }
5654
@@ -152,10 +150,10 @@ impl SignedIndexingAgreementVoucher {
152150 return Err ( DipsError :: PayerNotAuthorised ( payer) ) ;
153151 }
154152
155- if !self . voucher . payee . eq ( expected_payee) {
153+ if !self . voucher . recipient . eq ( expected_payee) {
156154 return Err ( DipsError :: UnexpectedPayee {
157155 expected : * expected_payee,
158- actual : self . voucher . payee ,
156+ actual : self . voucher . recipient ,
159157 } ) ;
160158 }
161159
@@ -300,11 +298,10 @@ mod test {
300298
301299 let voucher = IndexingAgreementVoucher {
302300 payer : payer_addr,
303- payee : payee_addr,
301+ recipient : payee_addr,
304302 service : Address ( FixedBytes :: ZERO ) ,
305303 maxInitialAmount : U256 :: from ( 10000_u64 ) ,
306- maxOngoingAmountPerEpoch : U256 :: from ( 10000_u64 ) ,
307- deadline : 1000 ,
304+ minOngoingAmountPerEpoch : U256 :: from ( 10000_u64 ) ,
308305 maxEpochsPerCollection : 1000 ,
309306 minEpochsPerCollection : 1000 ,
310307 durationEpochs : 1000 ,
@@ -353,11 +350,10 @@ mod test {
353350
354351 let voucher = IndexingAgreementVoucher {
355352 payer : payer_addr,
356- payee : payee. address ( ) ,
353+ recipient : payee. address ( ) ,
357354 service : Address ( FixedBytes :: ZERO ) ,
358355 maxInitialAmount : U256 :: from ( 10000_u64 ) ,
359- maxOngoingAmountPerEpoch : U256 :: from ( 10000_u64 ) ,
360- deadline : 1000 ,
356+ minOngoingAmountPerEpoch : U256 :: from ( 10000_u64 ) ,
361357 maxEpochsPerCollection : 1000 ,
362358 minEpochsPerCollection : 1000 ,
363359 durationEpochs : 1000 ,
@@ -395,11 +391,10 @@ mod test {
395391
396392 let voucher = IndexingAgreementVoucher {
397393 payer : payer_addr,
398- payee : payee_addr,
394+ recipient : payee_addr,
399395 service : Address ( FixedBytes :: ZERO ) ,
400396 maxInitialAmount : U256 :: from ( 10000_u64 ) ,
401- maxOngoingAmountPerEpoch : U256 :: from ( 10000_u64 ) ,
402- deadline : 1000 ,
397+ minOngoingAmountPerEpoch : U256 :: from ( 10000_u64 ) ,
403398 maxEpochsPerCollection : 1000 ,
404399 minEpochsPerCollection : 1000 ,
405400 durationEpochs : 1000 ,
0 commit comments