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

feat(x/evmstaking): ubi auto withdraw #222

Merged
merged 8 commits into from
Oct 18, 2024
Merged

Conversation

ezreal1997
Copy link
Contributor

check ubi balance and perform auto withdraw if meets the threshold which is same as rewards withdraw

issue: none

@ezreal1997
Copy link
Contributor Author

What's different from other withdraw entries is we pass the empty string for delegatorAddress and validatorAddress in ubi withdraw entry.

// Add withdrawal entry to the withdrawal queue.
if err = k.AddWithdrawalToQueue(ctx, types.NewWithdrawal(
	uint64(blockHeight),
	"",
	"",
	params.UbiWithdrawAddress,
	ubiBalance.Uint64(),
)); err != nil {
	return nil, err
}

it's good since we only use EVMAddress here

@edisonz0718 edisonz0718 merged commit 305b3a6 into main Oct 18, 2024
6 checks passed
@edisonz0718 edisonz0718 deleted the rayden/ubi-withdraw branch October 18, 2024 00:07
Copy link

Binary uploaded successfully 🎉

📦 Version Name: 0.12.1-unstable-305b3a6
📦 Download Source: AWS S3

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

Successfully merging this pull request may close these issues.

3 participants