Skip to content

Commit

Permalink
Merge pull request #64 from dusk-network/remove-code-hasher-63
Browse files Browse the repository at this point in the history
Remove code hasher
  • Loading branch information
miloszm authored Nov 30, 2023
2 parents 8642ab2 + 01cda3b commit b99c568
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 630 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[workspace]
members = ["moat-cli/moat-cli-common", "moat-cli/moat-cli-user", "moat-cli/moat-cli-lp", "moat-cli/moat-cli-sp", "moat-core", "integration-tests", "macros/code-hasher", "moat-example"]
members = ["moat-cli/moat-cli-common", "moat-cli/moat-cli-user", "moat-cli/moat-cli-lp", "moat-cli/moat-cli-sp", "moat-core", "integration-tests", "moat-example"]
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,18 @@ const PWD_HASH: &str =
const GAS_LIMIT: u64 = 5_000_000_000;
const GAS_PRICE: u64 = 1;

pub const STAKE_CONTRACT_ID: ModuleId = {
pub const LICENSE_CONTRACT_ID: ModuleId = {
let mut bytes = [0u8; 32];
bytes[0] = 0x02;
bytes[0] = 0x03;
bytes
};
pub const ADD_OWNER_METHOD_NAME: &str = "add_owner";
// note that any method can be used here as long as it does not require
// arguments
pub const CONTRACT_METHOD_NAME: &str = "request_license";

#[tokio::test(flavor = "multi_thread")]
#[cfg_attr(not(feature = "int_tests"), ignore)]
async fn stake_add_owner() -> Result<(), Error> {
async fn contract_call_with_payload() -> Result<(), Error> {
let blockchain_config_path =
concat!(env!("CARGO_MANIFEST_DIR"), "/config.toml");

Expand All @@ -46,14 +48,16 @@ async fn stake_add_owner() -> Result<(), Error> {
);

let tx_id = PayloadSender::execute_contract_method(
// any payload will do as long as the called method does not require
// arguments
request_json.provider_psk,
&blockchain_config,
&wallet_path,
&PwdHash(PWD_HASH.to_string()),
GAS_LIMIT,
GAS_PRICE,
STAKE_CONTRACT_ID,
ADD_OWNER_METHOD_NAME,
LICENSE_CONTRACT_ID,
CONTRACT_METHOD_NAME,
)
.await?;
let client = RuskHttpClient::new(blockchain_config.rusk_address.clone());
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/tests/blockchain/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
//
// Copyright (c) DUSK NETWORK. All rights reserved.

mod contract_call;
mod get_crs;
mod retrieve_txs;
mod stake_add_owner;
23 changes: 0 additions & 23 deletions macros/code-hasher/Cargo.toml

This file was deleted.

Loading

0 comments on commit b99c568

Please sign in to comment.