block-bites / fondant-app

Testing environment for Casper blockchain.
https://fondant.dev
Apache License 2.0
4 stars 4 forks source link

Casper 2.0 Updates #119

Open sczembor opened 3 months ago

sczembor commented 3 months ago

Casper 2.0 Fondant

  1. Dependency Upgrade:

    • Update all Fondant dependencies to their latest Casper 2.0-compatible versions. This includes casper-node, casper-client, cctl and any other relevant tools.
  2. Data Parsing:

  3. AddressableEntity:

    • Replace all occurrences of AccountHash and ContractHash with the unified Key::AddressableEntity.
    • Use the appropriate EntityKindTag (Account or SmartContract) to specify the type of the AddressableEntity.
    • Update any storage or retrieval logic that relies on the old key formats to use the new AddressableEntity format.
    • Article WIP.
  4. Casper Events Support:

    • Implement support for the new Casper 2.0 event system, which utilizes message topics for event subscription and filtering.
    • Subscribe to relevant message topics emitted by contracts and handle these events within your application's logic.
    • Ensure compatibility with the older Casper 1.x event system (CES) by maintaining existing event handling mechanisms while introducing support for the new native events.
    • New Events.
    • [Article soon]().
  5. Casper Client Command Updates:

    • Replace the get-account command with get-entity to retrieve information about an addressable entity (account or contract).
    • Replace the get-deploy command with get-transaction to retrieve details about a specific transaction.
    • Replace the put-deploy command with put-txn to submit a new transaction to the network.
    • For full list check the casper-client-rs/feat-track-node-2.0
  6. casper-js-sdk Updates:

    • The compatible version can be found here
    • Migration guide can be found here
  7. Testing:

sczembor commented 3 months ago

@CommonDrum

peter-blockbites commented 2 months ago

Hi, I have some objections about this point - Casper Events Support. Not sure it will be easy to implement

Subscribe to relevant message topics emitted by contracts and handle these events within your application's logic

because the application will need to store some state about the installed contracts. I know we can rely on sidecar here but as current version of Fondant doesn't use it I can't say how far we can go with this functionality.