-
Notifications
You must be signed in to change notification settings - Fork 311
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
886 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
scarb 2.8.3 | ||
starknet-foundry 0.31.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
# Code generated by scarb DO NOT EDIT. | ||
version = 1 | ||
|
||
[[package]] | ||
name = "openzeppelin" | ||
version = "0.17.0" | ||
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.17.0#bf5d02c25c989ccc24f3ab42ec649617d3f21289" | ||
dependencies = [ | ||
"openzeppelin_access", | ||
"openzeppelin_account", | ||
"openzeppelin_finance", | ||
"openzeppelin_governance", | ||
"openzeppelin_introspection", | ||
"openzeppelin_merkle_tree", | ||
"openzeppelin_presets", | ||
"openzeppelin_security", | ||
"openzeppelin_token", | ||
"openzeppelin_upgrades", | ||
"openzeppelin_utils", | ||
] | ||
|
||
[[package]] | ||
name = "openzeppelin_access" | ||
version = "0.17.0" | ||
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.17.0#bf5d02c25c989ccc24f3ab42ec649617d3f21289" | ||
dependencies = [ | ||
"openzeppelin_introspection", | ||
"openzeppelin_utils", | ||
] | ||
|
||
[[package]] | ||
name = "openzeppelin_account" | ||
version = "0.17.0" | ||
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.17.0#bf5d02c25c989ccc24f3ab42ec649617d3f21289" | ||
dependencies = [ | ||
"openzeppelin_introspection", | ||
"openzeppelin_utils", | ||
] | ||
|
||
[[package]] | ||
name = "openzeppelin_finance" | ||
version = "0.17.0" | ||
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.17.0#bf5d02c25c989ccc24f3ab42ec649617d3f21289" | ||
dependencies = [ | ||
"openzeppelin_access", | ||
"openzeppelin_token", | ||
] | ||
|
||
[[package]] | ||
name = "openzeppelin_governance" | ||
version = "0.17.0" | ||
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.17.0#bf5d02c25c989ccc24f3ab42ec649617d3f21289" | ||
dependencies = [ | ||
"openzeppelin_access", | ||
"openzeppelin_introspection", | ||
] | ||
|
||
[[package]] | ||
name = "openzeppelin_introspection" | ||
version = "0.17.0" | ||
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.17.0#bf5d02c25c989ccc24f3ab42ec649617d3f21289" | ||
|
||
[[package]] | ||
name = "openzeppelin_merkle_tree" | ||
version = "0.17.0" | ||
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.17.0#bf5d02c25c989ccc24f3ab42ec649617d3f21289" | ||
|
||
[[package]] | ||
name = "openzeppelin_presets" | ||
version = "0.17.0" | ||
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.17.0#bf5d02c25c989ccc24f3ab42ec649617d3f21289" | ||
dependencies = [ | ||
"openzeppelin_access", | ||
"openzeppelin_account", | ||
"openzeppelin_finance", | ||
"openzeppelin_introspection", | ||
"openzeppelin_token", | ||
"openzeppelin_upgrades", | ||
] | ||
|
||
[[package]] | ||
name = "openzeppelin_security" | ||
version = "0.17.0" | ||
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.17.0#bf5d02c25c989ccc24f3ab42ec649617d3f21289" | ||
|
||
[[package]] | ||
name = "openzeppelin_token" | ||
version = "0.17.0" | ||
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.17.0#bf5d02c25c989ccc24f3ab42ec649617d3f21289" | ||
dependencies = [ | ||
"openzeppelin_account", | ||
"openzeppelin_governance", | ||
"openzeppelin_introspection", | ||
] | ||
|
||
[[package]] | ||
name = "openzeppelin_upgrades" | ||
version = "0.17.0" | ||
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.17.0#bf5d02c25c989ccc24f3ab42ec649617d3f21289" | ||
|
||
[[package]] | ||
name = "openzeppelin_utils" | ||
version = "0.17.0" | ||
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.17.0#bf5d02c25c989ccc24f3ab42ec649617d3f21289" | ||
|
||
[[package]] | ||
name = "protocol_handler" | ||
version = "0.1.0" | ||
dependencies = [ | ||
"openzeppelin", | ||
"snforge_std", | ||
] | ||
|
||
[[package]] | ||
name = "snforge_scarb_plugin" | ||
version = "0.31.0" | ||
source = "git+https://github.com/foundry-rs/starknet-foundry.git?tag=v0.31.0#72ea785ca354e9e506de3e5d687da9fb2c1b3c67" | ||
|
||
[[package]] | ||
name = "snforge_std" | ||
version = "0.31.0" | ||
source = "git+https://github.com/foundry-rs/starknet-foundry.git?tag=v0.31.0#72ea785ca354e9e506de3e5d687da9fb2c1b3c67" | ||
dependencies = [ | ||
"snforge_scarb_plugin", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
[package] | ||
name = "protocol_handler" | ||
version = "0.1.0" | ||
edition = "2023_10" | ||
|
||
# See more keys and their definitions at https://docs.swmansion.com/scarb/docs/reference/manifest.html | ||
|
||
[dependencies] | ||
starknet = "2.8.2" | ||
openzeppelin = { git = "https://github.com/OpenZeppelin/cairo-contracts.git", tag = "v0.17.0" } | ||
|
||
[dev-dependencies] | ||
snforge_std = { git = "https://github.com/foundry-rs/starknet-foundry.git", tag = "v0.31.0" } | ||
|
||
[[target.starknet-contract]] | ||
casm = true | ||
casm-add-pythonic-hints = true | ||
|
||
[scripts] | ||
test = "snforge test --max-n-steps 4294967295" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
use starknet::account::Call; | ||
use starknet::{ContractAddress, ClassHash, EthAddress}; | ||
|
||
#[starknet::interface] | ||
pub trait IKakarot<TContractState> { | ||
//* ------------------------------------------------------------------------ *// | ||
//* ADMIN FUNCTIONS *// | ||
//* ------------------------------------------------------------------------ *// | ||
fn upgrade(ref self: TContractState, new_class_hash: ClassHash); | ||
fn transfer_ownership(ref self: TContractState, new_owner: ContractAddress); | ||
fn pause(ref self: TContractState); | ||
fn unpause(ref self: TContractState); | ||
|
||
//* ------------------------------------------------------------------------ *// | ||
//* STORAGE SETTING FUNCTIONS *// | ||
//* ------------------------------------------------------------------------ *// | ||
fn set_native_token(ref self: TContractState, native_token: ContractAddress); | ||
fn set_base_fee(ref self: TContractState, base_fee: u64); | ||
fn set_coinbase(ref self: TContractState, new_coinbase: ContractAddress); | ||
fn set_prev_randao(ref self: TContractState, pre_randao: felt252); | ||
fn set_block_gas_limit(ref self: TContractState, new_block_gas_limit: felt252); | ||
fn set_account_contract_class_hash(ref self: TContractState, new_class_hash: felt252); | ||
fn set_uninitialized_account_class_hash(ref self: TContractState, new_class_hash: felt252); | ||
fn set_authorized_cairo_precompile_caller( | ||
ref self: TContractState, evm_address: ContractAddress, authorized: bool | ||
); | ||
fn set_cairo1_helpers_class_hash(ref self: TContractState, new_class_hash: felt252); | ||
fn upgrade_account(ref self: TContractState, evm_address: ContractAddress, new_class: felt252); | ||
fn set_authorized_pre_eip155_tx( | ||
ref self: TContractState, sender_address: ContractAddress, msg_hash: felt252 | ||
); | ||
fn set_l1_messaging_contract_address( | ||
ref self: TContractState, l1_messaging_contract_address: ContractAddress | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
mod protocol_handler; | ||
pub use protocol_handler::{ | ||
ProtocolHandler, IProtocolHandler, IProtocolHandlerDispatcher, IProtocolHandlerDispatcherTrait | ||
}; | ||
|
||
mod kakarot_interface; |
Oops, something went wrong.