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

feat: allow fee delegation only for smart accounts #46

Open
Agilulfo1820 opened this issue Jan 26, 2025 · 0 comments
Open

feat: allow fee delegation only for smart accounts #46

Agilulfo1820 opened this issue Jan 26, 2025 · 0 comments
Labels
documentation Improvements or additions to documentation urgent

Comments

@Agilulfo1820
Copy link
Member

Currently everyone can use the delegator url created on vechain energy. We need to write a smart contract to check if the transaction is for the smart account. Something like this:

interface IPrototype {
     function master(address _self) returns (address);
}

// …
    function canSponsorTransactionFor(
        address _origin,
        address _to,
        bytes calldata _data
    ) public view returns (bool) {
       if (IPrototype(0x000000000000000000000050726f746F74797065).master(_to) == 0xDeployerAddress) {
           return true;
       }

       return false;
    }
@Agilulfo1820 Agilulfo1820 added documentation Improvements or additions to documentation urgent labels Jan 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation urgent
Projects
None yet
Development

No branches or pull requests

1 participant