Skip to content

Commit

Permalink
Merge pull request #5 from bridge-23/payment
Browse files Browse the repository at this point in the history
add payment syste
  • Loading branch information
crazycrab0x2 authored Aug 28, 2024
2 parents 9666b43 + d588770 commit 9c6535a
Show file tree
Hide file tree
Showing 15 changed files with 1,116 additions and 361 deletions.
14 changes: 7 additions & 7 deletions .env
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@

# DFX CANISTER ENVIRONMENT VARIABLES
DFX_VERSION='0.19.0'
DFX_NETWORK='local'
CANISTER_CANDID_PATH_NFTONBASE_BACKEND='/Users/nezovskii/development/Gate23/src/NFTonBase_backend/NFTonBase_backend.did'
CANISTER_ID_NFTONBASE_FRONTEND='ctiya-peaaa-aaaaa-qaaja-cai'
CANISTER_ID_NFTONBASE_BACKEND='c2lt4-zmaaa-aaaaa-qaaiq-cai'
CANISTER_ID='ctiya-peaaa-aaaaa-qaaja-cai'
CANISTER_CANDID_PATH='/Users/nezovskii/development/Gate23/.dfx/local/canisters/NFTonBase_frontend/assetstorage.did'
DFX_VERSION='0.21.0'
DFX_NETWORK='ic'
CANISTER_CANDID_PATH_NFTONBASE_BACKEND='/home/sept_wolf/Ichiro/Bridge23/Gate23/src/NFTonBase_backend/NFTonBase_backend.did'
CANISTER_ID_NFTONBASE_FRONTEND='tdxl2-fyaaa-aaaak-akvha-cai'
CANISTER_ID_NFTONBASE_BACKEND='tkuag-tqaaa-aaaak-akvgq-cai'
CANISTER_ID='tdxl2-fyaaa-aaaak-akvha-cai'
CANISTER_CANDID_PATH='/home/sept_wolf/Ichiro/Bridge23/Gate23/.dfx/ic/canisters/NFTonBase_frontend/assetstorage.did'
# END DFX CANISTER ENVIRONMENT VARIABLES

# # DFX CANISTER ENVIRONMENT VARIABLES
Expand Down
66 changes: 64 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 3 additions & 6 deletions canister_ids.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
{
"NFTonBase_backend": {
"ic": "y7b46-xaaaa-aaaak-akyuq-cai"
"ic": "tkuag-tqaaa-aaaak-akvgq-cai"
},
"nft_minter_backend": {
"ic": "em3uz-waaaa-aaaan-qmbsq-cai"
},
"nft_minter_frontend": {
"ic": "efy7f-aiaaa-aaaan-qmbta-cai"
"NFTonBase_frontend": {
"ic": "tdxl2-fyaaa-aaaak-akvha-cai"
}
}
4 changes: 3 additions & 1 deletion src/NFTonBase_backend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@ junobuild-utils = "0.0.1"
http = "1.1.0"
serde_bytes = "0.11.15"
ic-stable-memory = "0.4"
ic-stable-structures = "0.6.2"
ic-stable-structures = "0.6.2"
sha2 = "0.10.8"
ic-ledger-types = "0.12.0"
53 changes: 29 additions & 24 deletions src/NFTonBase_backend/NFTonBase_backend.did
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

type HttpHeader = record { value : text; name : text };
// type HttpResponse = record {
// status : nat;
Expand All @@ -10,21 +9,21 @@ type TransformArgs = record { context : vec nat8; response : HttpResponse };
type ByteBuf = vec nat8;

type Image = record {
name: text;
img: vec nat8;
name : text;
img : vec nat8;
};

type HttpRequest = record {
method: text;
url: text;
headers: vec HttpHeader;
body: ByteBuf;
method : text;
url : text;
headers : vec HttpHeader;
body : ByteBuf;
};

type HttpResponse = record {
status_code: nat16;
headers: vec HttpHeader;
body: ByteBuf;
status_code : nat16;
headers : vec HttpHeader;
body : ByteBuf;
// streaming_strategy: opt StreamingStrategy;
};

Expand All @@ -33,21 +32,27 @@ type Token = record {};
type Func = service {};

type StreamingStrategy = variant {
Callback: record {
callback: Func;
token: Token;
}
Callback : record {
callback : Func;
token : Token;
};
};


service : {
"upload_image": (text, blob) -> (text);
"upload_data": (text, text) -> (text);
"get_system_address": () -> (text);
"get_evm_address": (text) -> (text);
"get_base_eth_balance": (text) -> (nat64, text);
"send_base_eth":(text, nat64) -> (text, text);
"mint_nft": (text, text, int32) -> (text);
"http_request": (HttpRequest) -> (HttpResponse) query;
"upload_image" : (text, blob) -> (text);
"upload_data" : (text, text) -> (text);
"get_system_address" : () -> (text);
"get_evm_address" : (text) -> (text);
"get_base_eth_balance" : (text) -> (nat64, text);
"send_base_eth" : (text, nat64) -> (text, text);
"mint_nft" : (text, text, int32) -> (text);
"http_request" : (HttpRequest) -> (HttpResponse) query;
"transform" : (TransformArgs) -> (HttpResponse) query;
}
"deposit_btc" : (text) -> (text, text);
"get_address": (text) -> (text);
"get_btc_balance" : (text) -> (text, text);
"get_usdc_balance": (text) -> (text, text);
"update_btc_balance" : (text) -> (nat64, text);
"transfer_btc" : (text, text, int32) -> (text, text);
"withdraw_btc" : (text, text, int32) -> (text, text);
};
Loading

0 comments on commit 9c6535a

Please sign in to comment.