hyperledger-solang / solang

Solidity Compiler for Solana and Polkadot
https://solang.readthedocs.io/
Apache License 2.0
1.26k stars 211 forks source link

Solana: make anchor account.fetch() work #1435

Open seanyoung opened 1 year ago

seanyoung commented 1 year ago

Anchor can decode the fields in the account data of anchor rust programs. The metadata contains a list of fields. Make this work with Solidity.

A complication is that Anchor uses borsh encoding for the account data. Solidity can't use borsh encoding for this, as we want to update dynamic length items in place (e.g. strings) without re-encoding everything.

LucasSte commented 1 year ago

This is the same thing as in #541 and #1192

seanyoung commented 1 year ago

We could merge this work with walking the account storage directly without copying. This work may change the storage layout.

seanyoung commented 1 year ago

This could be related #933