Skip to main content

IVoting

Asset Tokenization Studio Team

IVoting

Interface for voting rights management functionality

Methods​

cancelVoting​

function cancelVoting(uint256 _voteId) external nonpayable returns (bool success_)

Cancels an existing voting

Parameters​

NameTypeDescription
_voteIduint256The ID of the voting to be cancelled

Returns​

NameTypeDescription
success_boolWhether the cancellation was successful

forceCancelVoting​

function forceCancelVoting(uint256 _voteId) external nonpayable returns (bool success_)

Force-cancels a voting regardless of its record date

Restricted to ROLE_CORPORATE_ACTION_FORCE_CANCEL and gated by the operational, unpaused state and onlyMatchingActionType. Marks the corporate action disabled unconditionally — bypasses VotingAlreadyRecorded — and emits VotingForceCancelled.

Parameters​

NameTypeDescription
_voteIduint256The ID of the voting to force-cancel

Returns​

NameTypeDescription
success_boolWhether the force-cancellation was successful

getVoting​

function getVoting(uint256 _voteID) external view returns (struct IVotingTypes.RegisteredVoting registeredVoting_, bool isDisabled_)

Retrieves a registered voting by its ID

Parameters​

NameTypeDescription
_voteIDuint256The ID of the voting to retrieve

Returns​

NameTypeDescription
registeredVoting_IVotingTypes.RegisteredVotingThe registered voting data
isDisabled_boolWhether the voting is disabled

getVotingCount​

function getVotingCount() external view returns (uint256 votingCount_)

Retrieves the total number of votings

Returns​

NameTypeDescription
votingCount_uint256The total count of votings

getVotingFor​

function getVotingFor(uint256 _voteID, address _account) external view returns (struct IVotingTypes.VotingFor votingFor_)

Retrieves voting information for a specific account and voting ID

Return value includes user balance at voting record date

Parameters​

NameTypeDescription
_voteIDuint256The ID of the voting
_accountaddressThe account address

Returns​

NameTypeDescription
votingFor_IVotingTypes.VotingForVoting information for the specified account

initializeVoting​

function initializeVoting() external nonpayable

Initialises the voting capability on the token.

Callable once; subsequent calls revert with FacetAlreadyRegistered. Requires DEFAULT_ADMIN_ROLE. Called by the factory during deployment.

setVoting​

function setVoting(IVotingTypes.Voting _newVoting) external nonpayable returns (uint256 voteID_)

Parameters​

NameTypeDescription
_newVotingIVotingTypes.Votingundefined

Returns​

NameTypeDescription
voteID_uint256undefined

Events​

VotingCancelled​

event VotingCancelled(uint256 voteId, address indexed operator)

Emitted when a voting is cancelled

Parameters​

NameTypeDescription
voteIduint256The ID of the cancelled voting
operator indexedaddressThe address of the operator who cancelled the voting

VotingForceCancelled​

event VotingForceCancelled(uint256 voteId, address indexed operator)

Emitted when an admin force-cancels a voting, bypassing date guards

Parameters​

NameTypeDescription
voteIduint256The ID of the force-cancelled voting
operator indexedaddressThe address of the operator who force-cancelled the voting

VotingInitialized​

event VotingInitialized()

Emitted once when the voting capability is initialised on a token.

Fires exclusively from initializeVoting.

VotingSet​

event VotingSet(bytes32 corporateActionId, uint256 voteId, address indexed operator, uint256 indexed recordDate, bytes data)

Emitted when a voting is set

Parameters​

NameTypeDescription
corporateActionIdbytes32The ID of the corporate action
voteIduint256The ID of the voting
operator indexedaddressThe address of the operator who set the voting
recordDate indexeduint256The voting record date
databytesThe voting payload

Errors​

VotingAlreadyRecorded​

error VotingAlreadyRecorded(bytes32 corporateActionId, uint256 voteId)

Raised when attempting to cancel a voting that has already been recorded

Parameters​

NameTypeDescription
corporateActionIdbytes32The ID of the corporate action
voteIduint256The ID of the voting

VotingRightsCreationFailed​

error VotingRightsCreationFailed()

Raised when voting rights creation fails