Events
All events emitted by VaultRegistrar and its base. Source: bc-vault-registrar/contracts/IVaultRegistrar.sol and BaseVaultRegistrar.sol.
VaultRegistered
event VaultRegistered(
address indexed investor,
address indexed vault,
address token,
string investorId,
address indexed sender
);
When emitted. At the end of a successful registerVault() call, after registry.addWallet(vault, investorId) has been executed.
Indexed fields
| Field | Use |
|---|---|
investor | Filter all registrations for one investor wallet |
vault | Look up the operator and investor for a known vault |
sender | The actual msg.sender of registerVault (== operator) — filter by which factory or gateway did the registration |
Non-indexed fields
token— the bound DS token; useful for indexers that watch multiple registrarsinvestorId— the DS Registry investor ID string
Listener pattern (viem)
import { vaultRegistrarAbi } from "@/config/vault-registrar-abi";
const unwatch = publicClient.watchContractEvent({
address: VAULT_REGISTRAR,
abi: vaultRegistrarAbi,
eventName: "VaultRegistered",
args: { investor: investorAddress }, // optional indexed filter
onLogs: (logs) => {
for (const log of logs) {
const { investor, vault, token, investorId, sender } = log.args;
// …
}
},
});
Listener pattern (ethers v6)
const filter = registrar.filters.VaultRegistered(investorAddress);
const events = await registrar.queryFilter(filter, fromBlock, toBlock);
InvestorSignatureVerified
event InvestorSignatureVerified(
address indexed investor,
address indexed operator,
uint256 nonce,
uint256 deadline,
bytes signature
);
When emitted. Inside registerVault(), immediately after the EIP-712 signature successfully recovers and just before the registry write. Always emitted alongside VaultRegistered.
Why it exists. Audit trail. Anyone watching this event can correlate which standing-permission signature was used for which registration. The nonce and deadline fields fully describe the validity window of the signature; the signature blob lets a downstream verifier replay the recovery off-chain.
OperatorPermissionInvalidated
event OperatorPermissionInvalidated(
address indexed investor,
address indexed operator,
uint256 newNonce
);
When emitted. From invalidateOperatorPermission(operator), after the per-pair nonce has been incremented.
Use it to:
- Invalidate any cached signature your relay holds for this investor/operator pair.
- Trigger an off-chain audit hook when an investor revokes future permissions.
- Detect rotation cycles for an operator across investors.
The newNonce field is the post-increment value, so the next valid signature must encode nonce = newNonce.
VaultUnregistered
event VaultUnregistered(
address indexed investor,
address indexed vault,
address token,
string investorId,
address indexed sender
);
Status: declared, not emitted. Part of IVaultRegistrar, but the live implementation never emits it because unregisterVault() always reverts with NotImplemented(). Off-ramp listeners should not depend on this event.
Inherited events
These come from the OpenZeppelin base contracts. They are useful for ops/audit, even though they are not part of the registrar's core domain.
Paused(address account) / Unpaused(address account)
Emitted by the PausableUpgradeable base when an admin pauses or unpauses the registrar. While paused, all registerVault() calls revert with EnforcedPause().
RoleGranted(bytes32 indexed role, address indexed account, address indexed sender)
Emitted when addOperator(account) grants OPERATOR_ROLE, or when _grantRole(DEFAULT_ADMIN_ROLE, deployer) runs during initialize. Watch the role field to filter for OPERATOR_ROLE (keccak256("OPERATOR_ROLE")).
RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender)
Emitted when removeOperator(account) revokes OPERATOR_ROLE. Pair this with RoleGranted to maintain an off-chain operator set.
Upgraded(address indexed implementation)
Emitted by the UUPS base when the proxy's implementation contract changes. Critical to monitor — a registrar upgrade may change error behavior, role rules, or storage layout.
Initialized(uint64 version)
Emitted once at initialize(...) time. Use it to find the deploy block of a proxy.