Skip to content

Conversation

@m30m
Copy link
Contributor

@m30m m30m commented May 21, 2025

Summary

  • Revert the unnecessary RETRY_PREVIOUS_BLOCKS PR
  • Add more fields to fortuna:
    • gas
    • combined_random_value
    • limit and offset
    • network_id

Rationale

Network id is a better way to connect the ui, contract manager and other components to this backend since the names are not fully standardised (camelCase/snake_case and sometimes a testnet/mainnet is missing)

How has this been tested?

  • Current tests cover my changes
  • Added new tests
  • Manually tested the code

Here is an example json payload:

{
    "chain_id": "monad-testnet",
    "network_id": 10143,
    "provider": "0xde817704b3da538580f665ad248c947acb06976d",
    "sequence": 16,
    "created_at": "2025-05-21T23:39:38.168051Z",
    "last_updated_at": "2025-05-21T23:39:38.168056Z",
    "request_block_number": 17944962,
    "request_tx_hash": "0x7378963ecf2a6a9fc5b8b5b3bc08a002401a5ee28530ee6baba46b67b702fcc0",
    "gas_limit": "500000",
    "user_random_number": "129e247e17d0bd17ae8087eb024b381f2d9832ebe741f120f3e8490664b871f3",
    "sender": "0x78357316239040e19fc823372cc179ca75e64b81",
    "state": {
      "state": "completed",
      "reveal_block_number": 17944966,
      "reveal_tx_hash": "0x3ab2e2c6d1b2857aa5b4be9fa4e214c0b10740bc1127d1c706e25b97f498a2f9",
      "provider_random_number": "5e56b5976b77e8d457ce01daf9d949ffa7851ac95d3db0f54171f8f2b71da921",
      "gas_used": "81880",
      "combined_random_number": "59605786c32b552f41fceecdf8745c9896de00990e6f689dbb2111a25c12b452"
    }
  }

@vercel
Copy link

vercel bot commented May 21, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
api-reference ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 22, 2025 9:23pm
component-library ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 22, 2025 9:23pm
developer-hub ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 22, 2025 9:23pm
entropy-debugger ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 22, 2025 9:23pm
entropy-explorer ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 22, 2025 9:23pm
insights ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 22, 2025 9:23pm
proposals ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 22, 2025 9:23pm
staking ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 22, 2025 9:23pm

@@ -0,0 +1,21 @@
pub mod u256 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we should have a types/ directory where this file could be types/u256 and then we can move out other type definitions there?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmm, this is not our type but just overriding the way we want to (de)serialize it. I scanned the repo and we have managed to get away with serde_with so far with other types.

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.

3 participants