Skip to content

Instantly share code, notes, and snippets.

View okhaimie-dev's full-sized avatar

okhai okhaimie-dev

View GitHub Profile
@okhaimie-dev
okhaimie-dev / json
Created March 8, 2024 15:34
Pragma VRF Issue
RPC: starknet_estimateFee with params {
"request": [
{
"type": "INVOKE",
"sender_address": "0x81bf791c87b61811c8b69243996922deae5d6ef0fd3013530b37efc8b5c145",
"calldata": [
"0x1",
"0x6560f3473e76650ea61b61e693bcffc0584d1999e09035239fa6d366666a72b",
"0x2609c9893ac591b1d071f31971c0731c3674dc6422d5fe98912abaa7d972f40",
"0x9",
@okhaimie-dev
okhaimie-dev / randomness_error.json
Last active March 5, 2024 20:44
Pragma Randomness Error
RPC: starknet_estimateFee with params {
"request": [
{
"type": "INVOKE",
"sender_address": "0x81bf791c87b61811c8b69243996922deae5d6ef0fd3013530b37efc8b5c145",
"calldata": [
"0x1",
"0x472b785567cf9a1220afbfc9f359bd3e9a328a494e49e8d0f310c0913a77bc0",
"0x2609c9893ac591b1d071f31971c0731c3674dc6422d5fe98912abaa7d972f40",
"0x0",
@okhaimie-dev
okhaimie-dev / Cairo Virtual Machine ( CVM ) Deep Dives.md
Last active February 5, 2024 12:26
Cairo Virtual Machine ( CVM ) Deep Dives.md

The understanding of foundational concepts of a subject is crucial to unlocking first principle thinking and the ability to have a better grasp in its design space. In the case of being a better Cairo developer, it is mandatory to have a concrete understanding of the Starknet Cairo Virtual Machine ( CVM ).

And in the Starknet smart contract world, the "Cairo Virtual Machine" along with its algorithms and data structures are the first principle thinking. We are able to build smart contracts on starknet due to the existence of this.

Cairo -> Sierra -> casm

This article assumes you have some basic knowledge of Cairo and how to deploy smart contract to the Starknet blockchain. Go through the quick start guide from Starknet official documentation and use Cairo book for references if you need a refresher on this.

Another thing to note is that Cairo compiles to Sierra prior to bein

@okhaimie-dev
okhaimie-dev / gist:5bd0ee3eab8b2b76d016f5522569820f
Created November 18, 2023 22:27
Example JSON Data Starknet React
export const exampleData = {
types: {
StarkNetDomain: [
{ name: "name", type: "felt" },
{ name: "version", type: "felt" },
{ name: "chainId", type: "felt" },
],
Person: [
{ name: "name", type: "felt" },
{ name: "wallet", type: "felt" },
@okhaimie-dev
okhaimie-dev / gist:87e5591bf2c713ac294ea5e8e9d3a6e5
Created August 9, 2023 13:53
SpaceDock Venture Factory abi
{
"_format": "hh-sol-artifact-1",
"contractName": "SpaceDock",
"sourceName": "contracts/framework/VentureFactory.sol",
"abi": [
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "constructor"
},