lunar-mining
c19fe7a697
util: clean up
2021-09-30 23:19:36 +02:00
lunar-mining
046273f060
disabled parse_params. replaced with to_apo() and decimals()
2021-09-30 23:19:36 +02:00
lunar-mining
4b7d9d9898
generate_id: added NetworkName. disabled parse_wrapped_token
2021-09-30 23:19:34 +02:00
lunar-mining
7fda3e8389
bin/cashierd: renamed check_token_id to validate_token_id
2021-09-30 23:17:22 +02:00
lunar-mining
4627c69b5f
renamed parse_network to assign_id
2021-09-30 23:14:42 +02:00
lunar-mining
7e43272995
util: refactored util.rs into util directory
2021-09-30 23:14:37 +02:00
ghassmo
2c05b807c9
update todo.md
2021-09-30 19:25:41 +03:00
ghassmo
fbafdfe8c2
cashierd: send drk coins once received a notification from bridge
2021-09-30 19:24:02 +03:00
ghassmo
e6834ea5b1
update todo.md
2021-09-30 16:51:59 +03:00
ghassmo
f09f6d6224
remove old cashier code from src/service
2021-09-30 16:51:06 +03:00
ghassmo
ff8c900ec2
bridge: pass mint_address when subscribe
2021-09-30 16:44:56 +03:00
ghassmo
2ee620ddcf
cashierdb: add mint_address field
2021-09-30 16:43:05 +03:00
ghassmo
178e4301e2
update todo.md
2021-09-29 21:15:52 +03:00
ghassmo
fb2f3324e4
service/sol: rename keypair to main_keypair
2021-09-29 20:48:06 +03:00
ghassmo
318d57d6dd
Client: create main_keypair field
2021-09-29 20:41:29 +03:00
parazyd
6c2d9720ec
bin/cashierd: Correct debug message.
2021-09-29 19:05:59 +02:00
parazyd
6a025fe17c
Remove old client adapter code.
2021-09-29 18:49:34 +02:00
parazyd
9d745bf288
service/sol: Close the SPL token account if it has no remaining balance.
2021-09-29 17:42:07 +02:00
parazyd
b220d6d9ff
util: Fix infinite loop bug.
2021-09-29 17:30:48 +02:00
parazyd
a71b2775fe
bin: Remove unused files.
2021-09-29 17:10:20 +02:00
parazyd
13f94a5ea3
Clean up some error mapping.
2021-09-29 16:50:23 +02:00
parazyd
71f3bcace4
More memory cleanups.
2021-09-29 16:31:35 +02:00
ghassmo
d8f729de55
service/sol: change the return type to SolResult in internal functions
2021-09-29 17:26:50 +03:00
ghassmo
70a5e542f4
cashierd: save the generated solana main keypair in cashierdb if it's not exist
2021-09-29 16:48:36 +03:00
parazyd
e3dffd044f
service/sol: Working SPL token deposits.
2021-09-29 15:01:51 +02:00
parazyd
a45f9d3144
Fix amount_in_apo in util.rs.
...
And some small lints/cleanups.
2021-09-29 14:50:17 +02:00
parazyd
ab73708346
util: Add explicit check if token.len is 44.
...
This should allow base58 Solana mint addresses.
2021-09-29 13:07:51 +02:00
parazyd
259050da13
service/sol: Initial stab at SPL token transfers.
2021-09-29 11:50:58 +02:00
lunar-mining
f39068c20b
src/util: completed f64 to u64 conversion in parse_param
2021-09-29 09:33:07 +02:00
lunar-mining
ffe6afccdf
Revert "src/util: made TokenList struct called in darkfid::main()"
...
This reverts commit 873d259bd2 .
2021-09-29 09:04:02 +02:00
lunar-mining
873d259bd2
src/util: made TokenList struct called in darkfid::main()
2021-09-29 08:56:56 +02:00
ghassmo
0b6fe5811b
move parsing params functions and NetworkName enum to src/util.rs
2021-09-29 02:39:10 +03:00
ghassmo
ef9e32a86b
darkfid: add NetworkName enum and clean up
2021-09-28 21:08:41 +03:00
ghassmo
e8c54c0a49
Merge branch 'master' of github.com:darkrenaissance/darkfi
2021-09-28 20:50:27 +03:00
ghassmo
8f015b548b
cashierdb: remove token_id from main_keypair
2021-09-28 20:49:53 +03:00
lunar-mining
685f8e96ff
bin/darkfi: test function for f64 -> u64
2021-09-28 19:44:39 +02:00
lunar-mining
0e372a8f57
bin/darkfid: renamed parse_network to parse_params
2021-09-28 19:44:39 +02:00
lunar-mining
712650b58b
bin/darkfid: removed testcase
2021-09-28 19:44:39 +02:00
ghassmo
10b3bec61b
NetworkName: minor changes
2021-09-28 20:37:46 +03:00
parazyd
61cb717aba
service/sol: Pay fees from main wallet when sending tx.
...
This comes with an implication that the main wallet has some funds
for this operation.
2021-09-28 18:08:11 +02:00
parazyd
b9d82a23e4
Makefile updates.
2021-09-28 18:08:11 +02:00
ghassmo
b90d2c09a1
remove hardcoded network name across the project and use enum instead
2021-09-28 18:55:05 +03:00
parazyd
cf2870061d
service/sol: More cleanups.
2021-09-28 17:43:32 +02:00
ghassmo
00bacb3555
Cashierd: listen to notification from bridge listen() function
2021-09-28 18:00:15 +03:00
ghassmo
796c41983f
Bridge: implement listen() function
2021-09-28 17:59:40 +03:00
parazyd
c6e4e3f3b4
service/sol: Implement function for fetching SPL Token balance.
...
It can be used as follows:
fn main() {
let main_pk = Pubkey::from_str("mainWallet").unwrap();
let mint_pk = Pubkey::from_str("usdcMint").unwrap();
let (tokn_pk, _) = get_associated_token_account(&main_pk, &mint_pk);
let (bal, dec) = get_account_token_balance(
"https://api.mainnet-beta.solana.com ".to_string(),
&tokn_pk,
&mint_pk
).unwrap();
println!("Balance: {}", bal);
println!("Decimals: {}", dec);
println!("UI representation: {}", bal / u64::pow(10, dec as u32));
}
2021-09-28 15:46:14 +02:00
parazyd
3ac9d7edbe
service/sol: Fix and clean up account subscription handling.
2021-09-28 14:24:48 +02:00
parazyd
a8941a7045
rpc: Add Clone implementation for structs, and use untagged enum.
2021-09-28 14:24:48 +02:00
ghassmo
e6c68c76bf
update todo.md
2021-09-28 15:12:16 +03:00
ghassmo
ca85a4e59c
cashierdb: attach token_id to the main keypair for tokens & change
...
asset_id name to token_id in schema and all functions
2021-09-28 14:57:57 +03:00