-
Notifications
You must be signed in to change notification settings - Fork 328
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
[action] Transfering delegate ownership, add CandidateTransferOwnership #4236
[action] Transfering delegate ownership, add CandidateTransferOwnership #4236
Conversation
if !IsValidCandidateName(act.Name()) { | ||
return ErrInvalidCanName | ||
} | ||
|
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.
remove empty line
also you'll need to add this new action type into envelope's |
added in #4250 |
4250 is for ioctl, this change should be added in this PR |
add guarding test case in |
func (act *CandidateTransferOwnership) Payload() []byte { return act.payload } | ||
|
||
// NewOwner returns the new owner address | ||
func (act *CandidateTransferOwnership) NewOwner() address.Address { return act.newOwner } |
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.
newOwner
may not be a good name for the function and the parameter
|
||
// IntrinsicGas returns the intrinsic gas of a CandidateTransferOwnership | ||
func (act *CandidateTransferOwnership) IntrinsicGas() (uint64, error) { | ||
payloadSize := uint64(len(act.Payload())) |
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.
redundant parameter
func (act *CandidateTransferOwnership) Cost() (*big.Int, error) { | ||
intrinsicGas, _ := act.IntrinsicGas() | ||
|
||
fee := big.NewInt(0).Mul(act.GasPrice(), big.NewInt(0).SetUint64(intrinsicGas)) |
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.
redundant parameter
Quality Gate passedIssues Measures |
Description
Transfering delegate ownership to a new address PART 1
protobuf changes: https://github.com/iotexproject/iotex-proto/pull/147/files
Related PR:
#4236
#4239
#4245
#4250
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Test Configuration:
Checklist: