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

feat(FI-916) add depositor.did file #40

Merged
merged 3 commits into from
Aug 31, 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
5 changes: 5 additions & 0 deletions depositor/depositor.did
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
type Account = record { owner : principal; subaccount : opt vec nat8 };
type DepositArg = record { to : Account; memo : opt vec nat8; cycles : nat };
type DepositResult = record { balance : nat; txid : nat };
type InitArg = record { ledger_id : principal };
service : (InitArg) -> { deposit : (DepositArg) -> (DepositResult) }
1 change: 1 addition & 0 deletions depositor/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ fn with_config<R>(f: impl FnOnce(&Config) -> R) -> R {
fn main() {}

#[init]
#[candid_method(init)]
fn init(arg: InitArg) {
CONFIG.with(|cell| {
*cell.borrow_mut() = Config {
Expand Down
7 changes: 7 additions & 0 deletions dfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
"package": "cycles-ledger",
"optimize": "cycles",
"gzip": true
},
"cycles-depositor": {
"type": "rust",
"candid": "./depositor/depositor.did",
"package": "depositor",
"optimize": "cycles",
"gzip": true
}
}
}
Loading