-
Notifications
You must be signed in to change notification settings - Fork 46
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
deploy contracts as plain code #266
Conversation
@hayarobi This is one of the most important PRs |
Does this path prevent deploying compiled code?Is it breaking backward compatibility? |
I think @hayarobi made a valid question regarding already deployed compiled code. It should be implemented to prevent new code deploys in bytecode format but allow existing code to run to ensure backward compatibility. |
codePayload := luacUtil.LuaCodePayload(payload) | ||
if _, err := codePayload.IsValidFormat(); err != nil { | ||
ctrLgr.Warn().Err(err).Str("contract", types.EncodeAddress(contractAddress)).Msg("deploy") | ||
return nil, nil, err | ||
} | ||
code := codePayload.Code() | ||
|
||
// if hardfork version 4 | ||
if ctx.blockInfo.ForkVersion >= 4 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this part would insure that code running in blocks with forkversion < 4 to run as previously @hayarobi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The contract execution code was not modified. It remains exactly the same
@hayarobi please finish review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
No description provided.