concrete-eth / concrete-geth

Concrete is a framework for building application-specific rollups on the OP Stack
GNU Lesser General Public License v3.0
47 stars 19 forks source link

Return execution return value in the Create and Create2 methods in the Concrete environment #32

Closed therealbytes closed 1 month ago

therealbytes commented 1 month ago

Rationale

Right now, concrete.Environment.Create and concrete.Environment.Create2 ignore the return value of the bytecode execution. This is undesirable as it contains the revert reason when the contract creation reverts.

Implementation

Modify the Concrete environment interface and implementation so the Create and Create2 return the return value of the bytecode execution.

// Current interface
type Environment interface {
    // ...
    Create(data []byte, value *uint256.Int) (common.Address, error)
    Create2(data []byte, endowment *uint256.Int, salt *uint256.Int) (common.Address, error)
}

// Desired interface
type Environment interface {
    // ...
    Create(data []byte, value *uint256.Int) ([]byte, common.Address, error)
    Create2(data []byte, endowment *uint256.Int, salt *uint256.Int) ([]byte, common.Address, error)
}

[ODHack 4.0] Contributors: Note that we highly recommend that you comment on the issue by introducing yourself and how you plan on tackling the issue! Just saying you want an issue is not helpful. This will help with assigning tasks, especially if many comment.

vibenedict commented 1 month ago

I would like to work on this fix

fabrobles92 commented 1 month ago

Hello, Fabricio Robles here.

I would like to work on this issue :D

I have contributed to others web 3 open source projects such as Dojo Engine and would love to be part on the effort of this one.

Adecom16 commented 1 month ago

@therealbytes i am Adeoluwa, A smart contract developer can i work on this

TropicalDog17 commented 1 month ago

Hi @therealbytes, may I take this issue?

I have experience in programming with Go, and also contributed to various open source blockchain projects.

To tackle this issue, my initial approach will be modify the interface and the implementation of Create and Create2. After that, I will fix any arise compiler error due to breaking change of the interface. And of course I will make sure existing tests still pass after the changes

ghost commented 1 month ago

@therealbytes can I be assigned this issue please? This is my first time in Starknet ecosystem and I’d love to be given the opportunity to proof my acquired skill. Thank you 🙏🏾

therealbytes commented 1 month ago

Hey! @more-of-odeh This is not a Starknet project. How familiar are you with Go and Ethereum?