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

Solidity 0.6.2 - new selector syntax #324

Open
1 task
fulldecent opened this issue Jan 10, 2020 · 0 comments
Open
1 task

Solidity 0.6.2 - new selector syntax #324

fulldecent opened this issue Jan 10, 2020 · 0 comments

Comments

@fulldecent
Copy link
Contributor

Blockers

  • Release Solidity 0.6.2 final

Issue

Currently, code is used like this:

    constructor(address instanceRegistry, address templateContract) public {
        CountdownGriefingEscrow template;

        // set instance type
        bytes4 instanceType = bytes4(keccak256(bytes('Escrow')));
        // set initSelector
        bytes4 initSelector = template.initialize.selector;
        // initialize factory params
        Factory._initialize(instanceRegistry, templateContract, instanceType, initSelector);
    }

Soon this can be used instead:

    constructor(address instanceRegistry, address templateContract) public {
        // set instance type
        bytes4 instanceType = bytes4(keccak256(bytes('Escrow')));
        // set initSelector
        bytes4 initSelector = CountdownGriefingEscrow.initialize.selector;
        // initialize factory params
        Factory._initialize(instanceRegistry, templateContract, instanceType, initSelector);
    }

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant