Skip to content

module: double indirection#178

Merged
lmittmann merged 10 commits intomainfrom
exp/double-indirection
Aug 22, 2024
Merged

module: double indirection#178
lmittmann merged 10 commits intomainfrom
exp/double-indirection

Conversation

@lmittmann
Copy link
Copy Markdown
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),
)

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-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
@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 <lmittmann@users.noreply.github.com>
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