Splitter V1.0.0
Last updated
Last updated
The Splitter ADO is a smart contract used to split funds to a preset number of addresses. Each of the addresses has a specific percentage assigned by the contract owner. The splitter can be locked for a specified time as a kind of insurance for recipients that their percentages will not be changed for a certain period of time.
Ado_type: splitter
A maximum of 100 recipients can be set.
The recipient addresses need to be unique.
The minimum lock_time that can be set is 1 day.
The maximum lock_time that can be set is 1 year.
Name | Type | Description |
---|---|---|
Anytime a Send
execute message is sent, the amount sent will be divided amongst the recipients depending on their assigned percentage.
The splitter uses a basic array of structs to determine recipients and how the funds are divided.
To be a valid recipient list the array of AddressPercent
structs must meet the following requirements:
Be non-empty
Have percentage amounts less than or equaling 1
Read more about the Recipient struct here.
Updates the recipients of the splitter contract. Only executable by the contract owner when the contract is not locked.
Only available to the contract owner when the contract is not locked.
A maximum of 100 recipients can be set.
The recipients should be unique.
Used to lock the contract for a certain period of time making it unmodifiable in any way. This can serve as a way to ensure for recipients that their weights from the splitter are fixed for a certain amount of time. The time is calculated in seconds.
Only available to the contract owner when the contract is not already locked.
The minimum time that can be set is 86,400 which is 1 day.
The maximum time that can be set is 31,536,000 which is 1 year.
Divides any attached funds to the message amongst the recipients list.
You cannot send more than 5 coins with one Send.
Make sure to attach funds when executing a Send.
The rest of the execute messages can be found in the ADO Base section.
The current config of the Splitter contract.
The splitter's config is stored in a basic struct.
The rest of the query messages can be found in the ADO Base section.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
recipients
Vec<AddressPercent>
The recipient list of the splitter. Can be updated after instantiation if there is no current lock time.
lock_time
Option<MillisecondsDuration>
How long the splitter is locked. When locked, no recipients can be added/changed. Specified in milliseconds.
kernel_address
String
Contract address of the kernel contract to be used for AMP messaging. Kernel contract address can be found in our deployed contracts.
owner
Option<String>
Optional address to specify as the owner of the ADO being created. Defaults to the sender if not specified.
recipients
Vec<AddressPercent>
The new list of addresses to receive funds.
lock_time
How long the splitter is locked. When locked, no recipients can be added/changed.
config
The Splitter config struct.
recipients
Vec<AdressPercent>
The vector of the assigned recipients to receive the funds along with their percentages.
lock
Returns the timestamp in milliseconds of the end date for the lock.