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

Remove code hasher #64

Merged
merged 2 commits into from
Nov 30, 2023
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
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