Skip to content

Commit

Permalink
refactor(renaming): replace reference of okp4 in docs and test law-stone
Browse files Browse the repository at this point in the history
  • Loading branch information
bdeneux committed May 14, 2024
1 parent 0634c2b commit eebad56
Show file tree
Hide file tree
Showing 10 changed files with 53 additions and 53 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause License

Copyright (c) 2021, OKP4.com
Copyright (c) 2021, AXONE.com
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion contracts/axone-dataverse/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
authors = ["OKP4"]
authors = ["AXONE"]
edition = "2021"
name = "axone-dataverse"
rust-version = "1.75"
Expand Down
2 changes: 1 addition & 1 deletion contracts/axone-law-stone/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
authors = ["OKP4"]
authors = ["AXONE"]
edition = "2021"
name = "axone-law-stone"
rust-version = "1.75"
Expand Down
48 changes: 24 additions & 24 deletions contracts/axone-law-stone/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -346,14 +346,14 @@ mod tests {

let msg = InstantiateMsg {
program: program.clone(),
storage_address: "okp41ffzp0xmjhwkltuxcvccl0z9tyfuu7txp5ke0tpkcjpzuq9fcj3pqrteqt3"
storage_address: "axone1ffzp0xmjhwkltuxcvccl0z9tyfuu7txp5ke0tpkcjpzuq9fcj3pq85yqlv"
.to_string(),
};
let info = mock_info("creator", &[]);

let res = instantiate(deps.as_mut(), mock_env(), info, msg).unwrap();

// Check if a message is send to the okp4-objectarium to store the logic program.
// Check if a message is send to the axone-objectarium to store the logic program.
assert_eq!(1, res.messages.len());
let sub_msg = res.messages.first().unwrap();
assert_eq!(STORE_PROGRAM_REPLY_ID, sub_msg.id);
Expand All @@ -379,7 +379,7 @@ mod tests {
_ => panic!("cosmos sub message should be a Wasm message execute"),
}
assert_eq!(
"okp41ffzp0xmjhwkltuxcvccl0z9tyfuu7txp5ke0tpkcjpzuq9fcj3pqrteqt3".to_string(),
"axone1ffzp0xmjhwkltuxcvccl0z9tyfuu7txp5ke0tpkcjpzuq9fcj3pq85yqlv".to_string(),
INSTANTIATE_CONTEXT.load(&deps.storage).unwrap()
);
}
Expand All @@ -392,7 +392,7 @@ mod tests {
let object_id =
"4cbe36399aabfcc7158ee7a66cbfffa525bb0ceab33d1ff2cff08759fe0a9b05".to_string();
let storage_addr =
"okp41ffzp0xmjhwkltuxcvccl0z9tyfuu7txp5ke0tpkcjpzuq9fcj3pqrteqt3".to_string();
"axone1ffzp0xmjhwkltuxcvccl0z9tyfuu7txp5ke0tpkcjpzuq9fcj3pq85yqlv".to_string();
PROGRAM
.save(
deps.as_mut().storage,
Expand All @@ -415,7 +415,7 @@ mod tests {

#[test]
fn program_code() {
const CONTRACT_ID: &str = "okp41ffzp0xmjhwkltuxcvccl0z9tyfuu7txp5ke0tpkcjpzuq9fcj3pqrteqt3";
const CONTRACT_ID: &str = "axone1ffzp0xmjhwkltuxcvccl0z9tyfuu7txp5ke0tpkcjpzuq9fcj3pq85yqlv";
const OBJECT_ID: &str = "4cbe36399aabfcc7158ee7a66cbfffa525bb0ceab33d1ff2cff08759fe0a9b05";
const A_PROGRAM: &str = "foo(_) :- true.";

Expand Down Expand Up @@ -508,7 +508,7 @@ mod tests {
object_id: "4cbe36399aabfcc7158ee7a66cbfffa525bb0ceab33d1ff2cff08759fe0a9b05"
.to_string(),
storage_address:
"okp41ffzp0xmjhwkltuxcvccl0z9tyfuu7txp5ke0tpkcjpzuq9fcj3pqrteqt3"
"axone1ffzp0xmjhwkltuxcvccl0z9tyfuu7txp5ke0tpkcjpzuq9fcj3pq85yqlv"
.to_string(),
},
Some(AskResponse {
Expand Down Expand Up @@ -536,7 +536,7 @@ mod tests {
object_id: "4cbe36399aabfcc7158ee7a66cbfffa525bb0ceab33d1ff2cff08759fe0a9b05"
.to_string(),
storage_address:
"okp41ffzp0xmjhwkltuxcvccl0z9tyfuu7txp5ke0tpkcjpzuq9fcj3pqrteqt3"
"axone1ffzp0xmjhwkltuxcvccl0z9tyfuu7txp5ke0tpkcjpzuq9fcj3pq85yqlv"
.to_string(),
},
Some(AskResponse {
Expand Down Expand Up @@ -616,8 +616,8 @@ mod tests {
StoreTestCase {
dependencies: vec![
(
"cosmwasm:okp41dclchlcttf2uektxyryg0c6yau63eml5q9uq03myg44ml8cxpxnqavca4s?query=%7B%22object_data%22%3A%7B%22id%22%3A%20%224cbe36399aabfcc7158ee7a66cbfffa525bb0ceab33d1ff2cff08759fe0a9b05%22%7D%7D".to_string(),
"okp41dclchlcttf2uektxyryg0c6yau63eml5q9uq03myg44ml8cxpxnqavca4s".to_string(),
"cosmwasm:axone1dclchlcttf2uektxyryg0c6yau63eml5q9uq03myg44ml8cxpxnqen9apd?query=%7B%22object_data%22%3A%7B%22id%22%3A%20%224cbe36399aabfcc7158ee7a66cbfffa525bb0ceab33d1ff2cff08759fe0a9b05%22%7D%7D".to_string(),
"axone1dclchlcttf2uektxyryg0c6yau63eml5q9uq03myg44ml8cxpxnqen9apd".to_string(),
"4cbe36399aabfcc7158ee7a66cbfffa525bb0ceab33d1ff2cff08759fe0a9b05".to_string()
),
],
Expand All @@ -632,13 +632,13 @@ mod tests {
StoreTestCase {
dependencies: vec![
(
"cosmwasm:okp41dclchlcttf2uektxyryg0c6yau63eml5q9uq03myg44ml8cxpxnqavca4s?query=%7B%22object_data%22%3A%7B%22id%22%3A%20%224cbe36399aabfcc7158ee7a66cbfffa525bb0ceab33d1ff2cff08759fe0a9b05%22%7D%7D".to_string(),
"okp41dclchlcttf2uektxyryg0c6yau63eml5q9uq03myg44ml8cxpxnqavca4s".to_string(), // contract addr
"cosmwasm:axone1dclchlcttf2uektxyryg0c6yau63eml5q9uq03myg44ml8cxpxnqen9apd?query=%7B%22object_data%22%3A%7B%22id%22%3A%20%224cbe36399aabfcc7158ee7a66cbfffa525bb0ceab33d1ff2cff08759fe0a9b05%22%7D%7D".to_string(),
"axone1dclchlcttf2uektxyryg0c6yau63eml5q9uq03myg44ml8cxpxnqen9apd".to_string(), // contract addr
"4cbe36399aabfcc7158ee7a66cbfffa525bb0ceab33d1ff2cff08759fe0a9b05".to_string() // object id
),
(
"cosmwasm:okp41dclchlcttf2uektxyryg0c6yau63eml5q9uq03myg44ml8cxpxnqavca4s?query=%7B%22object_data%22%3A%7B%22id%22%3A%20%220689c526187c6785dfcce28f8df19138da292598dc19548a852de1792062f271%22%7D%7D".to_string(),
"okp41dclchlcttf2uektxyryg0c6yau63eml5q9uq03myg44ml8cxpxnqavca4s".to_string(), // contract addr
"cosmwasm:axone1dclchlcttf2uektxyryg0c6yau63eml5q9uq03myg44ml8cxpxnqen9apd?query=%7B%22object_data%22%3A%7B%22id%22%3A%20%220689c526187c6785dfcce28f8df19138da292598dc19548a852de1792062f271%22%7D%7D".to_string(),
"axone1dclchlcttf2uektxyryg0c6yau63eml5q9uq03myg44ml8cxpxnqen9apd".to_string(), // contract addr
"0689c526187c6785dfcce28f8df19138da292598dc19548a852de1792062f271".to_string() // object id
),
],
Expand All @@ -662,7 +662,7 @@ mod tests {
ObjectRef {
object_id: program_object_id.clone(),
storage_address:
"okp41dclchlcttf2uektxyryg0c6yau63eml5q9uq03myg44ml8cxpxnqavca4s"
"axone1dclchlcttf2uektxyryg0c6yau63eml5q9uq03myg44ml8cxpxnqen9apd"
.to_string(),
},
request,
Expand All @@ -682,7 +682,7 @@ mod tests {
INSTANTIATE_CONTEXT
.save(
deps.as_mut().storage,
&"okp41dclchlcttf2uektxyryg0c6yau63eml5q9uq03myg44ml8cxpxnqavca4s".to_string(),
&"axone1dclchlcttf2uektxyryg0c6yau63eml5q9uq03myg44ml8cxpxnqen9apd".to_string(),
)
.unwrap();

Expand Down Expand Up @@ -762,7 +762,7 @@ mod tests {

#[test]
fn program_reply_errors() {
let object_id = "okp41dclchlcttf2uektxyryg0c6yau63eml5q9uq03myg44ml8cxpxnqavca4s";
let object_id = "axone1dclchlcttf2uektxyryg0c6yau63eml5q9uq03myg44ml8cxpxnqen9apd";
let cases = vec![
(
Reply {
Expand Down Expand Up @@ -800,7 +800,7 @@ mod tests {
INSTANTIATE_CONTEXT
.save(
deps.as_mut().storage,
&"okp41dclchlcttf2uektxyryg0c6yau63eml5q9uq03myg44ml8cxpxnqavca4s".to_string(),
&"axone1dclchlcttf2uektxyryg0c6yau63eml5q9uq03myg44ml8cxpxnqen9apd".to_string(),
)
.unwrap();

Expand All @@ -815,7 +815,7 @@ mod tests {
let result = reply::build_source_files_query(ObjectRef {
object_id: "1cc6de7672c97db145a3940df2264140ea893c6688fa5ca55b73cb8b68e0574d"
.to_string(),
storage_address: "okp41ffzp0xmjhwkltuxcvccl0z9tyfuu7txp5ke0tpkcjpzuq9fcj3pqrteqt3"
storage_address: "axone1ffzp0xmjhwkltuxcvccl0z9tyfuu7txp5ke0tpkcjpzuq9fcj3pq85yqlv"
.to_string(),
});

Expand All @@ -825,7 +825,7 @@ mod tests {
program,
"source_files(Files) :- bagof(File, source_file(File), Files)."
);
assert_eq!(query, "consult('cosmwasm:axone-objectarium:okp41ffzp0xmjhwkltuxcvccl0z9tyfuu7txp5ke0tpkcjpzuq9fcj3pqrteqt3?query=%7B%22object_data%22%3A%7B%22id%22%3A%221cc6de7672c97db145a3940df2264140ea893c6688fa5ca55b73cb8b68e0574d%22%7D%7D'), source_files(Files).")
assert_eq!(query, "consult('cosmwasm:axone-objectarium:axone1ffzp0xmjhwkltuxcvccl0z9tyfuu7txp5ke0tpkcjpzuq9fcj3pq85yqlv?query=%7B%22object_data%22%3A%7B%22id%22%3A%221cc6de7672c97db145a3940df2264140ea893c6688fa5ca55b73cb8b68e0574d%22%7D%7D'), source_files(Files).")
}
_ => panic!("Expected Ok(LogicCustomQuery)."),
}
Expand All @@ -837,15 +837,15 @@ mod tests {
ObjectRef {
object_id: "1cc6de7672c97db145a3940df2264140ea893c6688fa5ca55b73cb8b68e0574d"
.to_string(),
storage_address: "okp41ffzp0xmjhwkltuxcvccl0z9tyfuu7txp5ke0tpkcjpzuq9fcj3pqrteqt3"
storage_address: "axone1ffzp0xmjhwkltuxcvccl0z9tyfuu7txp5ke0tpkcjpzuq9fcj3pq85yqlv"
.to_string(),
},
"test(X).".to_string(),
);

match result {
Ok(LogicCustomQuery::Ask { program, query }) => {
assert_eq!(program, ":- consult('cosmwasm:axone-objectarium:okp41ffzp0xmjhwkltuxcvccl0z9tyfuu7txp5ke0tpkcjpzuq9fcj3pqrteqt3?query=%7B%22object_data%22%3A%7B%22id%22%3A%221cc6de7672c97db145a3940df2264140ea893c6688fa5ca55b73cb8b68e0574d%22%7D%7D').");
assert_eq!(program, ":- consult('cosmwasm:axone-objectarium:axone1ffzp0xmjhwkltuxcvccl0z9tyfuu7txp5ke0tpkcjpzuq9fcj3pq85yqlv?query=%7B%22object_data%22%3A%7B%22id%22%3A%221cc6de7672c97db145a3940df2264140ea893c6688fa5ca55b73cb8b68e0574d%22%7D%7D').");
assert_eq!(query, "test(X).")
}
_ => panic!("Expected Ok(LogicCustomQuery)."),
Expand Down Expand Up @@ -887,7 +887,7 @@ mod tests {
contract_info.admin = Some("creator".to_string());
SystemResult::Ok(ContractResult::Ok(to_json_binary(&contract_info).unwrap()))
}
WasmQuery::Smart { contract_addr, msg } if contract_addr == "okp4-objectarium1" => {
WasmQuery::Smart { contract_addr, msg } if contract_addr == "axone-objectarium1" => {
match from_json(msg) {
Ok(StorageQuery::ObjectPins {
id,
Expand Down Expand Up @@ -916,7 +916,7 @@ mod tests {
broken: false,
law: ObjectRef {
object_id: "program-id".to_string(),
storage_address: "okp4-objectarium1".to_string(),
storage_address: "axone-objectarium1".to_string(),
},
},
)
Expand Down Expand Up @@ -948,7 +948,7 @@ mod tests {
CosmosMsg::Wasm(WasmMsg::Execute {
contract_addr, msg, ..
}) => {
assert_eq!(contract_addr, "okp4-objectarium1".to_string());
assert_eq!(contract_addr, "axone-objectarium1".to_string());
if case.0 > 1 {
match from_json(&msg) {
Ok(StorageMsg::UnpinObject { id }) => {
Expand Down
10 changes: 5 additions & 5 deletions contracts/axone-law-stone/src/helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,28 +113,28 @@ mod tests {
error: None,
substitutions: vec![Substitution {
variable: "X".to_string(),
expression: "['cosmwasm:okp4-objectarium:okp41ffzp0xmjhwkltuxcvccl0z9tyfuu7txp5ke0tpkcjpzuq9fcj3pqrteqt3?query=%7B%22object_data%22%3A%7B%22id%22%3A%224cbe36399aabfcc7158ee7a66cbfffa525bb0ceab33d1ff2cff08759fe0a9b05%22%7D%7D']".to_string(),
expression: "['cosmwasm:axone-objectarium:axone1ffzp0xmjhwkltuxcvccl0z9tyfuu7txp5ke0tpkcjpzuq9fcj3pq85yqlv?query=%7B%22object_data%22%3A%7B%22id%22%3A%224cbe36399aabfcc7158ee7a66cbfffa525bb0ceab33d1ff2cff08759fe0a9b05%22%7D%7D']".to_string(),
}]
}],
Ok(vec![ObjectRef{
object_id: "4cbe36399aabfcc7158ee7a66cbfffa525bb0ceab33d1ff2cff08759fe0a9b05".to_string(),
storage_address: "okp41ffzp0xmjhwkltuxcvccl0z9tyfuu7txp5ke0tpkcjpzuq9fcj3pqrteqt3".to_string(),
storage_address: "axone1ffzp0xmjhwkltuxcvccl0z9tyfuu7txp5ke0tpkcjpzuq9fcj3pq85yqlv".to_string(),
}])
),
(
vec![axone_logic_bindings::Result {
error: None,
substitutions: vec![Substitution {
variable: "X".to_string(),
expression: "['cosmwasm:okp4-objectarium:okp41ffzp0xmjhwkltuxcvccl0z9tyfuu7txp5ke0tpkcjpzuq9fcj3pqrteqt3?query=%7B%22object_data%22%3A%7B%22id%22%3A%224cbe36399aabfcc7158ee7a66cbfffa525bb0ceab33d1ff2cff08759fe0a9b05%22%7D%7D','cosmwasm:okp4-objectarium:okp41cxmx7su8h5pvqca85cxdylz86uj9x9gu5xuqv34kw87q5x0hexds8w44jg?query=%7B%22object_data%22%3A%7B%22id%22%3A%221485133dd3ab4b1c4b8085e7265585f91ae3cca0996a39e0377a1059296f6aa7%22%7D%7D']".to_string(),
expression: "['cosmwasm:axone-objectarium:axone1ffzp0xmjhwkltuxcvccl0z9tyfuu7txp5ke0tpkcjpzuq9fcj3pq85yqlv?query=%7B%22object_data%22%3A%7B%22id%22%3A%224cbe36399aabfcc7158ee7a66cbfffa525bb0ceab33d1ff2cff08759fe0a9b05%22%7D%7D','cosmwasm:axone-objectarium:axone1cxmx7su8h5pvqca85cxdylz86uj9x9gu5xuqv34kw87q5x0hexdsr3g4x4?query=%7B%22object_data%22%3A%7B%22id%22%3A%221485133dd3ab4b1c4b8085e7265585f91ae3cca0996a39e0377a1059296f6aa7%22%7D%7D']".to_string(),
}]
}],
Ok(vec![ObjectRef{
object_id: "4cbe36399aabfcc7158ee7a66cbfffa525bb0ceab33d1ff2cff08759fe0a9b05".to_string(),
storage_address: "okp41ffzp0xmjhwkltuxcvccl0z9tyfuu7txp5ke0tpkcjpzuq9fcj3pqrteqt3".to_string(),
storage_address: "axone1ffzp0xmjhwkltuxcvccl0z9tyfuu7txp5ke0tpkcjpzuq9fcj3pq85yqlv".to_string(),
},ObjectRef{
object_id: "1485133dd3ab4b1c4b8085e7265585f91ae3cca0996a39e0377a1059296f6aa7".to_string(),
storage_address: "okp41cxmx7su8h5pvqca85cxdylz86uj9x9gu5xuqv34kw87q5x0hexds8w44jg".to_string(),
storage_address: "axone1cxmx7su8h5pvqca85cxdylz86uj9x9gu5xuqv34kw87q5x0hexdsr3g4x4".to_string(),
}])
),
(
Expand Down
10 changes: 5 additions & 5 deletions contracts/axone-law-stone/src/msg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pub struct InstantiateMsg {
/// The Prolog program carrying law rules and facts.
pub program: Binary,

/// The `okp4-objectarium` contract address on which to store the law program.
/// The `axone-objectarium` contract address on which to store the law program.
pub storage_address: String,
}

Expand All @@ -18,7 +18,7 @@ pub struct InstantiateMsg {
pub enum ExecuteMsg {
/// # BreakStone
/// Break the stone making this contract unusable, by clearing all the related resources:
/// - Unpin all the pinned objects on `okp4-objectarium` contracts, if any.
/// - Unpin all the pinned objects on `axone-objectarium` contracts, if any.
/// - Forget the main program (i.e. or at least unpin it).
/// Only the contract admin is authorized to break it, if any.
/// If already broken, this is a no-op.
Expand Down Expand Up @@ -56,12 +56,12 @@ pub enum QueryMsg {
}

/// # ProgramResponse
/// ProgramResponse carry elements to locate the program in a `okp4-objectarium` contract.
/// ProgramResponse carry elements to locate the program in a `axone-objectarium` contract.
#[cw_serde]
pub struct ProgramResponse {
/// The program object id in the `okp4-objectarium` contract.
/// The program object id in the `axone-objectarium` contract.
pub object_id: String,

/// The `okp4-objectarium` contract address on which the law program is stored.
/// The `axone-objectarium` contract address on which the law program is stored.
pub storage_address: String,
}
2 changes: 1 addition & 1 deletion contracts/axone-objectarium/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
authors = ["OKP4"]
authors = ["AXONE"]
edition = "2021"
name = "axone-objectarium"
rust-version = "1.75"
Expand Down
4 changes: 2 additions & 2 deletions docs/axone-dataverse.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ The SubmitClaims message is a pivotal component in the dataverse, enabling entit

Claims are injected into the dataverse through Verifiable Credentials (VCs).

Primarily, the claims leverage the OKP4 ontology, which facilitates articulating assertions about widely acknowledged resources in the dataverse, including digital services, digital resources, zones, governance, and more.
Primarily, the claims leverage the AXONE ontology, which facilitates articulating assertions about widely acknowledged resources in the dataverse, including digital services, digital resources, zones, governance, and more.

Additionally, other schemas may also be employed to supplement and enhance the validated knowledge contributed to these resources.

Expand Down Expand Up @@ -238,5 +238,5 @@ let b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```
---
*Rendered by [Fadroma](https://fadroma.tech) ([@fadroma/schema 1.1.0](https://www.npmjs.com/package/@fadroma/schema)) from `axone-dataverse.json` (`ba8a2c46ec80deb5`)*
*Rendered by [Fadroma](https://fadroma.tech) ([@fadroma/schema 1.1.0](https://www.npmjs.com/package/@fadroma/schema)) from `axone-dataverse.json` (`daa1f5839f39568e`)*
````
Loading

0 comments on commit eebad56

Please sign in to comment.