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

[RHI-1426] Projects using ModuleKit can not be complied with via-ir #165

Open
2 tasks done
zeroknots opened this issue Dec 9, 2024 · 0 comments
Open
2 tasks done
Labels
bug Something isn't working

Comments

@zeroknots
Copy link
Member

zeroknots commented Dec 9, 2024

Have you ensured that all of these are up to date?

  • This repo
  • Any dependencies (according to the package.json)

What command(s) is the bug in?

No response

Operating System

None

Describe the bug

building a test / module that requires --via-ir doesnt work with modulekit.

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

import {Test} from "forge-std/Test.sol";
import {RhinestoneModuleKit, ModuleKitHelpers, AccountInstance} from "modulekit/ModuleKit.sol";

contract Poc is RhinestoneModuleKit, Test {
    using ModuleKitHelpers for *;

    AccountInstance internal instance;

    function setUp() public {
        instance = makeAccountInstance("foo");
    }

    function test_foo() public {}
}

throws this error

Error: Compiler run failed:
Error: Yul exception:Cannot swap Variable var_data_57195_offset with Variable _1: too deep in the stack by 5 slots in [ var_operation RET var_data_57195_offset var_data_57195_length var_signatures_57210_mpos var_signatures_57210_mpos var_to var_refundReceiver var_gasToken var_gasPrice var_baseGas var_safeTxGas var_value var_data_57195_offset var_to var_refundReceiver var_value var_gasToken var_gasPrice var_baseGas var_safeTxGas var_operation var_data_57195_length _1 ]
No memoryguard was present. Consider using memory-safe assembly only and annotating it via 'assembly ("memory-safe") { ... }'.
YulException: Cannot swap Variable var_data_57195_offset with Variable _1: too deep in the stack by 5 slots in [ var_operation RET var_data_57195_offset var_data_57195_length var_signatures_57210_mpos var_signatures_57210_mpos var_to var_refundReceiver var_gasToken var_gasPrice var_baseGas var_safeTxGas var_value var_data_57195_offset var_to var_refundReceiver var_value var_gasToken var_gasPrice var_baseGas var_safeTxGas var_operation var_data_57195_length _1 ]
No memoryguard was present. Consider using memory-safe assembly only and annotating it via 'assembly ("memory-safe") { ... }'.
  --> lib/modulekit/node_modules/@safe-global/safe-contracts/contracts/Safe.sol:33:1:
   |
33 | contract Safe is
   | ^ (Relevant source part starts here and spans across multiple lines).

RHI-1426

@zeroknots zeroknots added the bug Something isn't working label Dec 9, 2024
@zeroknots zeroknots changed the title Projects using ModuleKit can not be complied with via-ir [RHI-1426] Projects using ModuleKit can not be complied with via-ir Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant