Skip to content

Commit b920f14

Browse files
committed
test: add transfer ownership vault and set new recipients
1 parent e130313 commit b920f14

File tree

3 files changed

+250
-109
lines changed

3 files changed

+250
-109
lines changed

packages/client/src/actions/vaults.ts

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ export function vaultPreviewMint(
191191
*
192192
* ```ts
193193
* const result = await vaultPreviewWithdraw(client, {
194-
* vault: evmAddress('0x1234567890abcdef1234567890abcdef12345678'),
194+
* vault: evmAddress('0x1234…'),
195195
* chainId: chainId(1),
196196
* amount: bigDecimal('750'),
197197
* });
@@ -220,7 +220,7 @@ export function vaultPreviewWithdraw(
220220
*
221221
* ```ts
222222
* const result = await vaultPreviewRedeem(client, {
223-
* vault: evmAddress('0x1234567890abcdef1234567890abcdef12345678'),
223+
* vault: evmAddress('0x1234…'),
224224
* chainId: chainId(1),
225225
* amount: bigDecimal('200'),
226226
* });
@@ -249,9 +249,9 @@ export function vaultPreviewRedeem(
249249
*
250250
* ```ts
251251
* const result = await vaultUserTransactionHistory(client, {
252-
* vault: evmAddress('0x1234567890abcdef1234567890abcdef12345678'),
252+
* vault: evmAddress('0x1234…'),
253253
* chainId: chainId(1),
254-
* user: evmAddress('0x5678901234567890abcdef1234567890abcdef12'),
254+
* user: evmAddress('0x5678…'),
255255
* });
256256
*
257257
* if (result.isOk()) {
@@ -284,9 +284,9 @@ export function vaultUserTransactionHistory(
284284
*
285285
* ```ts
286286
* const result = await vaultUserActivity(client, {
287-
* vault: evmAddress('0x1234567890abcdef1234567890abcdef12345678'),
287+
* vault: evmAddress('0x1234…'),
288288
* chainId: chainId(1),
289-
* user: evmAddress('0x5678901234567890abcdef1234567890abcdef12'),
289+
* user: evmAddress('0x5678…'),
290290
* });
291291
*
292292
* if (result.isOk()) {
@@ -318,9 +318,9 @@ export function vaultUserActivity(
318318
*
319319
* ```ts
320320
* const result = await vaultTransferOwnership(client, {
321-
* vault: evmAddress('0x1234567890abcdef1234567890abcdef12345678'),
321+
* vault: evmAddress('0x1234…'),
322322
* chainId: chainId(1),
323-
* newOwner: evmAddress('0x5678901234567890abcdef1234567890abcdef12'),
323+
* newOwner: evmAddress('0x5678…'),
324324
* }).andThen(sendWith(wallet)).andThen(client.waitForTransaction);
325325
* ```
326326
*
@@ -342,15 +342,21 @@ export function vaultTransferOwnership(
342342
*
343343
* ```ts
344344
* const result = await vaultCreateRecipientsConfiguration(client, {
345-
* vault: evmAddress('0x1234567890abcdef1234567890abcdef12345678'),
345+
* vault: evmAddress('0x1234…'),
346346
* chainId: chainId(1),
347347
* recipients: [
348348
* {
349-
* address: evmAddress('0x5678901234567890abcdef1234567890abcdef12'),
349+
* address: evmAddress('0x5678…'),
350+
* percent: bigDecimal('5000'), // 50%
351+
* },
352+
* {
353+
* address: evmAddress('0x9abc…'),
350354
* percent: bigDecimal('5000'), // 50%
351355
* },
352356
* ],
353-
* }).andThen(sendWith(wallet)).andThen(client.waitForTransaction);
357+
* })
358+
* .andThen(sendWith(wallet))
359+
* .andThen(client.waitForTransaction);
354360
* ```
355361
*
356362
* @param client - Aave client.
@@ -403,7 +409,9 @@ export function vaultRecipientConfiguration(
403409
* vault: evmAddress('0x1234567890abcdef1234567890abcdef12345678'),
404410
* chainId: chainId(1),
405411
* configuration: evmAddress('0x5678901234567890abcdef1234567890abcdef12'),
406-
* }).andThen(sendWith(wallet)).andThen(client.waitForTransaction);
412+
* })
413+
* .andThen(sendWith(wallet))
414+
* .andThen(client.waitForTransaction);
407415
* ```
408416
*
409417
* @param client - Aave client.

packages/spec/vaults/__snapshots__/vaults.spec.ts.snap

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,3 +267,44 @@ exports[`Given the Aave Vaults > And a deployed organization vault > When the us
267267
},
268268
}
269269
`;
270+
271+
exports[`Given the Aave Vaults > When an organization deploys a new vault > Then it should set recipients to be 50% organization recipients/50% aave 1`] = `
272+
[
273+
{
274+
"__typename": "VaultFeesRecipientSplit",
275+
"address": "0x18aed7dd156D23a46Ad4670b3d4776fb2B198731",
276+
"isAaveLabs": false,
277+
"split": {
278+
"__typename": "PercentValue",
279+
"decimals": 4,
280+
"formatted": "25.00",
281+
"raw": "2500",
282+
"value": "0.25",
283+
},
284+
},
285+
{
286+
"__typename": "VaultFeesRecipientSplit",
287+
"address": "0x1234567890123456789012345678901234567890",
288+
"isAaveLabs": false,
289+
"split": {
290+
"__typename": "PercentValue",
291+
"decimals": 4,
292+
"formatted": "25.00",
293+
"raw": "2500",
294+
"value": "0.25",
295+
},
296+
},
297+
{
298+
"__typename": "VaultFeesRecipientSplit",
299+
"address": "0xbA3Fa06E181D4a64B07D0ed0e8369811F0aD44BA",
300+
"isAaveLabs": true,
301+
"split": {
302+
"__typename": "PercentValue",
303+
"decimals": 4,
304+
"formatted": "50.00",
305+
"raw": "5000",
306+
"value": "0.50",
307+
},
308+
},
309+
]
310+
`;

0 commit comments

Comments
 (0)