AsterizmDemo contract
Deployment and Configuration of the Basic Protocol Demo Contract
Last updated
Deployment and Configuration of the Basic Protocol Demo Contract
Last updated
To demonstrate the functionality of our protocol, our team has developed a demo contract that facilitates the transmission of text data between networks. You can find the contract code in our repositories (both the basic and upgradeable versions for EVM and the basic version for TVM networks):
To complete the full configuration, you need to perform the following steps:
Add the obtained addresses to the list of trusted addresses on each network.
Send a message containing text from one network to another.
Here are console commands for simplified deployment
The command accepts the following parameters:
relayAddress - optional parameter: the address of an external relay. You will be able to review the list of available external relays on the respective page
feeTokenAddress - optional parameter: token address for transfer commission payment
networkName - mandatory parameter: the name of the network to which the contract is deployed. You can explore the list of available networks here.
Upon successful execution, the command will return a response similar to the following (the address of the demo contract will be displayed under the AsterizmDemo address):
The command accepts the following parameters:
relayAddress - optional parameter: the address of an external relay. You will be able to review the list of available external relays on the respective page
networkName - mandatory parameter: the name of the network to which the contract is deployed. You can explore the list of available networks here
Upon successful execution, the command will return a response similar to the following (the address of the demo contract will be displayed under the AsterizmDemo address):
Coming soon
Build programs:
Deploy demo program:
Initialization client config logic (If successful, the command will not output anything. In case of an error, a log will be displayed):
The command accepts the following parameters:
solanaEndpoint - solana rpc url
Client account creation (If successful, the command will not output anything. In case of an error, a log will be displayed):
The command accepts the following parameters:
solanaEndpoint - solana rpc url
Client sender creation (If successful, the command will not output anything. In case of an error, a log will be displayed), the address created after executing this command will need to be added to the trusted addresses in other networks:
The command accepts the following parameters:
solanaEndpoint - solana rpc url
Client demo program sender creation (If successful, the command will not output anything. In case of an error, a log will be displayed):
The command accepts the following parameters:
solanaEndpoint - solana rpc url
To simplify the process of adding trusted addresses, console commands have been developed.
IMPORTANT!
In each network, it is essential to add the trusted address of those networks to which transfers will be sent. That is if you plan to send such transfers:
Ethereum -> Polygon
Ethereum -> BSC
Polygon -> Ethereum
BSC -> Ethereum
then you should add a total of 4 trusted addresses as follows:
In the Ethereum network, add 2 trusted addresses (Polygon and BSC)
In the Polygon network, add 1 trusted address (Ethereum)
In the BSC network, add 1 trusted address (Ethereum)
The command accepts the following parameters:
contractAddress - mandatory parameter: the address of the demo contract in the current network
trustedAddress - mandatory parameter: the address of the trusted demo contract. You will be able to review the list of available external relays later on a dedicated page. Please note that this parameter accepts a uint value, not address. Therefore, you will need to convert the hexadecimal address to decimal
networkName - mandatory parameter: the name of the source network. You can check the list of available networks here.
Upon successful execution, the command will return a response similar to the following:
The command accepts the following parameters:
contractAddress - mandatory parameter: the address of the demo contract in the current network
trustedAddress - mandatory parameter: the address of the trusted demo contract. You will be able to review the list of available external relays later on a dedicated page. Please note that this parameter accepts a uint value, not address. Therefore, you will need to convert the hexadecimal address to decimal
networkName - mandatory parameter: the name of the source network. You can check the list of available networks here.
Upon successful execution, the command will return a response similar to the following:
The command accepts the following parameters:
trustedAddress - mandatory parameter: the address of the trusted demo contract. You will be able to review the list of available external relays later on a dedicated page. Please note that this parameter accepts a uint value, not address. Therefore, you will need to convert the hexadecimal address to decimal
Upon successful execution, the command will return a response similar to the following:
The command accepts the following parameters:
trustedAddress - mandatory parameter: the address of the trusted demo contract. You will be able to review the list of available external relays later on a dedicated page. Please note that this parameter accepts a uint value, not address. Therefore, you will need to convert the hexadecimal address to decimal
needToRemoveFlag - flag indicating whether to delete the old trusted address of the specified network
solanaEndpoint - solana rpc url
If successful, the command will not output anything. In case of an error, a log will be displayed.
To simplify the process of sending messages to the demo contract, console commands have also been developed.
The command accepts the following parameters:
contractAddress - mandatory parameter: the address of the demo contract in the source network
message - mandatory parameter: the text that will be transmitted from the source network to the destination network
networkName - mandatory parameter: the name of the source network. You can check the list of available networks here
Upon successful execution, the command will return a response similar to the following:
The command accepts the following parameters:
contractAddress - mandatory parameter: the address of the demo contract in the source network
message - mandatory parameter: the text that will be transmitted from the source network to the destination network
networkName - mandatory parameter: the name of the source network. You can check the list of available networks here
Upon successful execution, the command will return a response similar to the following:
Coming soon
The command accepts the following parameters:
amount - mandatory parameter: the value that will be sent to the destination network
srcAddress - mandatory parameter: client sender address in source chain
dstAddress - mandatory parameter: cilent contract address in destination chain
solanaEndpoint - solana RPC URL
If successful, the command will not output anything. In case of an error, a log will be displayed.