Kernel
Last updated
Was this helpful?
Last updated
Was this helpful?
The Andromeda Kernel acts as the core of the operating system.
The Kernel receives and handles packets from ADOs to be relayed to a specified recipient. The Kernel keeps track of the original sender of the message. It also verifies that the packet is sent by an Andromeda certified ADO before relaying the message.
The Kernel is also responsible for:
Relaying any IBC messages across any two chains that have an Andromeda Kernel deployed and a channel set up.
Keeping track of the other AMP ADOs such as the ADODB, VFS, and Economics.
All of our ADOs have an execute message to handle receiving packets from the Kernel.
The Kernels are set up by the Andromeda team on each chain. This means that as a regular user, you will not need to interact with this ADO yourself in most cases. This page serves as additional information on how it works for people that are interested into getting a deep understanding of our system.
The only only message that users will be calling is the execute message that will recover IBC funds sent in case the IBC message fails.
owner
Option<String>
Optional address to specify as the owner of the ADO being created. Defaults to the sender if not specified.
chain_name
String
The name of the chain we are deploying this kernel for.
Receives an AMP packet from another ADO. The packet is received, unpacked and the messages are relayed to their intended destination.
Only an AMPPkt sent from one of the Andromeda ADOs is accepted.
Constructs an AMPPkt with a given AMPMsg and sends it to the recipient.
message
The message to send.
Creates an ADO with the given type and message.
Only available to the owner of the Kernel.
key
String
The name of the AMP ADO we want to save the address for.
value
String
The address of the ADO.
Assigns a given channel between the current chain and the specified target chain
. For a successfull channel to be set up, both the channel ids need to be specified.
Only available to the owner of the Kernel.
Calling this message again, will override any previously set channels.
isc20_channel_id
Option<String>
The id of the ics20 channel.
direct_channel_id
Option<String>
The direct channel id.
chain
String
The name of the target chain.
kernel_address
String
The Kernel address of the target chain.
Recovers sent IBC funds to the user in case an IBC message fails.
Update the name of the chain the kernel is deployed on. This name is initially specified at instantiation.
Only available to the owner of the Kernel ADO.
chain_name
String
The new assigned name of the chain the kernel is deployed on.
Used to register a VFS username cross-chain.
username
String
The username to be registerd.
address
String
The address on the other chain to save the username to.
chain
String
The name of the second chain.
Queries the address of the specified key
.
key
String
The key to get the address for.
Returns the address in a string.
address
String
The address to check.
Returns true if the address was created by an Andromeda ADO and false otherwise.
Gets the saved channel information such as channel ids for the specified chain.
chain
String
The name of the chain to get the channel information for.
ics20
Option<String>
The ics20 id.
direct
Option<String>
The direct channel id.
kernel_address
String
The kernel address of the specifed chain.
supported_modules
Vec<String>
A list of supported modules by the specified chain.
Gets any fund recoveries available for the specified address.
addr
Addr
The address to check recoveries for.
Returns the saved chain name specified at instantiation.
chain_name
String
The name of the chain the kernel is deployed on.
Gets the chain name assosiated with the specified channel Id.
channel
String
The channel id of the channel to query.
Returns the chain name as a string.
Queries information on any pending packets on the specified channel.
sender
Addr
The address to check recovery funds for.
recipient
The address receiving the packet.
message
Binary
The attached message in the packet.
funds
Any funds attached with the packet.
channel
String
The channel being used to send the packet.
pending
bool
Whether this packet has been processed.
Queries the value for the specified env variable.
The variable name must be uppercase and can only contain letters, numbers, and underscores.
variable
String
The variable name.
Returns the value in a String.
Queries any recovery funds (funds returned for a failed tx) for the specified address.
addr
Addr
The address to check recovery funds for.
Queries the version of the ADO.
version
String
The version of the ADO.
Queries the owner of the contract.
Queries the ADO type.
ado_type
String
The type of the ado.
Information about the AMPPkt
struct can be found .
Used to save the addresses of the AMP ADOs that the Kernel will be interacting with such as the , , and .
This message can only be called by the .
The set of ownerhsip messages. These messages are the same as the ones found in the .
Currently there are three keys that can be used: vfs : Gets the address of the ADO used by the kernel.
adodb: Gets the address of the ADO used by the kernel.
economics: Gets the address of the ADO used by the kernel.
Checks if the specified address
was created by an Andromeda ADO by checking and comparing the code_Id
of the address with the code_Ids stored in the .
Returns a Vec<> containing the recoverable funds.
Returns the denom and amounts of the recovery funds in a struct.