xoroshiro 1.1.0

Pseudo-random number generator

Readme

xoroshiro-cairo

A xoroshiro128** pseudorandom number generator implementation in Cairo.

Usage

You can use the deployed onchain contract via the following interface or install it as a library via Scarb.

Interface

#[starknet::interface]
trait IXoroshiro<TContractStorage> {
    fn next(ref self: TContractStorage) -> u128;
}

Addresses

Built with Cairo v2.0

As of now, this version has been only deployed to Goerli testnet.

Class hash: 0x03c9bf7538a769ffce851f6ef2540a158aa60864ed934b1df703b2c59fbdd526

Deployed contract (seed = 42) address: 0x071ddddaa6dc7fdee1c29f4c6ddfa5d2f235e30c15b96b33180e6f9df0b7f13e

Testnet

declare TX

deploy TX

contract

Built with Cairo v1.1

The contract has been declared and deploy on both testnet and mainnet. Class hash and addresses are the same on both networks:

Class hash: 0x1ef52fac5efec1fe792b73d7fdcc0cba30dc1b166466ddaa5aa79a126b6aa44

Deployed contract (seed = 42) address: 0x6f6ad3411cfe6812bce43ffc1ad6ab1f2cd590f37abf83c058d3e57368cc300

Testnet

declare TX

deploy TX

contract

Mainnet

declare TX

deploy TX

contract

Metadata

Version 1.1.0

Uploaded 2 months ago

Size 12.8 KB

Installation

Run the following command in your project dir

scarb add xoroshiro@1.1.0

Or add the following line to your Scarb.toml

xoroshiro = "1.1.0"

Monthly downloads

Links

Repository github.com/milancermak/xoroshiro-cairo

Keywords

  • random
  • randomness
  • prng
  • cairo
  • starknet
  • game

Owners