Skip to content

Owner Functions

This section covers the functions that can only be called by the space owner or the game engine.

createSpace

Creates a new space with specified parameters.

function createSpace(
    string memory name,
    uint256 maxMembers,
    uint256 joinFee,
    address owner,
    address token
)
    external
    returns (uint256);

setManyBalances

Sets the balances for multiple users in a space.

function setManyBalances(uint256 spaceId, address[] memory users, uint256[] memory balances) external;

setManyBalancesAndEnableWithdrawals

Sets the balances for multiple users in a space and enables withdrawals for them.

function setManyBalancesAndEnableWithdrawals(uint256 spaceId, address[] memory users, uint256[] memory balances) external;

setAllWithdrawalsEnabled

Enables or disables withdrawals for all users in a space.

function setAllWithdrawalsEnabled(uint256 spaceId, bool enabled) external;

setWithdrawalEnabled

Enables or disables withdrawals for a specific user in a space.

function setWithdrawalEnabled(uint256 spaceId, address user, bool enabled) external;