Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update rc2 compilation #275

Merged
merged 1 commit into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions client/balance_of_session/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ version = "1.5.1"
edition = "2021"

[dependencies]
casper-contract = { git = "https://github.com/casper-network/casper-node.git", branch = "release-2.0.0-rc1"}
casper-types = { git = "https://github.com/casper-network/casper-node.git", branch = "release-2.0.0-rc1"}
casper-contract = { git = "https://github.com/casper-network/casper-node.git", branch = "release-2.0.0-rc2" }
casper-types = { git = "https://github.com/casper-network/casper-node.git", branch = "release-2.0.0-rc2" }

[[bin]]
name = "balance_of_call"
Expand Down
4 changes: 2 additions & 2 deletions client/get_approved_session/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ version = "1.5.1"
edition = "2021"

[dependencies]
casper-contract = { git = "https://github.com/casper-network/casper-node.git", branch = "release-2.0.0-rc1"}
casper-types = { git = "https://github.com/casper-network/casper-node.git", branch = "release-2.0.0-rc1"}
casper-contract = { git = "https://github.com/casper-network/casper-node.git", branch = "release-2.0.0-rc2" }
casper-types = { git = "https://github.com/casper-network/casper-node.git", branch = "release-2.0.0-rc2" }

[[bin]]
name = "get_approved_call"
Expand Down
4 changes: 2 additions & 2 deletions client/is_approved_for_all_session/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ version = "1.5.1"
edition = "2021"

[dependencies]
casper-contract = { git = "https://github.com/casper-network/casper-node.git", branch = "release-2.0.0-rc1"}
casper-types = { git = "https://github.com/casper-network/casper-node.git", branch = "release-2.0.0-rc1"}
casper-contract = { git = "https://github.com/casper-network/casper-node.git", branch = "release-2.0.0-rc2" }
casper-types = { git = "https://github.com/casper-network/casper-node.git", branch = "release-2.0.0-rc2" }

[[bin]]
name = "is_approved_for_all_call"
Expand Down
4 changes: 2 additions & 2 deletions client/mint_session/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ version = "1.5.1"
edition = "2021"

[dependencies]
casper-contract = { git = "https://github.com/casper-network/casper-node.git", branch = "release-2.0.0-rc1"}
casper-types = { git = "https://github.com/casper-network/casper-node.git", branch = "release-2.0.0-rc1"}
casper-contract = { git = "https://github.com/casper-network/casper-node.git", branch = "release-2.0.0-rc2" }
casper-types = { git = "https://github.com/casper-network/casper-node.git", branch = "release-2.0.0-rc2" }

[[bin]]
name = "mint_call"
Expand Down
4 changes: 2 additions & 2 deletions client/owner_of_session/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ version = "1.5.1"
edition = "2021"

[dependencies]
casper-contract = { git = "https://github.com/casper-network/casper-node.git", branch = "release-2.0.0-rc1"}
casper-types = { git = "https://github.com/casper-network/casper-node.git", branch = "release-2.0.0-rc1"}
casper-contract = { git = "https://github.com/casper-network/casper-node.git", branch = "release-2.0.0-rc2" }
casper-types = { git = "https://github.com/casper-network/casper-node.git", branch = "release-2.0.0-rc2" }

[[bin]]
name = "owner_of_call"
Expand Down
4 changes: 2 additions & 2 deletions client/transfer_session/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
casper-contract = { git = "https://github.com/casper-network/casper-node.git", branch = "release-2.0.0-rc1"}
casper-types = { git = "https://github.com/casper-network/casper-node.git", branch = "release-2.0.0-rc1"}
casper-contract = { git = "https://github.com/casper-network/casper-node.git", branch = "release-2.0.0-rc2" }
casper-types = { git = "https://github.com/casper-network/casper-node.git", branch = "release-2.0.0-rc2" }

