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

fix: Update RPC struct Delegate #21

Merged
merged 20 commits into from
Jan 13, 2025
Merged

fix: Update RPC struct Delegate #21

merged 20 commits into from
Jan 13, 2025

Conversation

huancheng-trili
Copy link

@huancheng-trili huancheng-trili commented Oct 3, 2024

What

Update RPC struct Delegate according to the changelog.

Also re-grouped some old deprecated fields so that it's easier to identify which of them are no longer in use.

Test

Tested against ghostnet:

func main() {
	c, _ := rpc.NewClient("https://rpc.ghostnet.teztnets.com/", nil)
	ctx := context.TODO()
	after := tezos.MustParseBlockHash("BKm4PTHfr5saX1KyPDKiwVjSrfg7vrjFsABAtLUMKkAtbJWHZKo") // 10048212, v21
	before := tezos.MustParseBlockHash("BM6uDjxrzc6QusFYaHCQYd8ziJztZFUmSDQN2BdYqUXgCtE5Zm7") // 10047487, v20
        delegate := tezos.MustParseAddress("tz1NiaviJwtMbpEcNqSP6neeoBYj8Brb3QPv")
	b, e := c.GetDelegate(ctx, delegate, before)
	fmt.Println(e)
	fmt.Printf("%+v\n", b)

	b, e = c.GetDelegate(ctx, delegate, after)
	fmt.Println(e)
	fmt.Printf("%+v\n", b)
}

and did not receive any error.

CHANGELOG.md Outdated Show resolved Hide resolved
Base automatically changed from qena-rpc-total_unstaked_per_cycle to master January 13, 2025 17:38
@huancheng-trili huancheng-trili marked this pull request as ready for review January 13, 2025 17:38
@huancheng-trili huancheng-trili merged commit 32c4ea2 into master Jan 13, 2025
4 checks passed
@huancheng-trili huancheng-trili deleted the qena-rpc-delegate branch January 13, 2025 17:53
Frank-en-stein pushed a commit that referenced this pull request Jan 18, 2025
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.

1 participant