-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed as not planned
Labels
A-cheatcodesArea: cheatcodesArea: cheatcodesC-forgeCommand: forgeCommand: forgeCmd-forge-scriptCommand: forge scriptCommand: forge scriptT-featureType: featureType: feature
Description
Component
Forge
Describe the feature you would like
It would be useful for processes that manage broadcast log files if each tx could have arbitrary data attached. My use case is giving names to deployed contracts.
The interface could look like this:
function broadcast(bytes calldata) external;
function broadcast(address, bytes calldata) external;
function broadcast(uint256, bytes calldata) external;and be used like this:
vm.broadcast(bytes("BetterContract"));
new Contract();
// struct TxInfo({uint version; string message;})
vm.broadcast(abi.encode(TxInfo({version: 2, message: "updating the oracle"})));
oracle.update();The resulting JSON would look like this:
{
"transactions": [
{
"hash": "0x16cd3c8ce4f1f3d03582e1d1132c90297469b36e5ee74fc9957cdceb4e3f51f6",
"transactionType": "CREATE",
"memo": <arbitrary bytes>
}
]
}Or, to be easier to read in the JSON by default, just allow a string:
function broadcast(string calldata) external;
function broadcast(address, string calldata) external;
function broadcast(uint256, string calldata) external;Additional context
No response
Metadata
Metadata
Assignees
Labels
A-cheatcodesArea: cheatcodesArea: cheatcodesC-forgeCommand: forgeCommand: forgeCmd-forge-scriptCommand: forge scriptCommand: forge scriptT-featureType: featureType: feature
Type
Projects
Status
Done