[[bin]]
name = "transfer_call"
Expand Down
4 changes: 2 additions & 2 deletions client/updated_receipts/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
casper-contract = { git = "https://github.com/casper-network/casper-node.git", branch = "release-2.0.0-rc1"}
casper-types = { git = "https://github.com/casper-network/casper-node.git", branch = "release-2.0.0-rc1"}
casper-contract = { git = "https://github.com/casper-network/casper-node.git", branch = "release-2.0.0-rc2" }
casper-types = { git = "https://github.com/casper-network/casper-node.git", branch = "release-2.0.0-rc2" }

[[bin]]
name = "updated_receipts"
Expand Down
4 changes: 2 additions & 2 deletions contract/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ version = "1.5.1"
edition = "2021"

[dependencies]
casper-contract = { git = "https://github.com/casper-network/casper-node.git", branch = "release-2.0.0-rc1", default-features = false, optional = true}
casper-types = { git = "https://github.com/casper-network/casper-node.git", branch = "release-2.0.0-rc1", default-features = false}
casper-contract = { git = "https://github.com/casper-network/casper-node.git", branch = "release-2.0.0-rc2", default-features = false, optional = true }
casper-types = { git = "https://github.com/casper-network/casper-node.git", branch = "release-2.0.0-rc2", default-features = false }
serde = { version = "1.0.80", default-features = false }
serde_json = { version = "1.0.59", default-features = false }
serde-json-wasm = { version = "0.5.1", default-features = false }
Expand Down
21 changes: 19 additions & 2 deletions contract/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ use casper_contract::{
use casper_types::{
addressable_entity::NamedKeys,
contracts::{ContractHash, ContractPackageHash},
runtime_args, CLType, CLValue, EntryPoint, EntryPointAccess, EntryPointType, EntryPoints, Key,
KeyTag, PackageHash, Parameter, RuntimeArgs, Tagged,
runtime_args, CLType, CLValue, EntryPoint, EntryPointAccess, EntryPointPayment, EntryPointType,
EntryPoints, Key, KeyTag, PackageHash, Parameter, RuntimeArgs, Tagged,
};
use constants::{
ACCESS_KEY_NAME_1_0_0, ACL_PACKAGE_MODE, ACL_WHITELIST, ALLOW_MINTING, APPROVED,
Expand Down Expand Up @@ -2260,6 +2260,7 @@ fn generate_entry_points() -> EntryPoints {
CLType::Unit,
EntryPointAccess::Public,
EntryPointType::Called,
EntryPointPayment::Caller,
);

// This entrypoint exposes all variables that can be changed by managing account post
Expand Down Expand Up @@ -2288,6 +2289,7 @@ fn generate_entry_points() -> EntryPoints {
CLType::Unit,
EntryPointAccess::Public,
EntryPointType::Called,
EntryPointPayment::Caller,
);

// This entrypoint mints a new token with provided metadata.
Expand Down Expand Up @@ -2317,6 +2319,7 @@ fn generate_entry_points() -> EntryPoints {
]),
EntryPointAccess::Public,
EntryPointType::Called,
EntryPointPayment::Caller,
);

// This entrypoint burns the token with provided token_id argument, after which it is no
Expand All @@ -2331,6 +2334,7 @@ fn generate_entry_points() -> EntryPoints {
CLType::Unit,
EntryPointAccess::Public,
EntryPointType::Called,
EntryPointPayment::Caller,
);

// This entrypoint transfers ownership of token from one account to another.
Expand All @@ -2346,6 +2350,7 @@ fn generate_entry_points() -> EntryPoints {
CLType::Tuple2([Box::new(CLType::String), Box::new(CLType::Key)]),
EntryPointAccess::Public,
EntryPointType::Called,
EntryPointPayment::Caller,
);

// This entrypoint approves another token holder (an approved account) to transfer tokens. It
Expand All @@ -2357,6 +2362,7 @@ fn generate_entry_points() -> EntryPoints {
CLType::Unit,
EntryPointAccess::Public,
EntryPointType::Called,
EntryPointPayment::Caller,
);

// This entrypoint revokes an approved account to transfer tokens. It reverts
Expand All @@ -2368,6 +2374,7 @@ fn generate_entry_points() -> EntryPoints {
CLType::Unit,
EntryPointAccess::Public,
EntryPointType::Called,
EntryPointPayment::Caller,
);

