From 900406d0a372e3ba77aad1ef0b83f7d77a4091d5 Mon Sep 17 00:00:00 2001 From: uok825 Date: Wed, 15 Nov 2023 16:13:03 +0300 Subject: [PATCH] fix --- 3.restricted-mint-multisig/imports/multisig.leo | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/3.restricted-mint-multisig/imports/multisig.leo b/3.restricted-mint-multisig/imports/multisig.leo index 1652050..67eb9b3 100644 --- a/3.restricted-mint-multisig/imports/multisig.leo +++ b/3.restricted-mint-multisig/imports/multisig.leo @@ -5,6 +5,7 @@ program multisig.aleo { mapping required_signatures: bool => u64; mapping proposals: Proposal => u64; mapping signers: address => bool; + mapping signed_address: SignedProposal => bool; struct Proposal { program_address: address, @@ -12,6 +13,11 @@ program multisig.aleo { args_hash: field, } + struct SignedProposal { + proposal: Proposal, + signerAddress: address, + } + record ticket { owner: address, program_address: address, @@ -43,7 +49,9 @@ program multisig.aleo { assert(Mapping::get(signers, caller)); let signatures: u64 = Mapping::get_or_use(proposals, proposal, 0u64); Mapping::set(proposals, proposal, signatures + 1u64); - } + Mapping::get(signed_address, SignedProposal { proposal, signerAddress: caller }); + Mapping::set(signed_address, SignedProposal { proposal, signerAddress: caller }, true); + } transition add_signer(ticket_: ticket, new_signer: address) { assert_eq(