Skip to content

Commit

Permalink
Fix compile errors
Browse files Browse the repository at this point in the history
  • Loading branch information
martineckardt committed Mar 26, 2024
1 parent 7f2e6b3 commit e92cb67
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ This starter kit will get you started with cross-Subnet smart contracts using Te
- **Foundry**:
- Forge: Compile and Deploy smart contracts to the local network, Fuji Testnet or Mainnet
- Cast: Interact with these smart contracts
- **Teleporter**: All contracts you may to interact with Teleporter
- **Teleporter**: All contracts you may want to interact with Teleporter
- **AWM Relayer**: The binary to run your own relayer
- **Examples**: Contracts showcasing how to achieve common patterns, such as sending simple messages, call functions of a contract on another blockchain and bridging assets. Please note that these example contracts have not audited and are for educational purposes only
- **Examples**: Contracts showcasing how to achieve common patterns, such as sending simple messages, call functions of a contract on another blockchain and bridging assets. Please note that these example contracts have not been audited and are for educational purposes only

## Set Up

Expand All @@ -18,7 +18,7 @@ This starter kit utilizes a Dev Container specification. Dev Containers use cont

You can run them directly on Github by clicking **Code**, switching to the **Codespaces** tab and clicking **Create codespace on main**. A new window will open that loads the codespace. Afterwards you will see a browser version of VS code with all the dependencies installed. Codespace time out after some time of inactivity, but can be restarted.

### Run locally
### Run Dev Container locally with Docker

Alternatively, you can run them locally. You need [docker](https://www.docker.com/products/docker-desktop/) installed and [VS Code](https://code.visualstudio.com/) with the extensions [Dev Container extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers). Then clone the repository and open it in VS Code. VS Code will ask you if you want to reopen the project in a container.

Expand Down
1 change: 1 addition & 0 deletions src/3-creating-contracts/BridgeReceiverOnSubnet.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import "./BridgeActions.sol";
contract TokenMinterReceiverOnBulletin is ITeleporterReceiver {
TeleporterRegistry public immutable teleporterRegistry =
TeleporterRegistry(0x827364Da64e8f8466c23520d81731e94c8DDe510);
address public tokenAddress;

function receiveTeleporterMessage(bytes32, address, bytes calldata message) external {
// Only a Teleporter Messenger registered in the registry can deliver a message.
Expand Down
5 changes: 4 additions & 1 deletion src/3-creating-contracts/BridgeSenderOnCChain.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

pragma solidity ^0.8.18;

import "@teleporter/upgrades/TeleporterRegistry.sol";
import "@teleporter/ITeleporterMessenger.sol";
import "./BridgeActions.sol";

Expand Down Expand Up @@ -33,7 +34,9 @@ contract ERC20MinterSenderOnCChain {
}

function sendMintTokenMessage(address destinationAddress, address to, uint256 amount) external {
teleporterMessenger.sendCrossChainMessage(
ITeleporterMessenger messenger = teleporterRegistry.getLatestTeleporter();

messenger.sendCrossChainMessage(
TeleporterMessageInput({
destinationBlockchainID: 0xd7cdc6f08b167595d1577e24838113a88b1005b471a6c430d79c48b4c89cfc53,
destinationAddress: destinationAddress,
Expand Down
2 changes: 1 addition & 1 deletion src/x-erc721-bridge/ERC721Bridge.sol
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ contract ERC721Bridge is IERC721Bridge, TeleporterOwnerUpgradeable, IERC721Recei
* @dev Initializes the Teleporter Messenger used for sending and receiving messages,
* and initializes the current chain ID.
*/
constructor(address teleporterRegistryAddress) TeleporterOwnerUpgradeable(teleporterRegistryAddress) {
constructor(address teleporterRegistryAddress) TeleporterOwnerUpgradeable(teleporterRegistryAddress, msg.sender) {
currentBlockchainID = IWarpMessenger(WARP_PRECOMPILE_ADDRESS).getBlockchainID();
}

Expand Down

0 comments on commit e92cb67

Please sign in to comment.