// This entrypoint approves all tokens owned by the caller and future to another token holder
Expand All @@ -2382,6 +2389,7 @@ fn generate_entry_points() -> EntryPoints {
CLType::Unit,
EntryPointAccess::Public,
EntryPointType::Called,
EntryPointPayment::Caller,
);

// This entrypoint returns if an account is operator for a token owner
Expand All @@ -2394,6 +2402,7 @@ fn generate_entry_points() -> EntryPoints {
CLType::Bool,
EntryPointAccess::Public,
EntryPointType::Called,
EntryPointPayment::Caller,
);

// This entrypoint returns the token owner given a token_id. It reverts if token_id
Expand All @@ -2404,6 +2413,7 @@ fn generate_entry_points() -> EntryPoints {
CLType::Key,
EntryPointAccess::Public,
EntryPointType::Called,
EntryPointPayment::Caller,
);

// This entrypoint returns the approved account (if any) associated with the provided token_id
Expand All @@ -2414,6 +2424,7 @@ fn generate_entry_points() -> EntryPoints {
CLType::Option(Box::new(CLType::Key)),
EntryPointAccess::Public,
EntryPointType::Called,
EntryPointPayment::Caller,
);

// This entrypoint returns number of owned tokens associated with the provided token holder
Expand All @@ -2423,6 +2434,7 @@ fn generate_entry_points() -> EntryPoints {
CLType::U64,
EntryPointAccess::Public,
EntryPointType::Called,
EntryPointPayment::Caller,
);

// This entrypoint returns the metadata associated with the provided token_id
Expand All @@ -2432,6 +2444,7 @@ fn generate_entry_points() -> EntryPoints {
CLType::String,
EntryPointAccess::Public,
EntryPointType::Called,
EntryPointPayment::Caller,
);

// This entrypoint updates the metadata if valid.
Expand All @@ -2441,6 +2454,7 @@ fn generate_entry_points() -> EntryPoints {
CLType::Unit,
EntryPointAccess::Public,
EntryPointType::Called,
EntryPointPayment::Caller,
);

// This entrypoint will upgrade the contract from the 1_0 version to the
Expand All @@ -2460,6 +2474,7 @@ fn generate_entry_points() -> EntryPoints {
CLType::Unit,
EntryPointAccess::Public,
EntryPointType::Called,
EntryPointPayment::Caller,
);

// This entrypoint will allow NFT owners to update their receipts from
Expand All @@ -2475,6 +2490,7 @@ fn generate_entry_points() -> EntryPoints {
]))),
EntryPointAccess::Public,
EntryPointType::Called,
EntryPointPayment::Caller,
);

// This entrypoint allows users to register with a give CEP-78 instance,
Expand All @@ -2489,6 +2505,7 @@ fn generate_entry_points() -> EntryPoints {
CLType::Tuple2([Box::new(CLType::String), Box::new(CLType::URef)]),
EntryPointAccess::Public,
EntryPointType::Called,
EntryPointPayment::Caller,
);

entry_points.add_entry_point(init_contract);
Expand Down
4 changes: 2 additions & 2 deletions test-contracts/mangle_named_keys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
casper-contract = "3.0.0"
casper-types = "3.0.0"
casper-contract = { git = "https://github.com/casper-network/casper-node.git", branch = "release-2.0.0-rc2" }
casper-types = { git = "https://github.com/casper-network/casper-node.git", branch = "release-2.0.0-rc2" }

[[bin]]
name = "mangle_named_keys"
Expand Down
4 changes: 2 additions & 2 deletions test-contracts/minting_contract/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
casper-contract = "4.0.0"
casper-types = "4.0.1"
casper-contract = { git = "https://github.com/casper-network/casper-node.git", branch = "release-2.0.0-rc2" }
casper-types = { git = "https://github.com/casper-network/casper-node.git", branch = "release-2.0.0-rc2" }

[[bin]]
name = "minting_contract"
Expand Down
Loading