-
Notifications
You must be signed in to change notification settings - Fork 237
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
[ETHEREUM-CONTRACTS] TrustedMacros: A TrustedForwarder that rules them all #1782
Comments
Work in progress: #1786 contract TokenBatchStreamerMacro is IUserDefinedMacro {
function executeMacro(ISuperfluid host, bytes memory params) external view
returns (ISuperfluid.Operation[] memory operations)
{
IConstantFlowAgreementV1 cfa = IConstantFlowAgreementV1(address(host.getAgreementClass(
keccak256("org.superfluid-finance.agreements.ConstantFlowAgreement.v1")
)));
(ISuperToken token, int96 flowRate, address[] memory recipients) =
abi.decode(params, (ISuperToken, int96, address[]));
operations = new ISuperfluid.Operation[](recipients.length);
// Build batch call operations here
for (uint i = 0; i < recipients.length; ++i) {
bytes memory callData = abi.encodeCall(cfa.createFlow,
(token,
recipients[i],
flowRate,
new bytes(0) // placeholder
));
operations[i] = ISuperfluid.Operation({
operationType : BatchOperation.OPERATION_TYPE_SUPERFLUID_CALL_AGREEMENT, // type
target: address(cfa),
data: abi.encode(callData, new bytes(0))
});
}
}
function hash712Params(bytes memory params) external view returns (bytes32 hash) {
(ISuperToken token, int96 flowRate, address[] memory recipients) =
abi.decode(params, (ISuperToken, int96, address[]));
}
} |
Scroll transaction breakdown.Reference: https://docs.scroll.io/en/developers/guides/estimating-gas-and-tx-fees/ Example: https://scrollscan.com/tx/0xbcf040cf21c27a1cb3b3ee158ee5fd48d6444d139f8aa5898d74f4bedad7029f
In this case, the L2 execution fee is still a large portion (60%) of the transaction fee. Optimism/ArbitrumThey still have significantly lower L2 execution fee. In case of optimism, it's in tune of Mwei. While in case of Arbitru, L1+L2 gas fees are mixed together in reporting. It sometimes ends up being 0.1 Gwei. |
A blurb:
|
Overview
What?
This is a trusted forwarder with high degree of extensibility through permission-less and user-defined "macro contracts", where:
*Benefit: the transaction is more readable than otherwise still having to users to read less legible eip-712 transaction with naive eip-712 integration.
An example user-defined macro request using eip-712:
How?
[missing image]
Why?
Deadline:
Technical Design Document (TDD):
Acceptance criteria
Links/Resources
The text was updated successfully, but these errors were encountered: