From dcc24fb30e00a1a2b8dfa87361aca5a6d8a47862 Mon Sep 17 00:00:00 2001 From: Tarrence van As Date: Tue, 15 Oct 2024 13:32:58 -0400 Subject: [PATCH] Add deployments --- README.md | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index d7e9a45..0a3f330 100644 --- a/README.md +++ b/README.md @@ -4,29 +4,36 @@ This Cartridge Verfiable Random Function (VRF) is designed to provide cheap, ato ## Key Features -1. **Atomic Execution**: The VRF request and response are processed within the same transaction, ensuring synchronous and immediate randomness for games. +1. **Atomic Execution**: The VRF request and response are processed within the same transaction, ensuring synchronous and immediate randomness for games. -2. **Efficient Onchain Verification**: Utilizes the Stark curve and Poseidon hash for optimized verification on Starknet. +2. **Efficient Onchain Verification**: Utilizes the Stark curve and Poseidon hash for optimized verification on Starknet. -3. **Fully Onchain**: The entire VRF process occurs onchain, maintaining transparency and verifiability. +3. **Fully Onchain**: The entire VRF process occurs onchain, maintaining transparency and verifiability. -4. **Improved Player Experience**: The synchronous nature of the VRF allows for instant resolution of random events in games, enhancing gameplay fluidity. +4. **Improved Player Experience**: The synchronous nature of the VRF allows for instant resolution of random events in games, enhancing gameplay fluidity. ## How It Works -1. A game calls `request_random(caller, source)` as the first call in their multicall. -2. A game contract calls `consume_random(source)` from the VRF contract. -3. The VRF server generates a random value using the VRF algorithm for the provided entropy source. -4. The Cartridge Paymaster wraps the players multicall with a `submit_random` and `assert_consumed` call. -5. The random value is immediately available and can be used within the same transaction. -6. The VRF proof is verified onchain, ensuring the integrity of the random value. +1. A game calls `request_random(caller, source)` as the first call in their multicall. +2. A game contract calls `consume_random(source)` from the VRF contract. +3. The VRF server generates a random value using the VRF algorithm for the provided entropy source. +4. The Cartridge Paymaster wraps the players multicall with a `submit_random` and `assert_consumed` call. +5. The random value is immediately available and can be used within the same transaction. +6. The VRF proof is verified onchain, ensuring the integrity of the random value. ## Benefits for Game Developers -- **Simplicity**: Easy integration with existing Starknet smart contracts. -- **Performance**: Synchronous randomness generation without waiting for multiple transactions. -- **Cost-effectiveness**: Potential cost savings through Paymaster integration. -- **Security**: Cryptographically secure randomness that's fully verifiable onchain. +- **Simplicity**: Easy integration with existing Starknet smart contracts. +- **Performance**: Synchronous randomness generation without waiting for multiple transactions. +- **Cost-effectiveness**: Potential cost savings through Paymaster integration. +- **Security**: Cryptographically secure randomness that's fully verifiable onchain. + +### Deployments + +| Network | Class Hash | Contract Address | +| ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Mainnet | [0x00be3edf412dd5982aa102524c0b8a0bcee584c5a627ed1db6a7c36922047257](https://voyager.online/class/0x00be3edf412dd5982aa102524c0b8a0bcee584c5a627ed1db6a7c36922047257) | [0x051fea4450da9d6aee758bdeba88b2f665bcbf549d2c61421aa724e9ac0ced8f](https://voyager.online/contract/0x051fea4450da9d6aee758bdeba88b2f665bcbf549d2c61421aa724e9ac0ced8f) | +| Sepolia | [0x00be3edf412dd5982aa102524c0b8a0bcee584c5a627ed1db6a7c36922047257](https://sepolia.voyager.online/class/0x00be3edf412dd5982aa102524c0b8a0bcee584c5a627ed1db6a7c36922047257) | [0x051fea4450da9d6aee758bdeba88b2f665bcbf549d2c61421aa724e9ac0ced8f](https://sepolia.voyager.online/contract/0x051fea4450da9d6aee758bdeba88b2f665bcbf549d2c61421aa724e9ac0ced8f) | ## Using the VRF Provider