Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Importing/compiling: WormholeRelayerSDK.sol #67

Open
gilbertsahumada opened this issue Oct 29, 2024 · 0 comments
Open

Error Importing/compiling: WormholeRelayerSDK.sol #67

gilbertsahumada opened this issue Oct 29, 2024 · 0 comments

Comments

@gilbertsahumada
Copy link

I'm participating in SIGMA Sprint, and to perform cross-chain transfers of ERC-20 tokens, I'm following the tutorial from the documentation.

Framework:

  • hardhat + foundry

Command run:

  • npx hardhat compile
  • forge build

To install the Wormhole Solidity SDK, I'm using Git submodules.

[submodule "lib/wormhole-solidity-sdk"]
	path = lib/wormhole-solidity-sdk
	url = https://github.com/wormhole-foundation/wormhole-solidity-sdk

Cuándo creo el contrato sender me esta dando error al compilar.

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import "lib/wormhole-solidity-sdk/src/WormholeRelayerSDK.sol";
import "lib/wormhole-solidity-sdk/src/interfaces/IERC20.sol";

contract CrossChainSender is TokenSender {
} 

The error I got is as follows:

Compiler run failed:
Error (2904): Declaration "Base" not found in "lib/wormhole-solidity-sdk/src/WormholeRelayerSDK.sol" (referenced as "./WormholeRelayerSDK.sol").
 --> lib/wormhole-solidity-sdk/src/TokenBase.sol:8:1:
  |
8 | import {Base} from "./WormholeRelayerSDK.sol";

Basically, in the file ./WormholeRelayerSDK.sol, the line import {Base} from "./Base.sol"; is causing an error. However, I checked, and I can't figure out what's wrong. The contract exists, and the import seems correct.

// SPDX-License-Identifier: Apache 2
pragma solidity ^0.8.13;

import "./interfaces/IWormholeReceiver.sol";
import "./interfaces/IWormholeRelayer.sol";
import "./Chains.sol";
import "./Utils.sol";
import {Base} from "./Base.sol";
import {TokenBase, TokenReceiver, TokenSender} from "./TokenBase.sol";
import {CCTPBase, CCTPReceiver, CCTPSender} from "./CCTPBase.sol";
import {CCTPAndTokenBase, CCTPAndTokenReceiver, CCTPAndTokenSender} from "./CCTPAndTokenBase.sol";

In order to solve this issue I'm just importing TokenBase.sol instead of WormholeRelayerSDK.sol but it should be giving an error by just importing the WormholeRelayerSDK.sol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant