Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update repo bug fix #23

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion 3.restricted-mint-multisig/imports/multisig.leo
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ program multisig.aleo {
mapping required_signatures: bool => u64;
mapping proposals: Proposal => u64;
mapping signers: address => bool;
mapping propmapping : Proposalsigner => bool;

struct Proposalsigner {
proposal: Proposal,
signer_address: address

}

struct Proposal {
program_address: address,
Expand Down Expand Up @@ -41,6 +48,13 @@ program multisig.aleo {

finalize sign(caller: address, proposal: Proposal) {
assert(Mapping::get(signers, caller));

let temp: Proposalsigner = Proposalsigner {
proposal: proposal,
signer_address: caller
};
assert(!Mapping::get_or_use(propmapping, temp,false));
Mapping::set(propmapping, temp, true);
let signatures: u64 = Mapping::get_or_use(proposals, proposal, 0u64);
Mapping::set(proposals, proposal, signatures + 1u64);
}
Expand Down Expand Up @@ -74,5 +88,5 @@ program multisig.aleo {
Mapping::set(required_signatures, true, new_required_signatures);
}

transition burn(ticket_: ticket) {}
transition burn(ticket_: ticket) {}
}