Skip to content

Commit

Permalink
Merge pull request #15 from cartridge-gg/legacy
Browse files Browse the repository at this point in the history
feat: add support for Cairo 0 programs
  • Loading branch information
glihm authored Feb 10, 2024
2 parents 6a09a79 + 4e2f41f commit ddc1340
Show file tree
Hide file tree
Showing 23 changed files with 1,111 additions and 30 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ cainome-rs = { path = "crates/rs" }

anyhow = "1.0"
async-trait = "0.1.68"
convert_case = "0.6.0"
serde = { version = "1.0", default-features = false, features = ["alloc"] }
serde_json = { version = "1.0", default-features = false, features = ["std"] }
starknet = "0.8.0"
Expand All @@ -38,7 +39,7 @@ anyhow.workspace = true
camino = { version = "1.1.2", features = [ "serde1" ] }
clap = { version = "4.2", features = [ "derive" ] }
clap_complete = "4.3"
convert_case = "0.6.0"
convert_case.workspace = true
serde.workspace = true
serde_json.workspace = true
starknet.workspace = true
Expand Down
275 changes: 275 additions & 0 deletions contracts/cairo0/kkrt.abi.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,275 @@
[
{
"data": [
{
"name": "evm_contract_address",
"type": "felt"
},
{
"name": "starknet_contract_address",
"type": "felt"
}
],
"keys": [],
"name": "evm_contract_deployed",
"type": "event"
},
{
"data": [
{
"name": "previousOwner",
"type": "felt"
},
{
"name": "newOwner",
"type": "felt"
}
],
"keys": [],
"name": "OwnershipTransferred",
"type": "event"
},
{
"inputs": [
{
"name": "owner",
"type": "felt"
},
{
"name": "native_token_address_",
"type": "felt"
},
{
"name": "contract_account_class_hash_",
"type": "felt"
},
{
"name": "externally_owned_account_class_hash",
"type": "felt"
},
{
"name": "account_proxy_class_hash",
"type": "felt"
},
{
"name": "deploy_fee",
"type": "felt"
}
],
"name": "constructor",
"outputs": [],
"type": "constructor"
},
{
"inputs": [
{
"name": "blockhash_registry_address_",
"type": "felt"
}
],
"name": "set_blockhash_registry",
"outputs": [],
"type": "function"
},
{
"inputs": [],
"name": "get_blockhash_registry",
"outputs": [
{
"name": "address",
"type": "felt"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"name": "native_token_address_",
"type": "felt"
}
],
"name": "set_native_token",
"outputs": [],
"type": "function"
},
{
"inputs": [],
"name": "get_native_token",
"outputs": [
{
"name": "native_token_address",
"type": "felt"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"name": "deploy_fee_",
"type": "felt"
}
],
"name": "set_deploy_fee",
"outputs": [],
"type": "function"
},
{
"inputs": [],
"name": "get_deploy_fee",
"outputs": [
{
"name": "deploy_fee",
"type": "felt"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"name": "evm_address",
"type": "felt"
}
],
"name": "compute_starknet_address",
"outputs": [
{
"name": "contract_address",
"type": "felt"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"name": "evm_address",
"type": "felt"
}
],
"name": "get_starknet_address",
"outputs": [
{
"name": "starknet_address",
"type": "felt"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"name": "evm_address",
"type": "felt"
}
],
"name": "deploy_externally_owned_account",
"outputs": [
{
"name": "starknet_contract_address",
"type": "felt"
}
],
"type": "function"
},
{
"inputs": [
{
"name": "origin",
"type": "felt"
},
{
"name": "to",
"type": "felt"
},
{
"name": "gas_limit",
"type": "felt"
},
{
"name": "gas_price",
"type": "felt"
},
{
"name": "value",
"type": "felt"
},
{
"name": "data_len",
"type": "felt"
},
{
"name": "data",
"type": "felt*"
}
],
"name": "eth_call",
"outputs": [
{
"name": "return_data_len",
"type": "felt"
},
{
"name": "return_data",
"type": "felt*"
},
{
"name": "success",
"type": "felt"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"name": "to",
"type": "felt"
},
{
"name": "gas_limit",
"type": "felt"
},
{
"name": "gas_price",
"type": "felt"
},
{
"name": "value",
"type": "felt"
},
{
"name": "data_len",
"type": "felt"
},
{
"name": "data",
"type": "felt*"
}
],
"name": "eth_send_transaction",
"outputs": [
{
"name": "return_data_len",
"type": "felt"
},
{
"name": "return_data",
"type": "felt*"
},
{
"name": "success",
"type": "felt"
}
],
"type": "function"
}
]
Loading

0 comments on commit ddc1340

Please sign in to comment.