AndromedaMsg
The set of execute messages common to all ADOs in the Andromeda Logic Library.
AndromedaMsg
All of the ADOs can call most of the base execute messages found in the AndromedaMsg enum.
AMP ADOs are the only ADOs that do not implement all the AndromedaMsg base executes.
Rates messages are only available to ADOs that implement Rates. This would be specified in the ADOs documentaion page.
All the ADOs can execute:
Ownership
Messages related to the ownership of an ADO.
OwnershipMessage
The enum containing the different ownership message options.
UpdateOwner
Offers the ADO's ownership to the specified new_owner
. Once the offer has been made, the new_owner
address can call AcceptOwnership to accept becoming the owner of the ADO.
Only available to the current ADO owner.
Only one offer can be made at a time.
Name | Type | Description |
---|---|---|
| Addr | The address to offer ownership to. |
| Option<Expiry> | An optional expiration to the ownership offer. |
AcceptOwnership
Accepts the offer to become the new owner of the ADO.
Only an address that has an offer can accept it.
RevokeOwnershipOffer
Removes any previously placed offer by the current ADO owner.
Only available to the current ADO owner.
Disown
Removes ownership from the current ADO owner.
Only available to the contract owner.
Once disowned, an ADO can never have an owner again.
UpdateAppContract
Updates the referenced App contract of an ADO. This allows the ADO to reference by name the components of the new App contract.
Only available to the ADO owner.
Name | Type | Description |
---|---|---|
| String | The address of the new App contract. |
UpdateKernelAddress
Updates the Kernel used by the ADO.
Only available to the ADO owner.
Name | Type | Description |
---|---|---|
| Addr | The contract address of the new kernel to be used by the ADO. |
AMPReceive
This message is not called by the user, but is the case that handles receiving AMP messsages from the Kernel. It first verifies the AMP packet and then proceeds to execute the attached execute messges. The AMP packet is verified by checking the following:
The origin matches the sender
The sender is the kernel
The sender has a code ID stored within the ADODB (and as such is a valid ADO)
Permissioning
Messages related to the permissioning of an ADO. Permissioning allows ADO owners to give/restrict access to addresses to execute messages on their ADOs.
You can use the Address List ADO to set up permissions.
Permissioning cannot bypass owner restricted messages.
PermissioningMessage
PermissionAction
Makes an action permissioned. This means that if an address is not whitelisted using Set Permission, it cannot call the action.
By actions, we are reffering to execute messages.
Only available to the ADO owner.
Permission Action essentially blacklists all addresses from calling the action unless they are whitelisted to do so.
Name | Type | Description |
---|---|---|
| String | The action/execute message to permission. |
SetPermission
Assigns permissions to the specified actor. In case of whitelists, the action needs to be permissioned first by calling PermissionAction.
Only availabe to the ADO owner.
In case of blacklisting, there is no need to call PermissionAction.
Name | Type | Description |
---|---|---|
| The address to assign permissions for. | |
| String | The execute message to assign a permission for. Action needs to be capitalized i.e. "UpdateSale" to specify the UpdateSale execute. |
| The type of permission assigned. |
Permission
An enum to represent a user's permission for an action:
Expiration defaults to Never
if not provided.
Local: The permissions are directly set from this ADO. You would directly specify the type of permission in this case.
Contract: The permissions are taken from an Address List ADO. You would reference the Address List in this case.
LocalPermission
Blacklisted: The user cannot perform the action until after the provided expiration.
Limited: The user can perform the action while uses are remaining and before the provided expiration.
Whitelisted: The user can perform the action until the provided expiration.
RemovePermission
Remove a previously assigned permission for the specified actor.
Only available to the ADO owner.
Name | Type | Description |
---|---|---|
| Vec<AndrAddr> | The address that you want to remove permissions for. |
| String | The execute message to have its permission removed for the specified actor. |
DisableActionPermissioning
Disables permissioning on an action.
This message is the reverse of a PermissionAction message.
Only available to the ADO owner.
Name | Type | Description |
---|---|---|
| String | The action/execute message to remove permissioning for. |
Rates
Sets a rate on a specific action in the ADO. Rates are used to add taxes or royalties on ADOs where it makes sense such as NFT sales for example. Here is the list of actions that can have rates applied to them:
ADO | Messages | Usage |
---|---|---|
Marketplace |
| Add a fee on NFT sales. |
Auction |
| Add a fee on auction sales. |
CW721 |
| Add a fee in case of a transfer agreement sale. |
CW20 |
| Add a fee on token transfers. You have to set rates on each message to include rates on all token transfers. |
Primitive |
| Add a fee for setting a value in the primitive. Can only be a flat rate. |
Only available to the ADOs that implement rates.
You can use the Rates ADO to set up rates.
RatesMessage
SetRate
Sets a rate on the specified action.
Check the table above to see which actions can have rates applied.
Name | Type | Description |
---|---|---|
| String | The execute message to add rates on. |
| The type of rate. Either local or taken from a rates ADO. |
Rate
Local: The rate configurations are specified within the ADO itself.
Local
Name | Type | Description |
---|---|---|
| The type of rate. | |
| Vec<Recipients> | The addresses to recieve the rates. Each address specified will receive the full amount of rate. For example, having a rate of 5% and 2 recipients means each address will receive a 5% rate. |
| The amount of funds taken. | |
| Option<String> | Optional description for the purpose of the rate. |
LocalRateType
An enum specifying the type of the rate.
Additive: The rate amount acts as a tax and is added to the price and payed by the buyer. For example a 10% additive rate (with one recipient) on a price of 1000 uandr means the buyer has to send 1100 uandr.
Deductive: The rate amount acts as a royalty and is deducted from the price. For example a 10% deductive rate on a price of 1000 uandr means the buyer needs to send 1000 uand and 100 will be taken to the recipient of the rate.
LocalRateValue
Percentage is specified as a decimal. This means a rate of 10% is specified as 0.1 and not 10.
Percent: The rate is specified as a percentage of the price using decimal.
Flat: The rate is specified as a fixed amount of Coin.
RemoveRate
Removes the rate set on the specified action.
Name | Type | Description |
---|---|---|
| String | The execute message to remove the rates from. |
Last updated