Skip to main content

Envio Community Update No. 07

· 7 min read
Cover Image Envio Developer Community Update No.7

Envio Community Update No. 07

Greetings developers! We’re excited to be back with our seventh community update and our second one of 2024! As usual, we’ll run through some of the latest activities the Envio team has been up to over the past month, including a detailed look into some features and tech updates.

Notable activities include a double dose of version updates that aim to supercharge your development experience. The team noticed a small regression affecting the contract import templates, prompting us to roll out two brand-spanking new versions with some exciting additions that can be seen in the technical overview below.

We’re also very excited to announce that Envio and ChainDensity are the proud Gold and Bronze sponsors featured on Primodata, the hub of blockchain data and one of the most comprehensive directories for blockchain data resources on the internet!

Envio <> Azuro Developer Grant Opportunity 🎰

Envio partnered up with the amazing team at Azuro to announce our exciting collaboration that invited blockchain developers from all walks of life to apply for a unique developer grant opportunity! Azuro uses subgraphs (indexing framework from TheGraph), to index and organize data from their smart contracts to query specific information about games, conditions, bets, and bet results.

The challenge involved migrating/replicating the indexing logic from Azuro’s subgraphs to the Envio SDK. The premise is simple yet rewarding: Build an open-source multi-chain indexer for the Azuro Protocol using the Envio SDK and receive a grant of $1500 USDC! 💸

Learn more about the grant opportunity here.

New HyperSync Network Support ⚡

We’re very thrilled to announce that Envio HyperSync has added even more significant updates to existing networks and added new and enhanced indexing support for developers building on Arbitrum Sepolia, Zeta, RSK (Rootstock), Berachain Artio (testnet), Shimmer and NeonEVM with many more to come!

To see a full list of currently supported chains on HyperSync visit our docs.

In addition, we’re very pleased to announce that Envio has also been listed on the official Arbitrum, Zeta, Harmony, and Metis developer docs as one of the best data indexing solutions including some quickstart tutorials for developers building on their networks. 🚀

Envio <> Encode Club Bootcamps 👢

Looking to improve your development skills? 👀We’ve partnered with the incredible team from Encode Club to bring you some epic AI and Solidity Bootcamps! ⚡️🦄

AI Bootcamp:

Join us for a masterclass in integrating blockchain data into AI to enhance your applications in integrating blockchain data into AI to enhance your projects. 🤖

🗓️Date: 18th Mar, 6 weeks

ℹ️ Appy here: https://encode.club/ai-bootcamp

Solidity Bootcamp:

Ready to dive into Smart Contracts with a focus on indexing? Join our Solidity Bootcamp and be there for our exclusive workshop.

🗓 Date: 11th Mar, 8 weeks

ℹ️ Apply here: https://www.encode.club/solidity-bootcamps

Tutorials 🍎

Check out our new written and video tutorials! 🧠

Developer Workshops 🧑‍💻

Missed our previous developer workshops? We got you.

Upcoming Events ⭐

Technical Overview 🏗️

Current release: v0.0.31 🚀

Over the past month, we released two new versions of Envio (v.0.0.30 → v.0.0.31).

What's changed:

v0.0.30

Changes:

CLI Enhancements:

  • Fixed CLI args printing error message on --help and --version

Metrics on the Go:

  • Added hardcoded hypersync API token to track usage metrics.

Logging Upgrade:

  • console.log and friends (console.warn, console.error etc) are now powered by Pino, making your logs more accessible and informative in the hosted service.

Performance Boost:

  • Introducing optional Rust based event decoding for that extra speed, thanks to the HyperSync client (enabled via Alloy).

Bug Squashes & Improvements:

  • Refined application state structure for better dynamic contract import handling.
  • Indexer now halts on errors, ensuring exceptions in async handlers are logged correctly.
  • Enhanced error messaging for database write failures.

Breaking Changes:

  • Switched from null to undefined for optional fields in TypeScript/JavaScript.
  • Entity name and ID field adjustments for clarity and consistency.
  • Soft deprecated subgraph migration, streamlining the codebase.

Code Quality Enhancements:

  • Cleaned up codegen and contract import templates.
  • Prepared the groundwork for reorg support in upcoming releases.
  • Added libssl as a dependency for Linux builds, plus more cleanups.

New Chains:

Migration Guide (See detailed examples at the bottom of the changelog):

  • Nullable Fields: Switch your null fields to undefined.
  • Entity References: Update your schema and handler code to reflect the new naming conventions.

v0.0.31

Changes:

GraphQL Enhancements:

  • Enums directive support and improved schema validation.

Bug Fixes:

  • Addressed a regression affecting one directional ‘derivedFrom’ fields.

Metrics:

  • Added Prometheus metrics for the latest fetched height and latest known block height.

Code Quality:

  • Standardized string formatting for better readability and some cleanup to the way the schema is parsed and validated.

New Chain Integration:

Detailed Migration Guide

Users will need to run rm -rf generated and delete their old generated code.

  1. Nullable Fields in GraphQL Schema

Issue: If your graphql.schema contains nullable fields, you must now explicitly set them to undefined instead of null in your TypeScript/JavaScript code. This adjustment is a breaking change but aligns with best practices in TypeScript/JavaScript.

Example Change:

GraphQL Schema:

entity Example {
exampleField: String
}

Before:

let exampleEntity: Example = {
exampleField: null,
};

After:

let exampleEntity: Example = {
exampleField: undefined,
};
  1. Referencing Other Entities in Your Schema

Issue: When referencing other entities in your schema, you now need to append _id to the entity field label in your handler code. This change makes the GraphQL query layer more closely mirror the actual GraphQL schema, moving away from the previous approach that added an 'Object' suffix.

Example Change:

GraphQL Schema:

entity Example {
exampleField: String
}
entity Example2 {
exampleLink: Example!
}

Before:

let exampleEntity: Example = {
exampleLink: idForExample,
};
// or
let { exampleLink } = context.Example2.get(example2Id);

After:

let exampleEntity: Example = {
exampleLink_id: idForExample,
};
// or
let { exampleLink_id } = context.Example2.get(example2Id);

GraphQL Query Layer Change:

Before:

{
Example2 {
exampleLink
exampleLinkObject {
exampleField
}
}
}

After:

{
Example2 {
exampleLink_id
exampleLink {
exampleField
}
}
}

If you have any questions or feedback feel free to hop in our Discord, we’d be happy to help and always appreciate feedback of any kind to improve your developer experience.

Stay tuned for more monthly updates by following us on X or by hopping into our Discord for more up-to-date information.

Ship with us. 🚢

By builders, for builders. Envio is a dev-friendly, speed-optimized, modern blockchain indexing solution that addresses the limitations of traditional blockchain indexing approaches and gives developers peace of mind. By harnessing the power of Envio, developers can overcome the challenges posed by latency, reliability, and costs across various sources. Envio serves as the front door for any application’s need to access, transform, and save real-time or historical data, from any EVM-compatible smart contracts.

If you're a blockchain developer looking to enhance your development process and unlock the true potential of Web3 infrastructure, look no further. Join our growing community of elite developers, check out our docs, and let's work together to revolutionize the blockchain world and propel your project to the next level.

Website | X | Discord | Hey | Medium | YouTube | Reddit