Skip to content

Releases: cartridge-gg/cainome

v0.10.1

Choose a tag to compare

@glihm glihm released this 09 Oct 17:00

What's Changed

  • feat(cairo-serde): lossy utf8 & bytes for ByteArray by @Larkooo in #113

New Contributors

Full Changelog: v0.9.0...v0.10.1

v0.10.0

Choose a tag to compare

@glihm glihm released this 03 Sep 16:42

New release that uses starknet-rs 0.17.0 and starknet-types-core 0.2.

v0.9.1

Choose a tag to compare

@glihm glihm released this 05 Aug 06:08

A release testing the CI automation. No change from 0.9.0.

v0.9.0

Choose a tag to compare

@glihm glihm released this 04 Aug 08:05

This version introduces the support for starknet-rs 0.16.

What's Changed

Full Changelog: v0.8.0...0.9.0

v0.8.0

Choose a tag to compare

@glihm glihm released this 02 Jun 18:07

Important changes

This update contains mostly the bump to starknet-rs 0.15 which contains some changes at the JSON RPC level.

The MSRV has been bumped by @vaporif and then reverted in the PR. However, cargo publish required 1.82 for some dependencies not supporting 1.81.

Changelog

chore: bump starknet-rs to 0.15.1 and CI updates by @vaporif in #92

v0.7.0

Choose a tag to compare

@glihm glihm released this 08 May 13:52

Important changes

⚠️ BREAKING CHANGES ⚠️

Generic types are no longer generated by Cainome at the moment. Please read the detail below:

Generic in Cairo are allowed, however not in an entrypoint. If used in a entrypoint, the generic type must be specified.

#[external(v0)]
fn entrypoint(ref self: ContractState) -> MyStruct<u32> {
    // ...
}

In the ABI, the generic types are flatten, which means anytime a generic type is specific, a new entry in the ABI is generated.

So MyStruct<T> could be present n times in the ABI.

Moreover, the genericity is not explicit in the ABI, and must be reconstructed. Which is, in some cases, very challenging.
To simplify how cainome generates the bindings, currently generic support has been removed from the high level usage and generated bindings.

Instead, a type_skips has been added to complement type_aliases.

abigen!(
    MyContract,
    "./contracts/abi/structs.abi.json",
    type_aliases {
        contracts::abicov::structs::GenericOne as GenericOneBis;
        contracts::abicov::structs::GenericTwo as GenericTwoBis;
        contracts::abicov::structs::ToAlias as MyDef;
    },
    type_skips(
        contracts::abicov::structs::GenericOne, contracts::abicov::structs::GenericTwo, contracts::abicov::structs::ToAlias
    ),
    derives(serde::Serialize)
);

By combining both, the type_aliases will ensure that cainome replaces the occurrence of the type in all functions/nested types.

By using type_skips, cainome will not output such types, and the user can use CairoSerde to implement the type at will:

#[derive(CairoSerde, Serialize)]
pub struct GenericOneBis {
    pub f1: Felt,
}

#[derive(CairoSerde, Serialize)]
pub struct GenericTwoBis {
    pub a: Felt,
}

#[derive(CairoSerde, Serialize)]
pub struct MyDef {
    pub a: Felt,
}

What's Changed

  • feat: skip types and reduce generic support (cairo 2.10.1) by @glihm in #91

Full Changelog: v0.6.1...v0.7.0

v0.6.1

Choose a tag to compare

@glihm glihm released this 28 Apr 22:49
c590b82

What's Changed

  • chore: relax starknet-types-core version by @kariy in #89

Full Changelog: v0.6.0...v0.6.1

v0.6.0

Choose a tag to compare

@glihm glihm released this 16 Apr 07:04

What's Changed

  • chore: bump starknet-rs 0.14.0 by @vaporif in #82
  • chore: change ci actions-rs to dtolnay, version bumps by @vaporif in #87

New Contributors

Full Changelog: v0.5.1...v0.6.0

v0.5.1

Choose a tag to compare

@glihm glihm released this 08 Apr 00:01

What's Changed

  • fix: use type path without generic during hydrate of tokens by @glihm in #83

Full Changelog: v0.5.0...v0.5.1

v0.5.0

Choose a tag to compare

@glihm glihm released this 07 Feb 02:09

Important changes

⚠️ Breaking change ⚠️
The version of starknet-rs is now 0.13.0, and the default version for transaction execution is V3.

What's Changed

Full Changelog: v0.4.12...v0.5.0