argotorg / argotorg/act

Multiple contracts, with a contract that is not created

Open
#184 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
279
Forks
51
Avg merge
17h 42m
Merged PRs (30d)
1

Description

Is it possible to define variables representing addresses contracts with known interfaces which aren't created by the contract referring to them?

For example, could you write an act specification for this?
```solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IERC20 {
function transfer(address recipient, uint256 amount) external;
}

contract TransferOneToken {
IERC20 public token;

constructor(IERC20 _tokenAddress) {
require(address(_tokenAddress) != address(0), "Invalid token address");
token = _tokenAddress;
}

function transfer() public {
// Transfer 1 token from the contract to the sender
uint256 transferAmt = 1;
token.transfer(msg.sender, transferAmt);
}
}
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing how Act specifications currently represent contracts and constructor-created addresses, then compare that model with the provided TransferOneToken example. Determine whether externally supplied IERC20 addresses are supported and identify the specification and verification behavior that would need to define completion.

Written by the indexing model from the issue text.

Assessment

Tech stack
solidity
Domain
blockchain
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.