-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
547 additions
and
710 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,7 @@ | ||
EVM_PRIVATE_KEY=YOUR_PRIVATE_KEY_HERE | ||
|
||
# For amplifier examples | ||
GMP_API_URL= | ||
ENVIRONMENT= # e.g. devnet-amplifier, testnet, or mainnet | ||
CRT_PATH= # e.g. './client.crt' | ||
KEY_PATH= # e.g. './client.key' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,6 @@ chain-config/*.json | |
!./**/artifacts/send_receive.wasm | ||
|
||
.multiversx | ||
|
||
*.crt | ||
*.key |
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"devnet-amplifier": [ | ||
{ | ||
"name": "avalanche-fuji", | ||
"rpc": "https://rpc.ankr.com/avalanche_fuji", | ||
"gateway": "0xF128c84c3326727c3e155168daAa4C0156B87AD1" | ||
}, | ||
{ | ||
"name": "xrpl-evm-sidechain", | ||
"rpc": "https://rpc-evm-sidechain.xrpl.org", | ||
"gateway": "0x48CF6E93C4C1b014F719Db2aeF049AA86A255fE2" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
examples/amplifier/config/latestTasks/latestTask-xrpl-evm-sidechain.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
"01924dc4-698e-7ad2-9f9b-0bad962771ef" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import { AxelarExecutable } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/executable/AxelarExecutable.sol'; | ||
import { IAxelarGateway } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IAxelarGateway.sol'; | ||
|
||
/** | ||
* @title AmplifierGMPTest | ||
* @notice Send a message from chain A to chain B and stores gmp message | ||
*/ | ||
contract AmplifierGMPTest is AxelarExecutable { | ||
string public message; | ||
string public sourceChain; | ||
string public sourceAddress; | ||
|
||
constructor(address _gateway) AxelarExecutable(_gateway) {} | ||
|
||
/** | ||
* @notice Send message from chain A to chain B | ||
* @dev message param is passed in as gmp message | ||
* @param destinationChain name of the dest chain (ex. "Fantom") | ||
* @param destinationAddress address on dest chain this tx is going to | ||
* @param _message message to be sent | ||
*/ | ||
function setRemoteValue(string calldata destinationChain, string calldata destinationAddress, string calldata _message) external { | ||
bytes memory payload = abi.encode(_message); | ||
gateway.callContract(destinationChain, destinationAddress, payload); | ||
} | ||
|
||
/** | ||
* @notice logic to be executed on dest chain | ||
* @dev this is triggered automatically by relayer | ||
* @param _sourceChain blockchain where tx is originating from | ||
* @param _sourceAddress address on src chain where tx is originating from | ||
* @param _payload encoded gmp message sent from src chain | ||
*/ | ||
function _execute(string calldata _sourceChain, string calldata _sourceAddress, bytes calldata _payload) internal override { | ||
(message) = abi.decode(_payload, (string)); | ||
sourceChain = _sourceChain; | ||
sourceAddress = _sourceAddress; | ||
} | ||
} |
Oops, something went wrong.