You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tests :; forge clean && forge test --mt test --optimize --optimizer-runs 1000000 -v # --ffi # enable if you need the `ffi` cheat code on HEVM
19
19
test-with-gas-report :; forge clean && forge build && forge test --mt test --optimize --optimizer-runs 1000000 -v --gas-report # --ffi # enable if you need the `ffi` cheat code on HEVM
20
+
test-unit :; forge clean && forge test --no-match-test invariant --optimize --optimizer-runs 1000000 -v # --ffi # enable if you need the `ffi` cheat code on HEVM
Copy file name to clipboardExpand all lines: src/grants/interfaces/IGrantFundActions.sol
+9-10Lines changed: 9 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -68,8 +68,7 @@ interface IGrantFundActions is IGrantFundState {
68
68
* @param targets_ The addresses of the contracts to call.
69
69
* @param values_ The amounts of ETH to send to each target.
70
70
* @param calldatas_ The calldata to send to each target.
71
-
* @param descriptionHash_ The hash of the proposal's description string. Generated by `abi.encode(DESCRIPTION_PREFIX_HASH, keccak256(bytes(description_))`.
72
-
* The `DESCRIPTION_PREFIX_HASH` is unique for each funding mechanism: `keccak256(bytes("Standard Funding: "))` for standard funding
71
+
* @param descriptionHash_ The hash of the proposal's description string. Generated by `keccak256(bytes(description_))` or by calling `getDescriptionHash`.
73
72
* @return proposalId_ The hashed proposalId created from the provided params.
74
73
*/
75
74
function hashProposal(
@@ -81,7 +80,7 @@ interface IGrantFundActions is IGrantFundState {
81
80
82
81
/**
83
82
* @notice Submit a new proposal to the Grant Coordination Fund Standard Funding mechanism.
84
-
* @dev All proposals can be submitted by anyone. There can only be one value in each array. Interface is compliant with OZ.propose().
83
+
* @dev Proposals can be submitted by anyone. Interface is compliant with OZ.propose().
85
84
* @param targets_ List of contracts the proposal calldata will interact with. Should be the Ajna token contract for all proposals.
86
85
* @param values_ List of values to be sent with the proposal calldata. Should be 0 for all proposals.
87
86
* @param calldatas_ List of calldata to be executed. Should be the transfer() method.
@@ -97,7 +96,7 @@ interface IGrantFundActions is IGrantFundState {
97
96
98
97
/**
99
98
* @notice Find the status of a given proposal.
100
-
* @dev Check proposal status based upon Grant Fund specific logic.
99
+
* @dev Proposal status depends on the stage of the distribution period in which it was submitted, and vote counts on the proposal.
101
100
* @param proposalId_ The id of the proposal to query the status of.
102
101
* @return ProposalState of the given proposal.
103
102
*/
@@ -106,7 +105,7 @@ interface IGrantFundActions is IGrantFundState {
106
105
) externalviewreturns (ProposalState);
107
106
108
107
/**
109
-
* @notice Check if a slate of proposals meets requirements, and maximizes votes. If so, update DistributionPeriod.
108
+
* @notice Check if a slate of proposals meets requirements, and maximizes votes. If so, set the provided proposal slate as the new top slate of proposals.
110
109
* @param proposalIds_ Array of proposal Ids to check.
111
110
* @param distributionId_ Id of the current distribution period.
112
111
* @return newTopSlate_ Boolean indicating whether the new proposal slate was set as the new top slate for distribution.
@@ -122,7 +121,7 @@ interface IGrantFundActions is IGrantFundState {
122
121
123
122
/**
124
123
* @notice Cast an array of funding votes in one transaction.
125
-
* @dev Calls out to StandardFunding._fundingVote().
124
+
* @dev Calls StandardFunding._fundingVote().
126
125
* @dev Only iterates through a maximum of 10 proposals that made it through the screening round.
127
126
* @dev Counters incremented in an unchecked block due to being bounded by array length.
128
127
* @param voteParams_ The array of votes on proposals to cast.
@@ -134,7 +133,7 @@ interface IGrantFundActions is IGrantFundState {
134
133
135
134
/**
136
135
* @notice Cast an array of screening votes in one transaction.
137
-
* @dev Calls out to StandardFunding._screeningVote().
136
+
* @dev Calls StandardFunding._screeningVote().
138
137
* @dev Counters incremented in an unchecked block due to being bounded by array length.
139
138
* @param voteParams_ The array of votes on proposals to cast.
140
139
* @return votesCast_ The total number of votes cast across all of the proposals.
@@ -167,9 +166,9 @@ interface IGrantFundActions is IGrantFundState {
167
166
168
167
/**
169
168
* @notice Calculate the description hash of a proposal.
170
-
* @dev The description hash is used as a unique identifier for a proposal. It is created by hashing the description string with a prefix.
169
+
* @dev The description hash is used as a unique identifier for a proposal. It is created by hashing the description string.
171
170
* @param description_ The proposal's description string.
172
-
* @return The hash of the proposal's prefix and description string.
171
+
* @return The hash of the proposal's description string.
173
172
*/
174
173
function getDescriptionHash(stringmemorydescription_) externalpurereturns (bytes32);
175
174
@@ -204,7 +203,7 @@ interface IGrantFundActions is IGrantFundState {
204
203
205
204
/**
206
205
* @notice Get the block number at which this distribution period's funding stage ends.
207
-
* @param startBlock_ The end block of a distribution period to get the funding stage end block for.
206
+
* @param startBlock_ The start block of a distribution period to get the funding stage end block for.
208
207
* @return The block number at which this distribution period's funding stage ends.
209
208
*/
210
209
function getFundingStageEndBlock(uint256startBlock_) externalpurereturns (uint256);
* @dev Ajna Token `ERC20` token interface, including the following functions:
17
+
* - `burnFrom()`
18
+
* @dev Used by the `BurnWrappedAjna` contract to burn Ajna tokens on wrapping.
19
+
*/
20
+
interfaceIERC20Token {
21
+
/**
22
+
* @notice Burns `amount` tokens from `account`, deducting from the caller's allowance and balance.
23
+
* @param account Account to burn tokens from.
24
+
* @param amount Amount of tokens to burn.
25
+
*/
26
+
function burnFrom(addressaccount, uint256amount) external;
27
+
}
28
+
29
+
30
+
/**
31
+
* @title BurnWrappedAjna Contract
32
+
* @notice Entrypoint of BurnWrappedAjna actions for Ajna token holders looking to migrate their tokens to a sidechain:
33
+
* - `TokenHolders`: Approve the BurnWrappedAjna contract to burn a specified amount of Ajna tokens, and call `depositFor()` to mint them a corresponding amount of bwAJNA tokens.
34
+
* @dev This contract is intended for usage in cases where users are attempting to migrate their Ajna to a sidechain that lacks a permissionless bridge.
35
+
* Usage of this contract protects holders from the risk of a compromised sidechain bridge.
36
+
* @dev Contract inherits from OpenZeppelin ERC20Burnable and ERC20Wrapper extensions.
37
+
* @dev Only mainnet Ajna token can be wrapped. Tokens that have been wrapped cannot be unwrapped, as they are burned on wrapping.
38
+
* @dev Holders must call `depositFor()` to wrap their tokens. Transferring Ajna tokens to the wrapper contract directly results in loss of tokens.
0 commit comments