Skip to content

Commit 6661742

Browse files
committed
chore: update symbiotic-setup subnetwork ids
1 parent 569006b commit 6661742

1 file changed

Lines changed: 7 additions & 17 deletions

File tree

test/fork/symbiotic/symbiotic-setup.js

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -202,19 +202,6 @@ async function deployVault(vaultConfigurator, burnerRouterAddr, admin, operator)
202202
return { vault, vaultAddr, delegator, delegatorAddr, slasher, slasherAddr };
203203
}
204204

205-
/**
206-
* Calculates the subnetwork for a given network and identifier
207-
* subnetwork = address (20 bytes) || uint96 (12 bytes)
208-
* @see https://github.com/symbioticfi/core/blob/7cb06639c5cd656d1d212dafa2c270b5fde39306/src/contracts/libraries/Subnetwork.sol#L9
209-
*
210-
* @param {*} networkAddress
211-
* @param {*} identifier
212-
* @returns
213-
*/
214-
function getSubnetwork(networkAddress, identifier) {
215-
return ethers.solidityPacked(['address', 'uint96'], [networkAddress, identifier]);
216-
}
217-
218205
/**
219206
* Helper function to deploy and verify a DefaultStakerRewards contract
220207
*/
@@ -431,11 +418,14 @@ describe('Symbiotic Integration', function () {
431418
console.log('Middleware slasher set to:', this.middleware.address);
432419
});
433420

421+
/**
422+
* @see https://github.com/symbioticfi/core/blob/7cb06639c5cd656d1d212dafa2c270b5fde39306/src/contracts/libraries/Subnetwork.sol#L9
423+
*/
434424
it('get subnetwork 1 and 2', async function () {
435-
this.subnetwork1Id = 0;
436-
this.subnetwork2Id = 1;
437-
this.subnetwork1 = getSubnetwork(this.network.address, this.subnetwork1Id);
438-
this.subnetwork2 = getSubnetwork(this.network.address, this.subnetwork2Id);
425+
this.subnetwork1Id = 1;
426+
this.subnetwork2Id = 2;
427+
this.subnetwork1 = ethers.solidityPacked(['address', 'uint96'], [this.network.address, this.subnetwork1Id]);
428+
this.subnetwork2 = ethers.solidityPacked(['address', 'uint96'], [this.network.address, this.subnetwork2Id]);
439429
console.log('Subnetwork 1:', this.subnetwork1);
440430
console.log('Subnetwork 2:', this.subnetwork2);
441431
});

0 commit comments

Comments
 (0)