Replies: 2 comments
-
It was done to avoid any potential confusion with the We could add "campaign" prefix on
So, are you suggesting something like this? struct EmitParameters {
string ipfsCID;
uint256 campaignTotalAmount,
uint256 campaignRecipientsCount
}
function createMerkleStreamerLL(
address initialAdmin,
ISablierV2LockupLinear lockupLinear,
IERC20 asset,
bytes32 merkleRoot,
uint40 expiration,
LockupLinear.Durations memory streamDurations,
bool cancelable,
EmitParameters memory emitParameters
) external
returns (ISablierV2MerkleStreamerLL merkleStreamerLL);
Good idea, we could do that. |
Beta Was this translation helpful? Give feedback.
-
@andreivladbrg answered this. Each stream's deposit amount is called Rather than adding a superfluous prefix to
Structs have bad UX for integrations (see: Tally integration on Telegram). I suggest avoiding structs unless they are necessary (which isn't the case here because there are no StackTooDeep issues).
sounds good - @andreivladbrg can you implement this change, please |
Beta Was this translation helpful? Give feedback.
-
Parameters for the factory
create
methodv2-periphery/src/SablierV2MerkleStreamerFactory.sol
Lines 50 to 51 in 89aa8bd
Question: Why is
campaignTotalAmount
prefixed withcampaign
whilerecipientsCount
isn't?Suggestion: Could we somehow bundle these parameters, either by prefixing them similarly or (better) by grouping them under an attributes struct? I'm mostly thinking of those that are meant to be emitted for indexing, so:
[CID, amount, recipients]
. Alternatively, simply removing the campaign prefix would also be much less verbose.Consistency in parameter order
v2-periphery/src/SablierV2MerkleStreamerFactory.sol
Lines 57 to 62 in 89aa8bd
I don't think it influences the salt in a bad way so could we maybe swap the order of
lockupLinear
andinitialAdmin
to mirror the one we use below for the new LL constructor?Beta Was this translation helpful? Give feedback.
All reactions