Documentation Index
Fetch the complete documentation index at: https://docs.peaq.xyz/llms.txt
Use this file to discover all available pages before exploring further.
vault.unpauseToken(UnpauseToken)
Unpause the security token for a vault via the Vault Factory. This sends a transaction from the vault deployer.
UnpauseToken Type Parameters
| Parameter | Type | Required | Description |
|---|
| vaultDeployer | Signer | Required | Deployer signer authorized to unpause. Must be connected to a provider. |
| vaultFactory | string | Required | Vault Factory contract address. |
| vault | string | Required | Vault address whose token will be unpaused. |
Returns
| Field | Type | Description |
|---|
| status | unpaused | Status of the operation. |
| vault | string | Vault address whose token was unpaused. |
| vaultFactory | string | Vault Factory contract address. |
| unpausedBy | string | Address that submitted the transaction. |
| receipt | TransactionReceipt | Transaction receipt of the unpause call. |
Usage
TypeScript
import 'dotenv/config';
import { RWA, Chain, type SDKInit } from "@peaq-network/rwa";
import { JsonRpcProvider, Wallet } from "ethers";
async function main() {
// 0. Create RWA instance and get provider
const provider = new JsonRpcProvider(process.env.HTTPS_BASE_URL);
const init: SDKInit = { chainId: Chain.AGUNG, provider: provider };
const rwa_sdk = new RWA(init);
// 1. Vault deployer
const vaultDeployer = new Wallet(process.env.ADMIN_PRIVATE_KEY!, provider);
// 2. Unpause token
const result = await rwa_sdk.vault.unpauseToken({
vaultDeployer: vaultDeployer,
vaultFactory: "0x7809591A43449Ab57452c56Cf7d95b04Ef9886b6",
vault: "0x907229D0A25A5Bb16F0ff3D890f38Eb4Ad52Ea1a"
});
console.log("Result", result);
}
main().catch((err) => {
console.error(err);
process.exit(1);
});
JavaScript
import 'dotenv/config';
import { RWA, Chain } from "@peaq-network/rwa";
import { JsonRpcProvider, Wallet } from "ethers";
async function main() {
// 0. Create RWA instance and get provider
const provider = new JsonRpcProvider(process.env.HTTPS_BASE_URL);
const rwa_sdk = new RWA({ chainId: Chain.AGUNG, provider });
// 1. Vault deployer
const vaultDeployer = new Wallet(process.env.ADMIN_PRIVATE_KEY, provider);
// 2. Unpause Security Tokens
const result = await rwa_sdk.vault.unpauseToken({
vaultDeployer: vaultDeployer,
vaultFactory: "0x7809591A43449Ab57452c56Cf7d95b04Ef9886b6",
vault: "0x907229D0A25A5Bb16F0ff3D890f38Eb4Ad52Ea1a"
});
console.log("Result", result);
}
main().catch((err) => {
console.error(err);
process.exit(1);
});
Example outputs
Result {
status: 'unpaused',
vault: '0x907229D0A25A5Bb16F0ff3D890f38Eb4Ad52Ea1a',
vaultFactory: '0x7809591A43449Ab57452c56Cf7d95b04Ef9886b6',
unpausedBy: '0x8BCfa2e9FC4aCa66fCF36Bcf47646E5Fb8d74BA0',
receipt: ContractTransactionReceipt {
...
}
}
Notes:
- The vault deployer must be authorized in the Vault Factory.