Skip to content

Commit

Permalink
Move the POC of cosmwasm to a separate repository (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
hsxyl authored and en committed Sep 9, 2024
1 parent 4f337f1 commit ebcebad
Show file tree
Hide file tree
Showing 35 changed files with 5 additions and 5,038 deletions.
3 changes: 0 additions & 3 deletions canister_ids.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
"cosmwasm_proxy": {
"ic": "ncfbq-kyaaa-aaaar-qah3a-cai"
},
"cosmwasm_route_osmosis_testnet": {
"ic": "nfehe-haaaa-aaaar-qah3q-cai"
},
"icp_customs": {
"ic": "nlgkm-4qaaa-aaaar-qah2q-cai"
},
Expand Down
4 changes: 2 additions & 2 deletions customs/icp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ async fn process_tickets() {
Ok(tickets) => {
for (seq, ticket) in &tickets {
match handle_redeem_ticket(ticket).await {
Ok(_) => {
log!(P0, "[process tickets] process successful for ticket{}", ticket);
Ok(block_index) => {
log!(P0, "[process tickets] process successful for ticket{}, block_index: {}", ticket, block_index);
mutate_state(|s| s.next_ticket_seq = seq+1)
},
Err(e) => {
Expand Down
4 changes: 3 additions & 1 deletion customs/icp/src/updates/generate_ticket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ use icrc_ledger_types::{
};
use ic_ledger_types::{AccountIdentifier, Subaccount as IcSubaccount, Tokens, DEFAULT_SUBACCOUNT, MAINNET_LEDGER_CANISTER_ID};
use num_traits::cast::ToPrimitive;
use omnity_types::{Ticket, TxAction};
use omnity_types::{ic_log::P0, Ticket, TxAction};
use serde::Serialize;
use ic_canister_log::log;

use crate::{hub, state::{get_counterparty, get_token_principal, is_icp, read_state}, utils::convert_u128_u64, ICP_TRANSFER_FEE};

Expand Down Expand Up @@ -94,6 +95,7 @@ pub async fn generate_ticket(
)
.await
.map_err(|err| GenerateTicketError::SendTicketErr(format!("{}", err)))?;
log!(P0, "Success to generate ticket: {}", ticket_id);
Ok(GenerateTicketOk { ticket_id })
}

Expand Down
12 changes: 0 additions & 12 deletions dfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,6 @@
}
]
},
"cosmwasm_route_osmosis_testnet": {
"gzip": true,
"candid": "route/cosmwasm/cosmwasm_route.did",
"wasm": "route/cosmwasm/target/wasm32-unknown-unknown/release/cosmwasm_route.wasm",
"package": "cosmwasm_route",
"type": "custom",
"metadata": [
{
"name": "candid:service"
}
]
},
"cosmwasm_proxy": {
"gzip": true,
"candid": "proxy/cosmwasm/cosmwasm_proxy.did",
Expand Down
Loading

0 comments on commit ebcebad

Please sign in to comment.