Skip to content

Commit

Permalink
Merge pull request #61 from allo-protocol/streamline-distribute-imple…
Browse files Browse the repository at this point in the history
…mentation

Streamline the distribute function
  • Loading branch information
0xKurt authored May 16, 2024
2 parents a76aa5b + f5d660c commit 8ff457e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ class DonationVotingMerkleDistributionStrategy {
// (uint256 _poolId, address[] memory _recipientIds, bytes memory _data)
data) {
this.checkPoolId();
const encodeDistribution = (0, viem_1.encodeAbiParameters)((0, viem_1.parseAbiParameters)("Distribution[]"), [data]);
const encodeDistribution = (0, viem_1.encodeAbiParameters)((0, viem_1.parseAbiParameters)("(uint256 index, address recipientId, uint256 amount, bytes32[] merkleProof)[]"), [data]);
const encodedData = (0, viem_1.encodeFunctionData)({
abi: allo_config_1.abi,
functionName: "distribute",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@allo-team/allo-v2-sdk",
"version": "1.0.71",
"version": "1.0.72",
"description": "sdk for allo v2",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,9 @@ export class DonationVotingMerkleDistributionStrategy {
this.checkPoolId();

const encodeDistribution = encodeAbiParameters(
parseAbiParameters("Distribution[]"),
parseAbiParameters(
"(uint256 index, address recipientId, uint256 amount, bytes32[] merkleProof)[]",
),
[data],
);

Expand Down

0 comments on commit 8ff457e

Please sign in to comment.