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

CSUB-1232: Remove collect coins #1660

Merged
merged 27 commits into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
f21960b
feat: comment out everything collect_coins related, tests are wip
beqaabu Jul 29, 2024
118e534
feat: making tests compile
beqaabu Jul 30, 2024
8b38a2b
chore: fmt
beqaabu Jul 30, 2024
82b8ef9
chore: cleanup, check, clippy, fmt, fix tests and benchmarking
beqaabu Aug 2, 2024
644c1ab
chore: update runtime and toolchain version
beqaabu Aug 2, 2024
618454c
chore: switch the way ci sources rust toolchain version and pr comments
beqaabu Aug 2, 2024
4d51541
chore: remove transaction-provider repo from the ci
beqaabu Aug 2, 2024
293ad01
chore: bring back storage items for collect coins
beqaabu Aug 5, 2024
dbb9e59
chore: try to use an updated rustc version on creditcoin-transaction-…
beqaabu Aug 5, 2024
8d3eea0
chore: bring back migrations and cleanup
beqaabu Aug 5, 2024
e616644
chore: clippy
beqaabu Aug 5, 2024
3dad48e
chore: removing some integration tests related to colect_coins
beqaabu Aug 6, 2024
35e2641
chore: fix more tests and weights
beqaabu Aug 6, 2024
ff5b93b
Auto-update creditcoin-js type definitions
Aug 6, 2024
6c842de
chore: ci again
beqaabu Aug 6, 2024
c5d7e45
chore: fix migration weights for v6
beqaabu Aug 7, 2024
131e2a5
chore: remove deleted extrinsics from the client
beqaabu Aug 7, 2024
ebf7d55
chore: fix js lint
beqaabu Aug 7, 2024
bf3e429
chore: more lints
beqaabu Aug 7, 2024
d236e02
chore: fix migration benchmarks
beqaabu Aug 7, 2024
9d2a06c
chore: more js
beqaabu Aug 7, 2024
4249c25
chore: pr comments
beqaabu Aug 7, 2024
291250f
chore: try to fix ci
beqaabu Aug 8, 2024
10e68c4
chore: revert to old toolchain version
beqaabu Aug 8, 2024
936d8d6
feat: remove setting gate contract and update js client
beqaabu Aug 8, 2024
97a8ded
Auto-update creditcoin-js type definitions
Aug 8, 2024
2210b16
chore: update readme
beqaabu Aug 8, 2024
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
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,6 @@ jobs:

build-creditcoin-transaction-producer:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
Expand Down
22 changes: 11 additions & 11 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ members = [
resolver = "2"

[workspace.package]
version = '2.239.0'
version = '2.240.0'
authors = ['Gluwa Inc.', 'Nathan Whitaker <nathan.whitaker@gluwa.com>']
edition = '2021'
license = 'Unlicense'
Expand All @@ -42,7 +42,7 @@ log = { version = "0.4.21" }
parity-scale-codec = { version = "3.2.1", default-features = false, features = [
"derive",
] }
serde = { version = "1.0.203", default-features = false, features = ["derive"] }
serde = { version = "1.0", default-features = false, features = ["derive"] }
scale-info = { version = "2.11", default-features = false, features = [
"derive",
] }
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,5 @@ If you want to see the multi-node consensus algorithm in action, refer to our

- [Legacy Creditcoin 1.x Account Migration](./docs/legacy-account-migration.md)
- [Legacy Creditcoin 1.x Repos](https://github.com/gluwa?q=legacy)

Removing `collect_coins` 08.03.24
2 changes: 1 addition & 1 deletion creditcoin-js/creditcoin.json

Large diffs are not rendered by default.

12 changes: 0 additions & 12 deletions creditcoin-js/src/extrinsics/extrinsics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,13 @@ import {
TransferKind,
DealOrderId,
TransferId,
ExternalAddress,
OwnershipProof,
CollectCoinsContract,
} from '../model';
import { KeyringPair } from '@polkadot/keyring/types';
import { lockDealOrderAsync } from './lock-deal-order';
import { closeDealOrderAsync } from './close-deal-order';
import { exemptLoanAsync } from './exempt';
import { requestCollectCoinsAsync } from './request-collect-coins';
import { registerAddressV2Async } from './register-address-v2';
import { requestCollectCoinvsV2Async } from './request-collect-coins-v2';

export const extrinsics = (api: ApiPromise) => {
const registerAddress = (
Expand Down Expand Up @@ -111,19 +107,13 @@ export const extrinsics = (api: ApiPromise) => {

const exemptLoan = (dealOrderId: DealOrderId, lender: KeyringPair) => exemptLoanAsync(api, dealOrderId, lender);

const requestCollectCoins = (evmAddress: ExternalAddress, collector: KeyringPair, txHash: string) =>
requestCollectCoinsAsync(api, evmAddress, collector, txHash);

const registerAddressV2 = (
externalAddress: string,
blockchain: Blockchain,
ownershipProof: OwnershipProof,
signer: KeyringPair,
) => registerAddressV2Async(api, externalAddress, blockchain, ownershipProof, signer);

const requestCollectCoinsV2 = (contract: CollectCoinsContract, signer: KeyringPair) =>
requestCollectCoinvsV2Async(api, contract, signer);

return {
registerAddress,
registerAddressV2,
Expand All @@ -138,7 +128,5 @@ export const extrinsics = (api: ApiPromise) => {
registerRepaymentTransfer,
closeDealOrder,
exemptLoan,
requestCollectCoins,
requestCollectCoinsV2,
};
};
64 changes: 0 additions & 64 deletions creditcoin-js/src/extrinsics/request-collect-coins-v2.ts

This file was deleted.

106 changes: 0 additions & 106 deletions creditcoin-js/src/extrinsics/request-collect-coins.ts

This file was deleted.

23 changes: 0 additions & 23 deletions creditcoin-js/src/interfaces/augment-api-events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ import type {
PalletCreditcoinAskOrderId,
PalletCreditcoinBidOrder,
PalletCreditcoinBidOrderId,
PalletCreditcoinCollectCoinsCollectedCoins,
PalletCreditcoinCollectCoinsUnverifiedCollectedCoins,
PalletCreditcoinDealOrder,
PalletCreditcoinDealOrderId,
PalletCreditcoinLegacySighash,
Expand Down Expand Up @@ -137,27 +135,6 @@ declare module '@polkadot/api-base/types/events' {
**/
BidOrderAdded: AugmentedEvent<ApiType, [PalletCreditcoinBidOrderId, PalletCreditcoinBidOrder]>;
Burned: AugmentedEvent<ApiType, [u64]>;
/**
* exchanging vested ERC-20 CC for native CC failed.
* [collected_coins_id, cause]
**/
CollectCoinsFailedVerification: AugmentedEvent<
ApiType,
[H256, PalletCreditcoinOcwErrorsVerificationFailureCause]
>;
/**
* Collecting coins from Eth ERC-20 has been registered and will be verified.
* [collected_coins_id, registered_collect_coins]
**/
CollectCoinsRegistered: AugmentedEvent<
ApiType,
[H256, PalletCreditcoinCollectCoinsUnverifiedCollectedCoins]
>;
/**
* CollectCoins has been successfully verified and minted.
* [collected_coins_id, collected_coins]
**/
CollectedCoinsMinted: AugmentedEvent<ApiType, [H256, PalletCreditcoinCollectCoinsCollectedCoins]>;
/**
* A deal order has been added by a borrower. This indicates that the borrower
* has accepted a lender's offer and intends to enter the loan.
Expand Down
Loading
Loading