Skip to content

sudoApproveChainSpace

sudoApproveChainSpace(authority, spaceUri, capacity): any

Approves a ChainSpace on the CORD blockchain using sudo privileges.

Parameters

authority: CordKeyringPair

The account with sudo privileges to approve the ChainSpace.

spaceUri: space:cord:${string}

The URI of the ChainSpace to be approved.

capacity: number

The approved capacity for the ChainSpace.

Returns

any

Remarks

Allows administrators or superusers to approve ChainSpaces, crucial for overseeing space allocations.

Example

const authority = 'authority_account';
const spaceUri = 'space:example_uri';
const capacity = 100;
sudoApproveChainSpace(authority, spaceUri, capacity).then(() => {
console.log('ChainSpace approved successfully');
}).catch(error => {
console.error('Error approving ChainSpace:', error);
});

Throws

  • Thrown on error during the dispatch process.

Source

chain-space/src/ChainSpace.chain.ts:356