automateRotateRegistration
- This function can only be ran after a new user (or users) have been proposed to the vault.
After the proposed users pre-register, then everyone can run this function. preregistration.md
This endpoint needs to be hit by each user involved with a vault during the vaults registration phase. If all users are online when this function is hit by each user, the registration process will complete in ~10 seconds.
Arguments:
import { registerStep1, getVaults } from "@intuweb3/web-exp";
let myVaults = getVaults("0x12345_user_address", provider);
//whichever vault address you need to interact with in myvaults
//example, myVaults[0].vaultAddress;
await automateRotateRegistration(vaultAddress, signerAddress, signer, blockRange?, blockStart?);
//bonus: You can use it as follows to automatically register once all steps are complete
//
//
let ar = await automateRotateRegistration(vaultAddress, signer1)
.then(async (result) => {
await registerAllReshareSteps(vaultAddress, signer);
return true;
})
.catch((error) => {
console.log(error);
});
Input | Type | Description |
---|---|---|
vaultAddress | number | Address of the vault |
signer | Object | Signer object acquired from ethers or equivalent |
blockRange | number | Block range to traverse logs (default 250000) |
blockStart | number | Starting block number |