Skip to content

Commit

Permalink
contract code typos
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanwaits committed Dec 11, 2023
1 parent 5bd3c0e commit 0d1b903
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/hacks/build-a-decentralized-grants-program.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ The add-proposal function allows the core contract or an authorized extension to
(define-public (add-proposal (proposal <proposal-trait>) (data {start-block-height: uint, end-block-height: uint, proposer: principal, title: (string-ascii 50), description: (string-utf8 500)}))
(begin
(try! (is-dao-or-extension))
(asserts! (is-none (contract-call? .executor-dao executed-at proposal)) ERR_PROPOSAL_ALREADY_EXECUTED)
(asserts! (is-none (contract-call? .core executed-at proposal)) ERR_PROPOSAL_ALREADY_EXECUTED)
(print {event: "propose", proposal: proposal, proposer: tx-sender})
(ok (asserts! (map-insert proposals (contract-of proposal) (merge {votes-for: u0, votes-against: u0, concluded: false, passed: false} data)) ERR_PROPOSAL_ALREADY_EXISTS))
)
Expand Down Expand Up @@ -574,7 +574,7 @@ The `conclude` function allows the core contract or an authorized extension to c
(asserts! (>= block-height (get end-block-height proposal-data)) ERR_END_BLOCK_HEIGHT_NOT_REACHED)
(map-set proposals (contract-of proposal) (merge proposal-data {concluded: true, passed: passed}))
(print {event: "conclude", proposal: proposal, passed: passed})
(and passed (try! (contract-call? .executor-dao execute proposal tx-sender)))
(and passed (try! (contract-call? .core execute proposal tx-sender)))
(ok passed)
)
)
Expand Down

0 comments on commit 0d1b903

Please sign in to comment.