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

Add contract deployment transaction #163

Closed
ureeves opened this issue Apr 30, 2024 · 1 comment
Closed

Add contract deployment transaction #163

ureeves opened this issue Apr 30, 2024 · 1 comment
Labels
type:feature implementing a new feature

Comments

@ureeves
Copy link
Member

ureeves commented Apr 30, 2024

Summary

A transaction type should be added to deal with the deployment of contracts. This is necessary for a contract deployment system to be able to function in the context of phoenix.

The transaction type should allow for charging the transaction, as well as deploying a contract - meaning it should include all the relevant data and metadata to perform this.

Possible solution design or implementation

A possible way to tackle this is to replace the Transaction::call field by a new field - maybe called exec - that contains an enum that can either be a contract call, or a contract deployment.

struct Transaction {
    /* other fields */
    exec: Execution,
}

enum Execution {
    Call { /*fields*/ }
    Deploy { /*fields*/ }
}

Additional context

Upstream should be able to use the data of this transaction to charge the user, as well as make decisions on how much to charge. This means the fields of the new transaction should likely be public, or otherwise accessible.

@ureeves ureeves added the type:feature implementing a new feature label Apr 30, 2024
ureeves pushed a commit that referenced this issue Apr 30, 2024
The deployment transaction contains the metadata necessary to deploy a
contract, together with its bytecode and possible constructor arguments.

Resolves: #163
ureeves pushed a commit that referenced this issue Apr 30, 2024
The deployment transaction contains the metadata necessary to deploy a
contract, together with its bytecode and possible constructor arguments.

Resolves: #163
@moCello
Copy link
Member

moCello commented May 21, 2024

Closed as no longer relevant after #175

@moCello moCello closed this as completed May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature implementing a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants