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
// SPDX-License-Identifier: MIT | |
pragma solidity 0.8.9; | |
contract AxelarGasServiceMock { | |
// This is called on the source chain before calling the gateway to execute a remote contract. | |
function payNativeGasForContractCall( | |
address sender, | |
string calldata destinationChain, | |
string calldata destinationAddress, | |
bytes calldata payload, |
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
// SPDX-License-Identifier: MIT | |
pragma solidity 0.8.18; | |
import { Router } from "https://raw.githubusercontent.com/hyperlane-xyz/hyperlane-monorepo/main/solidity/contracts/Router.sol"; | |
contract HelloWorld is Router { | |
function initialize(address _mailbox, address _interchainGasPaymaster) external initializer { | |
__Router_initialize( | |
_mailbox, | |
_interchainGasPaymaster |
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
const ethers = require('ethers'); | |
// Alice account | |
const YOUR_PRIVATE_KEY = '0x28194e8ddb4a2f2b110ee69eaba1ee1f35e88da2222b5a7d6e3afa14cf7a3347'; | |
const USE_LEGACY = true; | |
const LEGACY_GAS_PRICE_MULTIPLIER = 1.1; | |
// Create provider & wallet | |
const providerRPC = { | |
moonbase: { |
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
pragma solidity ^0.8.12; | |
contract ClientIssue { | |
event LogEvent(); | |
function causeEvent() external { | |
emit LogEvent(); | |
} | |
} |
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
// SPDX-License-Identifier: MIT | |
pragma solidity 0.8.12; | |
import "https://github.com/LayerZero-Labs/solidity-examples/blob/main/contracts/lzApp/NonblockingLzApp.sol"; | |
contract HelloWorld is NonblockingLzApp { | |
constructor(address _lzEndpoint) NonblockingLzApp(_lzEndpoint) {} | |
function sendMessage(string memory message, uint16 destChainId) external payable { |
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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.12; | |
import "https://github.com/wormhole-foundation/wormhole/blob/dev.v2/ethereum/contracts/interfaces/IWormhole.sol"; | |
contract SimpleGeneralMessage { | |
mapping(address => string) public lastMessage; | |
IWormhole immutable core_bridge; |
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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.12; | |
import "https://github.com/wormhole-foundation/wormhole/blob/dev.v2/ethereum/contracts/interfaces/IWormhole.sol"; | |
contract SimpleGeneralMessage { | |
mapping(address => string) public lastMessage; | |
// 0xc8e is only on Moonbeam |
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
// SPDX-License-Identifier: Apache-2.0 | |
pragma solidity ^0.8.13; | |
// ============ External Imports ============ | |
import {Router} from "@hyperlane-xyxz/app/contracts/Router.sol"; | |
contract SimpleGeneralMessage is Router { | |
mapping(address => string) public lastMessage; |
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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.12; | |
import "https://github.com/LayerZero-Labs/solidity-examples/blob/main/contracts/lzApp/NonblockingLzApp.sol"; | |
contract SimpleGeneralMessage is NonblockingLzApp { | |
using BytesLib for bytes; | |
mapping(address => string) public lastMessage; |
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
// SPDX-License-Identifier: GPL-3.0-only | |
pragma solidity >=0.8.0; | |
import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | |
// At Address | |
// 0x4391990EDE738d143923D8240c093b9c2D97ddA3 | |
// Be sure to show your current balance | |
contract BatchToken is ERC20 { |
NewerOlder