Skip to content

Move WrappedFungible ABI to linera-sdk#5913

Merged
deuszx merged 2 commits into
testnet_conwayfrom
abi-updates
Apr 7, 2026
Merged

Move WrappedFungible ABI to linera-sdk#5913
deuszx merged 2 commits into
testnet_conwayfrom
abi-updates

Conversation

@deuszx
Copy link
Copy Markdown
Contributor

@deuszx deuszx commented Apr 3, 2026

Motivation

Up until now a WrappedFungible was living entirely in the /examples directory. Since it's an importand and common abstraction we want to have it in linera-sdk, like fungible.

Proposal

Move WrappedFungible's ABI to linera-sdk/src/abis.

Test Plan

CI

Release Plan

None right now.

Links

@deuszx deuszx merged commit 47867eb into testnet_conway Apr 7, 2026
36 checks passed
@deuszx deuszx deleted the abi-updates branch April 7, 2026 10:53
deuszx added a commit that referenced this pull request Apr 21, 2026
Up until now a `WrappedFungible` was living entirely in the `/examples`
directory. Since it's an importand and common abstraction we want to
have it in `linera-sdk`, like `fungible`.

Move `WrappedFungible`'s ABI to `linera-sdk/src/abis`.

CI

None right now.

- [reviewer
checklist](https://github.com/linera-io/linera-protocol/blob/main/CONTRIBUTING.md#reviewer-checklist)
deuszx added a commit that referenced this pull request Apr 21, 2026
examples/wrapped-fungible/src/lib.rs:
- Take cherry-pick's re-export: `pub use linera_sdk::abis::wrapped_fungible::*`
  (drops ~100 LOC of inline WrappedParameters / WrappedFungibleOperation /
  WrappedFungibleTokenAbi definitions). Keep the `pub use fungible::Message`
  line — the linera-sdk abi doesn't re-export it.

examples/wrapped-fungible/src/contract.rs:
- Take cherry-pick's imports (Account + Message from wrapped_fungible).
  `Account` is now imported only via wrapped_fungible to avoid duplicate
  imports with linera_sdk::linera_base_types.

linera-sdk/src/abis/wrapped_fungible.rs:
- The cherry-pick's `pub use super::fungible::{Account, ...}` fails
  because Account is private in abis/fungible.rs. Re-export it directly:
  `pub use linera_base::identifiers::Account;`
pull Bot pushed a commit to ndr-ds/linera-protocol that referenced this pull request Apr 24, 2026
## Motivation

Backport the Linera↔EVM bridge work from `testnet_conway` to `main`. The
bridge
has evolved on `testnet_conway` through a series of PRs (linera-io#5684, linera-io#5754,
linera-io#5760,
linera-io#5763, linera-io#5764, linera-io#5793, linera-io#5814, linera-io#5817, linera-io#5821, linera-io#5897, linera-io#5913, linera-io#5914, linera-io#5929,
linera-io#5994).
Main has since diverged — some structural moves that the bridge depends
on
never made it back, and several bridge-adjacent APIs on main went in
different
directions. This PR brings the full bridge functionality to main while
adapting to main's current APIs.

## Proposal

Cherry-pick each bridge PR from `testnet_conway` in order, followed by a
dedicated `Resolve conflicts after #XXXX cherry-pick` commit that
records the
adaptations. The pattern keeps each upstream PR verbatim so future
backports
line up cleanly, and isolates the main-specific adjustments for review.

Functionally the bridge behaves the same as on `testnet_conway`. What
changed
is almost entirely API-shape adaptation on main:

- **Storage cache config field names**: the `linera-io#5793` cherry-pick
referenced
  `lite_certificate_cache_size` in `linera-bridge::main`, but main's
`StorageCacheConfig` calls that field `certificate_cache_size`
(testnet_conway
  later adopted the same name). Adapted the call sites and the clap arg.
- **`Bytecode::load_from_file`**: sync on `testnet_conway` (via a prep
PR
  that never made it to main), async on main. Added `.await?` at all
  call sites.
- **clap `with_operation` / `call_contract`**: take `&T` on main where
`testnet_conway` had `T`. Added `&` at several test and relay call
sites.
- **`authenticated_signer` → `authenticated_owner`**: API rename on
main,
  applied to the relevant contracts and tests.
- **Tracing init**: `testnet_conway` has
`linera_base::tracing::init(name)`;
  main does not. Reverted to `tracing_subscriber::fmt::init()` in
  `linera-bridge::main`.

A few minor clippy cleanups applied on top of `testnet_conway` source
where
main's clippy config is stricter (`map(...).unwrap_or_else(...)` →
`map_or_else`, useless `Ok(x?)` wraps, boxing of large futures, no
needless
`collect()`).

## Test Plan

- CI

## Release Plan

- Nothing to do / These changes follow the usual release cycle.

## Links

- Upstream bridge PRs merged (cherry-picked in this order): linera-io#5684,
linera-io#5754,
  linera-io#5760, linera-io#5763, linera-io#5764, linera-io#5793, linera-io#5814, linera-io#5817, linera-io#5821, linera-io#5897, linera-io#5913, linera-io#5914,
  linera-io#5929, linera-io#5994
- Related issue: "Linera EVM adapter rejects valid EVM successful
  terminations" (filed separately — `revm.rs` currently only whitelists
  `Return`; `Stop`, `SelfDestruct`, `EofReturnContract` are rejected)
- [reviewer
checklist](https://github.com/linera-io/linera-protocol/blob/main/CONTRIBUTING.md#reviewer-checklist)
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.

2 participants