Skip to content

Commit

Permalink
Merge pull request #17 from push-protocol/audit/issue-9,10
Browse files Browse the repository at this point in the history
Audit Issue 9, 10: updated oz to 0.19.0 and scarb version to 2.8.4
  • Loading branch information
0xNilesh authored Nov 20, 2024
2 parents 446f65d + d22ced2 commit be79d28
Show file tree
Hide file tree
Showing 3 changed files with 108 additions and 17 deletions.
105 changes: 103 additions & 2 deletions Scarb.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,109 @@ version = 1

[[package]]
name = "openzeppelin"
version = "0.15.0-rc.0"
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?rev=49816b6763fea500396a97b5178c3e30a85eecc7#49816b6763fea500396a97b5178c3e30a85eecc7"
version = "0.19.0"
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?rev=8d49e8c445efd9bdc99b050c8b7d11ae5ad19628#8d49e8c445efd9bdc99b050c8b7d11ae5ad19628"
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.19.0"
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?rev=8d49e8c445efd9bdc99b050c8b7d11ae5ad19628#8d49e8c445efd9bdc99b050c8b7d11ae5ad19628"
dependencies = [
"openzeppelin_introspection",
"openzeppelin_utils",
]

[[package]]
name = "openzeppelin_account"
version = "0.19.0"
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?rev=8d49e8c445efd9bdc99b050c8b7d11ae5ad19628#8d49e8c445efd9bdc99b050c8b7d11ae5ad19628"
dependencies = [
"openzeppelin_introspection",
"openzeppelin_utils",
]

[[package]]
name = "openzeppelin_finance"
version = "0.19.0"
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?rev=8d49e8c445efd9bdc99b050c8b7d11ae5ad19628#8d49e8c445efd9bdc99b050c8b7d11ae5ad19628"
dependencies = [
"openzeppelin_access",
"openzeppelin_token",
]

[[package]]
name = "openzeppelin_governance"
version = "0.19.0"
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?rev=8d49e8c445efd9bdc99b050c8b7d11ae5ad19628#8d49e8c445efd9bdc99b050c8b7d11ae5ad19628"
dependencies = [
"openzeppelin_access",
"openzeppelin_account",
"openzeppelin_introspection",
"openzeppelin_token",
]

[[package]]
name = "openzeppelin_introspection"
version = "0.19.0"
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?rev=8d49e8c445efd9bdc99b050c8b7d11ae5ad19628#8d49e8c445efd9bdc99b050c8b7d11ae5ad19628"

[[package]]
name = "openzeppelin_merkle_tree"
version = "0.19.0"
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?rev=8d49e8c445efd9bdc99b050c8b7d11ae5ad19628#8d49e8c445efd9bdc99b050c8b7d11ae5ad19628"

[[package]]
name = "openzeppelin_presets"
version = "0.19.0"
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?rev=8d49e8c445efd9bdc99b050c8b7d11ae5ad19628#8d49e8c445efd9bdc99b050c8b7d11ae5ad19628"
dependencies = [
"openzeppelin_access",
"openzeppelin_account",
"openzeppelin_finance",
"openzeppelin_introspection",
"openzeppelin_token",
"openzeppelin_upgrades",
"openzeppelin_utils",
]

[[package]]
name = "openzeppelin_security"
version = "0.19.0"
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?rev=8d49e8c445efd9bdc99b050c8b7d11ae5ad19628#8d49e8c445efd9bdc99b050c8b7d11ae5ad19628"

[[package]]
name = "openzeppelin_token"
version = "0.19.0"
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?rev=8d49e8c445efd9bdc99b050c8b7d11ae5ad19628#8d49e8c445efd9bdc99b050c8b7d11ae5ad19628"
dependencies = [
"openzeppelin_access",
"openzeppelin_account",
"openzeppelin_introspection",
"openzeppelin_utils",
]

[[package]]
name = "openzeppelin_upgrades"
version = "0.19.0"
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?rev=8d49e8c445efd9bdc99b050c8b7d11ae5ad19628#8d49e8c445efd9bdc99b050c8b7d11ae5ad19628"

[[package]]
name = "openzeppelin_utils"
version = "0.19.0"
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?rev=8d49e8c445efd9bdc99b050c8b7d11ae5ad19628#8d49e8c445efd9bdc99b050c8b7d11ae5ad19628"

[[package]]
name = "push_comm"
Expand Down
8 changes: 4 additions & 4 deletions Scarb.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[package]
name = "push_comm"
version = "0.1.0"
edition = "2023_11"
scarb-version = "2.7.0-rc.4"
edition = "2024_07"
scarb-version = "2.8.4"

# See more keys and their definitions at https://docs.swmansion.com/scarb/docs/reference/manifest.html

[dependencies]
starknet = "2.7.0-rc.3"
openzeppelin = { git = "https://github.com/OpenZeppelin/cairo-contracts.git", rev="49816b6763fea500396a97b5178c3e30a85eecc7" }
starknet = "2.8.4"
openzeppelin = { git = "https://github.com/OpenZeppelin/cairo-contracts.git", rev="8d49e8c445efd9bdc99b050c8b7d11ae5ad19628" } # oz release-v0.19.0

[dev-dependencies]
snforge_std = { git = "https://github.com/foundry-rs/starknet-foundry", tag = "v0.27.0" }
Expand Down
12 changes: 1 addition & 11 deletions src/lib.cairo
Original file line number Diff line number Diff line change
@@ -1,27 +1,17 @@
pub mod interface;

use starknet::{ContractAddress};
pub use interface::IPushComm;


#[starknet::contract]
pub mod PushComm {
use push_comm::IPushComm;
use core::traits::TryInto;
use core::serde::Serde;
use core::box::BoxTrait;
use core::clone::Clone;
use core::num::traits::zero::Zero;
use core::starknet::event::EventEmitter;
use core::starknet::storage::MutableStorageNode;
use core::starknet::storage::StoragePointerReadAccess;
use core::starknet::storage::StoragePathEntry;
use core::starknet::storage::StoragePointerWriteAccess;
use starknet::storage::{Map, StorageMapReadAccess, StorageMapWriteAccess};
use starknet::storage::{Map, StorageMapWriteAccess};
use starknet::{ContractAddress, get_caller_address, EthAddress, contract_address_const};
use starknet::{get_execution_info};
use starknet::ClassHash;
use openzeppelin::access::ownable::interface::OwnableABI;
use openzeppelin::access::ownable::OwnableComponent;
use openzeppelin::upgrades::UpgradeableComponent;
use openzeppelin::upgrades::interface::IUpgradeable;
Expand Down

0 comments on commit be79d28

Please sign in to comment.