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

module: double indirection #178

Merged
merged 10 commits into from
Aug 22, 2024
Merged

module: double indirection #178

merged 10 commits into from
Aug 22, 2024

Conversation

lmittmann
Copy link
Owner

@lmittmann lmittmann commented Aug 12, 2024

This PR changes the way some types need to be initialized when querying them via RPC.

In the past one could ether initialize a types zero value and pass a reference to it:

// old
var balance big.Int
client.Call(
    eth.Balance(..).Returns(&balance),
)

or initialize its reference:

// old
balance := new(big.Int)
client.Call(
    eth.Balance(..).Returns(balance),
)

This PR allows to define types that are usually used by reference to pass a double indirection instead. So you no longer have to instantiate a type, but can simply write:

// new
var balance *big.Int
client.Call(
    eth.Balance(..).Returns(&balance),
)

Copy link

cloudflare-pages bot commented Aug 12, 2024

Deploying w3 with  Cloudflare Pages  Cloudflare Pages

Latest commit: ff40c0f
Status: ✅  Deploy successful!
Preview URL: https://eee9fc51.w3-7ji.pages.dev
Branch Preview URL: https://exp-double-indirection.w3-7ji.pages.dev

View logs

@lmittmann lmittmann marked this pull request as ready for review August 13, 2024 19:01
@lmittmann lmittmann changed the title Exp/double indirection module: double indirection Aug 13, 2024
lmittmann added a commit that referenced this pull request Aug 13, 2024
@lmittmann lmittmann merged commit f2f9118 into main Aug 22, 2024
3 checks passed
@lmittmann lmittmann deleted the exp/double-indirection branch August 22, 2024 18:38
lmittmann added a commit that referenced this pull request Aug 23, 2024
* updated page structure

* added DocLink

* fixed component import

* rpc-methods: fixed order

* cleanup

* deps upgrade

* fix

* added 404

* updated rpc-section

* disable underlined links

* updated rpc-section

* style tweaks

* updated link

* deps upgrade

* update

* updated package godoc

* updated nextra

* updated rpc methods

#178

* fixed example

* fixed example test

* rpc-extension: improved doc

* added two vm sections

* added lock file

* added sections that are coming soon

* updated index

* .

---------

Co-authored-by: lmittmann <[email protected]>
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