@@ -191,13 +191,8 @@ pub enum EntryFunctionCall {
191191 /// Public function for production triggering of epoch boundary.
192192 DiemGovernanceTriggerEpoch { } ,
193193
194- /// A signer of the multisig can propose a payment
195- /// Public entry function required for txs cli
196- DonorVoiceTxsProposeAdvanceTx {
194+ DonorVoiceTxsMaybeCloseReauth {
197195 multisig_address : AccountAddress ,
198- payee : AccountAddress ,
199- value : u64 ,
200- description : Vec < u8 > ,
201196 } ,
202197
203198 /// A donor can propose the liquidation of a Donor Voice account
@@ -206,13 +201,12 @@ pub enum EntryFunctionCall {
206201 multisig_address : AccountAddress ,
207202 } ,
208203
209- /// A signer of the multisig can propose a payment
210- /// Public entry function required for txs cli.
211204 DonorVoiceTxsProposePaymentTx {
212205 multisig_address : AccountAddress ,
213206 payee : AccountAddress ,
214207 value : u64 ,
215208 description : Vec < u8 > ,
209+ advance_unlocked : bool ,
216210 } ,
217211
218212 /// A donor of the program can propose a veto to a scheduled transaction
@@ -499,12 +493,9 @@ impl EntryFunctionCall {
499493 } => diem_governance_ol_vote ( proposal_id, should_pass) ,
500494 DiemGovernanceSmokeTriggerEpoch { } => diem_governance_smoke_trigger_epoch ( ) ,
501495 DiemGovernanceTriggerEpoch { } => diem_governance_trigger_epoch ( ) ,
502- DonorVoiceTxsProposeAdvanceTx {
503- multisig_address,
504- payee,
505- value,
506- description,
507- } => donor_voice_txs_propose_advance_tx ( multisig_address, payee, value, description) ,
496+ DonorVoiceTxsMaybeCloseReauth { multisig_address } => {
497+ donor_voice_txs_maybe_close_reauth ( multisig_address)
498+ }
508499 DonorVoiceTxsProposeLiquidateTx { multisig_address } => {
509500 donor_voice_txs_propose_liquidate_tx ( multisig_address)
510501 }
@@ -513,7 +504,14 @@ impl EntryFunctionCall {
513504 payee,
514505 value,
515506 description,
516- } => donor_voice_txs_propose_payment_tx ( multisig_address, payee, value, description) ,
507+ advance_unlocked,
508+ } => donor_voice_txs_propose_payment_tx (
509+ multisig_address,
510+ payee,
511+ value,
512+ description,
513+ advance_unlocked,
514+ ) ,
517515 DonorVoiceTxsProposeVetoTx {
518516 multisig_address,
519517 tx_id,
@@ -998,14 +996,7 @@ pub fn diem_governance_trigger_epoch() -> TransactionPayload {
998996 ) )
999997}
1000998
1001- /// A signer of the multisig can propose a payment
1002- /// Public entry function required for txs cli
1003- pub fn donor_voice_txs_propose_advance_tx (
1004- multisig_address : AccountAddress ,
1005- payee : AccountAddress ,
1006- value : u64 ,
1007- description : Vec < u8 > ,
1008- ) -> TransactionPayload {
999+ pub fn donor_voice_txs_maybe_close_reauth ( multisig_address : AccountAddress ) -> TransactionPayload {
10091000 TransactionPayload :: EntryFunction ( EntryFunction :: new (
10101001 ModuleId :: new (
10111002 AccountAddress :: new ( [
@@ -1014,14 +1005,9 @@ pub fn donor_voice_txs_propose_advance_tx(
10141005 ] ) ,
10151006 ident_str ! ( "donor_voice_txs" ) . to_owned ( ) ,
10161007 ) ,
1017- ident_str ! ( "propose_advance_tx " ) . to_owned ( ) ,
1008+ ident_str ! ( "maybe_close_reauth " ) . to_owned ( ) ,
10181009 vec ! [ ] ,
1019- vec ! [
1020- bcs:: to_bytes( & multisig_address) . unwrap( ) ,
1021- bcs:: to_bytes( & payee) . unwrap( ) ,
1022- bcs:: to_bytes( & value) . unwrap( ) ,
1023- bcs:: to_bytes( & description) . unwrap( ) ,
1024- ] ,
1010+ vec ! [ bcs:: to_bytes( & multisig_address) . unwrap( ) ] ,
10251011 ) )
10261012}
10271013
@@ -1044,13 +1030,12 @@ pub fn donor_voice_txs_propose_liquidate_tx(
10441030 ) )
10451031}
10461032
1047- /// A signer of the multisig can propose a payment
1048- /// Public entry function required for txs cli.
10491033pub fn donor_voice_txs_propose_payment_tx (
10501034 multisig_address : AccountAddress ,
10511035 payee : AccountAddress ,
10521036 value : u64 ,
10531037 description : Vec < u8 > ,
1038+ advance_unlocked : bool ,
10541039) -> TransactionPayload {
10551040 TransactionPayload :: EntryFunction ( EntryFunction :: new (
10561041 ModuleId :: new (
@@ -1067,6 +1052,7 @@ pub fn donor_voice_txs_propose_payment_tx(
10671052 bcs:: to_bytes( & payee) . unwrap( ) ,
10681053 bcs:: to_bytes( & value) . unwrap( ) ,
10691054 bcs:: to_bytes( & description) . unwrap( ) ,
1055+ bcs:: to_bytes( & advance_unlocked) . unwrap( ) ,
10701056 ] ,
10711057 ) )
10721058}
@@ -1845,15 +1831,12 @@ mod decoder {
18451831 }
18461832 }
18471833
1848- pub fn donor_voice_txs_propose_advance_tx (
1834+ pub fn donor_voice_txs_maybe_close_reauth (
18491835 payload : & TransactionPayload ,
18501836 ) -> Option < EntryFunctionCall > {
18511837 if let TransactionPayload :: EntryFunction ( script) = payload {
1852- Some ( EntryFunctionCall :: DonorVoiceTxsProposeAdvanceTx {
1838+ Some ( EntryFunctionCall :: DonorVoiceTxsMaybeCloseReauth {
18531839 multisig_address : bcs:: from_bytes ( script. args ( ) . first ( ) ?) . ok ( ) ?,
1854- payee : bcs:: from_bytes ( script. args ( ) . get ( 1 ) ?) . ok ( ) ?,
1855- value : bcs:: from_bytes ( script. args ( ) . get ( 2 ) ?) . ok ( ) ?,
1856- description : bcs:: from_bytes ( script. args ( ) . get ( 3 ) ?) . ok ( ) ?,
18571840 } )
18581841 } else {
18591842 None
@@ -1881,6 +1864,7 @@ mod decoder {
18811864 payee : bcs:: from_bytes ( script. args ( ) . get ( 1 ) ?) . ok ( ) ?,
18821865 value : bcs:: from_bytes ( script. args ( ) . get ( 2 ) ?) . ok ( ) ?,
18831866 description : bcs:: from_bytes ( script. args ( ) . get ( 3 ) ?) . ok ( ) ?,
1867+ advance_unlocked : bcs:: from_bytes ( script. args ( ) . get ( 4 ) ?) . ok ( ) ?,
18841868 } )
18851869 } else {
18861870 None
@@ -2291,8 +2275,8 @@ static SCRIPT_FUNCTION_DECODER_MAP: once_cell::sync::Lazy<EntryFunctionDecoderMa
22912275 Box :: new ( decoder:: diem_governance_trigger_epoch) ,
22922276 ) ;
22932277 map. insert (
2294- "donor_voice_txs_propose_advance_tx " . to_string ( ) ,
2295- Box :: new ( decoder:: donor_voice_txs_propose_advance_tx ) ,
2278+ "donor_voice_txs_maybe_close_reauth " . to_string ( ) ,
2279+ Box :: new ( decoder:: donor_voice_txs_maybe_close_reauth ) ,
22962280 ) ;
22972281 map. insert (
22982282 "donor_voice_txs_propose_liquidate_tx" . to_string ( ) ,
0 commit comments