@ercworldio/blockchain-shared 1.0.3-dev.4-PROJ-1296.10 → 1.0.3-dev.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/chains/networks_dev.json +12 -12
- package/build/chains/networks_prod-sh.json +4 -40
- package/build/chains/networks_prod-yb.json +4 -40
- package/build/contracts/Escrow.d.ts +5 -66
- package/build/contracts/Escrow.d.ts.map +1 -1
- package/build/contracts/Escrow.js +2 -93
- package/build/contracts/EscrowErrors.d.ts +1 -85
- package/build/contracts/EscrowErrors.d.ts.map +1 -1
- package/build/contracts/EscrowErrors.js +14 -59
- package/build/contracts/artifacts/Escrow.json +12 -0
- package/build/contracts/contract-events/AccessControlEvents.d.ts +2 -12
- package/build/contracts/contract-events/AccessControlEvents.d.ts.map +1 -1
- package/build/contracts/contract-events/AccessControlEvents.js +5 -29
- package/build/contracts/contract-events/EscrowEvents.d.ts +2 -134
- package/build/contracts/contract-events/EscrowEvents.d.ts.map +1 -1
- package/build/contracts/contract-events/EscrowEvents.js +17 -67
- package/build/contracts/contract-events/types/events.d.ts +1 -35
- package/build/contracts/contract-events/types/events.d.ts.map +1 -1
- package/build/contracts/typechain-types/contracts/escrow/Escrow.d.ts +4 -1
- package/build/contracts/typechain-types/contracts/escrow/Escrow.d.ts.map +1 -1
- package/build/contracts/typechain-types/contracts/lib/Events.d.ts +4 -1
- package/build/contracts/typechain-types/contracts/lib/Events.d.ts.map +1 -1
- package/build/contracts/typechain-types/factories/contracts/escrow/EscrowAccessControl__factory.d.ts +1 -1
- package/build/contracts/typechain-types/factories/contracts/escrow/EscrowAccessControl__factory.js +1 -1
- package/build/contracts/typechain-types/factories/contracts/escrow/Escrow__factory.d.ts +6 -1
- package/build/contracts/typechain-types/factories/contracts/escrow/Escrow__factory.d.ts.map +1 -1
- package/build/contracts/typechain-types/factories/contracts/escrow/Escrow__factory.js +7 -1
- package/build/contracts/typechain-types/factories/contracts/lib/Events__factory.d.ts +6 -1
- package/build/contracts/typechain-types/factories/contracts/lib/Events__factory.d.ts.map +1 -1
- package/build/contracts/typechain-types/factories/contracts/lib/Events__factory.js +7 -1
- package/build/contracts/types/escrow.d.ts +1 -13
- package/build/contracts/types/escrow.d.ts.map +1 -1
- package/build/contracts/types/escrow.js +0 -4
- package/build/entities/AdminOperationThresholds.d.ts +1 -0
- package/build/entities/AdminOperationThresholds.d.ts.map +1 -1
- package/build/entities/AdminOperationThresholds.js +5 -1
- package/build/entities/ClaimJob.d.ts +0 -1
- package/build/entities/ClaimJob.d.ts.map +1 -1
- package/build/entities/ClaimJob.js +0 -4
- package/build/entities/EscrowRoles.js +1 -1
- package/build/entities/GlobalTimelock.d.ts +1 -0
- package/build/entities/GlobalTimelock.d.ts.map +1 -1
- package/build/entities/GlobalTimelock.js +5 -1
- package/build/entities/GranularTimelock .d.ts +1 -0
- package/build/entities/GranularTimelock .d.ts.map +1 -1
- package/build/entities/GranularTimelock .js +4 -0
- package/build/entities/RoleHash.js +1 -1
- package/build/entities/TokenExecutionThresholds.d.ts +1 -0
- package/build/entities/TokenExecutionThresholds.d.ts.map +1 -1
- package/build/entities/TokenExecutionThresholds.js +5 -1
- package/build/errors/errors.d.ts +0 -30
- package/build/errors/errors.d.ts.map +1 -1
- package/build/errors/errors.js +2 -64
- package/build/index.d.ts +9 -6
- package/build/index.d.ts.map +1 -1
- package/build/index.js +11 -22
- package/build/interfaces.d.ts +2 -2
- package/build/interfaces.d.ts.map +1 -1
- package/build/services/AlchemyService.d.ts +1 -2
- package/build/services/AlchemyService.d.ts.map +1 -1
- package/build/services/AlchemyService.js +2 -8
- package/build/services/AlchemyWebhooks.d.ts.map +1 -1
- package/build/services/AlchemyWebhooks.js +29 -36
- package/build/services/AzureEventHubHandler.d.ts.map +1 -1
- package/build/services/AzureEventHubHandler.js +5 -17
- package/build/services/ClaimJobService.d.ts +2 -5
- package/build/services/ClaimJobService.d.ts.map +1 -1
- package/build/services/ClaimJobService.js +24 -135
- package/build/services/SweepJobService.d.ts +3 -3
- package/build/services/SweepJobService.d.ts.map +1 -1
- package/build/services/SweepJobService.js +12 -7
- package/build/services/db/roles/ContractRoles.d.ts +2 -2
- package/build/services/db/roles/ContractRoles.d.ts.map +1 -1
- package/build/services/db/roles/ContractRoles.js +12 -18
- package/build/services/types/alchemy.d.ts +1 -1
- package/build/services/types/alchemy.d.ts.map +1 -1
- package/build/services/types/azure_event_hub_handler.d.ts +1 -9
- package/build/services/types/azure_event_hub_handler.d.ts.map +1 -1
- package/build/services/types/azure_event_hub_handler.js +0 -8
- package/build/services/types/claim.d.ts +1 -17
- package/build/services/types/claim.d.ts.map +1 -1
- package/build/services/types/claim_job_service.d.ts +1 -9
- package/build/services/types/claim_job_service.d.ts.map +1 -1
- package/build/services/types/index.d.ts +0 -1
- package/build/services/types/index.d.ts.map +1 -1
- package/build/services/types/index.js +0 -1
- package/build/services/utils/alchemy.d.ts +1 -1
- package/build/services/utils/alchemy.d.ts.map +1 -1
- package/build/services/utils/alchemy.js +20 -9
- package/build/utils/AsyncTTLCache.d.ts +0 -2
- package/build/utils/AsyncTTLCache.d.ts.map +1 -1
- package/build/utils/AsyncTTLCache.js +2 -18
- package/build/utils/custodial.d.ts +0 -8
- package/build/utils/custodial.d.ts.map +1 -1
- package/build/utils/custodial.js +20 -34
- package/package.json +3 -6
|
@@ -7,15 +7,7 @@ export declare enum EventHubEventNames {
|
|
|
7
7
|
ROLEREVOKED = "RoleRevoked",
|
|
8
8
|
LOWRESERVES = "LowReserves",
|
|
9
9
|
COVERAGEINFO = "CoverageInfo",
|
|
10
|
-
TRANSFERLOGSRAW = "TransferLogsRaw"
|
|
11
|
-
SET_TOKEN_TIMELOCK = "SetTokenTimelock",
|
|
12
|
-
SET_TIMELOCK_GRANULAR = "SetTimelockGranular",
|
|
13
|
-
CONFIGURE_TOKEN_MULTISIG = "ConfigureTokenMultisig",
|
|
14
|
-
CONFIGURE_ADMIN_MULTISIG = "ConfigureAdminMultisig",
|
|
15
|
-
WITHDRAWAL_SCHEDUELED = "WithdrawalScheduled",
|
|
16
|
-
WITHDRAWAL_EXECUTED = "WithdrawalExecuted",
|
|
17
|
-
WITHDRAWAL_CANCELLED = "WithdrawalCancelled",
|
|
18
|
-
ADMIN_WITHDRAW = "AdminWithdraw"
|
|
10
|
+
TRANSFERLOGSRAW = "TransferLogsRaw"
|
|
19
11
|
}
|
|
20
12
|
export declare enum AzureEventHubNames {
|
|
21
13
|
DEPOSIT = "deposits",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"azure_event_hub_handler.d.ts","sourceRoot":"","sources":["../../../src/services/types/azure_event_hub_handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,MAAM,CAAC,kBAAkB,EAAE,GAAG,CAAC,EAAE,kBAAkB,CAAC,CAAA;AACxF,oBAAY,kBAAkB;IAC1B,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;IAC3B,YAAY,iBAAiB;IAC7B,eAAe,oBAAoB;
|
|
1
|
+
{"version":3,"file":"azure_event_hub_handler.d.ts","sourceRoot":"","sources":["../../../src/services/types/azure_event_hub_handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,MAAM,CAAC,kBAAkB,EAAE,GAAG,CAAC,EAAE,kBAAkB,CAAC,CAAA;AACxF,oBAAY,kBAAkB;IAC1B,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;IAC3B,YAAY,iBAAiB;IAC7B,eAAe,oBAAoB;CACtC;AAED,oBAAY,kBAAkB;IAC1B,OAAO,aAAa;IACpB,UAAU,gBAAgB;IAC1B,YAAY,iBAAiB;IAC7B,eAAe,oBAAoB;CACtC"}
|
|
@@ -10,14 +10,6 @@ var EventHubEventNames;
|
|
|
10
10
|
EventHubEventNames["LOWRESERVES"] = "LowReserves";
|
|
11
11
|
EventHubEventNames["COVERAGEINFO"] = "CoverageInfo";
|
|
12
12
|
EventHubEventNames["TRANSFERLOGSRAW"] = "TransferLogsRaw";
|
|
13
|
-
EventHubEventNames["SET_TOKEN_TIMELOCK"] = "SetTokenTimelock";
|
|
14
|
-
EventHubEventNames["SET_TIMELOCK_GRANULAR"] = "SetTimelockGranular";
|
|
15
|
-
EventHubEventNames["CONFIGURE_TOKEN_MULTISIG"] = "ConfigureTokenMultisig";
|
|
16
|
-
EventHubEventNames["CONFIGURE_ADMIN_MULTISIG"] = "ConfigureAdminMultisig";
|
|
17
|
-
EventHubEventNames["WITHDRAWAL_SCHEDUELED"] = "WithdrawalScheduled";
|
|
18
|
-
EventHubEventNames["WITHDRAWAL_EXECUTED"] = "WithdrawalExecuted";
|
|
19
|
-
EventHubEventNames["WITHDRAWAL_CANCELLED"] = "WithdrawalCancelled";
|
|
20
|
-
EventHubEventNames["ADMIN_WITHDRAW"] = "AdminWithdraw";
|
|
21
13
|
})(EventHubEventNames || (exports.EventHubEventNames = EventHubEventNames = {}));
|
|
22
14
|
var AzureEventHubNames;
|
|
23
15
|
(function (AzureEventHubNames) {
|
|
@@ -19,25 +19,9 @@ export interface WithdrawRequestDetails {
|
|
|
19
19
|
blockchain: BlockchainType;
|
|
20
20
|
receiver: string;
|
|
21
21
|
paymentType: PaymentType;
|
|
22
|
-
destinationBlockchain?: BLOCKCHAINS.EVM | BLOCKCHAINS.SOLANA
|
|
22
|
+
destinationBlockchain?: BLOCKCHAINS.EVM | BLOCKCHAINS.SOLANA;
|
|
23
23
|
destinationChainId?: number;
|
|
24
24
|
destinationToken?: string;
|
|
25
|
-
sigsExecutiveRequired?: number;
|
|
26
|
-
sigsManagerRequired?: number;
|
|
27
|
-
multisigSignatures: MultisigSignatureEntry[];
|
|
28
|
-
receiverAddress: string;
|
|
29
|
-
timeLockSeconds: number;
|
|
30
|
-
}
|
|
31
|
-
export interface MultisigSignatureEntry {
|
|
32
|
-
name: string;
|
|
33
|
-
signerAddress: string;
|
|
34
|
-
contractAddress: string;
|
|
35
|
-
createdAt: string;
|
|
36
|
-
updatedAt: string;
|
|
37
|
-
operationType: number;
|
|
38
|
-
v?: number;
|
|
39
|
-
r?: string;
|
|
40
|
-
s?: string;
|
|
41
25
|
}
|
|
42
26
|
export interface ClaimJobSuccessResult extends ClaimJobs {
|
|
43
27
|
tx_hash: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claim.d.ts","sourceRoot":"","sources":["../../../src/services/types/claim.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,UAAU,CAAC;AAEhD,MAAM,WAAW,mBAAmB;IAChC,UAAU,EAAE,cAAc,CAAC;IAC3B,YAAY,EAAE,WAAW,CAAC;CAC7B;AACD,MAAM,MAAM,aAAa,GACnB,SAAS,GACT,YAAY,GACZ,UAAU,GACV,UAAU,GACV,UAAU,GACV,MAAM,GACN,aAAa,CAAC;AAEpB,MAAM,MAAM,SAAS,GACf,QAAQ,GACR,YAAY,GACZ,WAAW,GACX,YAAY,GACZ,aAAa,GACb,kBAAkB,GAClB,QAAQ,CAAC;AAEf,MAAM,WAAW,sBAAsB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,aAAa,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CA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AE,MAAM,CAAC;IAC5B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,qBAAsB,SAAQ,SAAS;IACpD,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,6BAA6B,EAAE,MAAM,CAAC;IACtC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,0BAA0B,EAAE,MAAM,CAAC;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,IAAI,CAAC;CACrB"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { ClaimJobs } from "../../entities";
|
|
2
1
|
import { BlockchainType, ChainId } from "../../interfaces";
|
|
3
|
-
import { JobStatus,
|
|
2
|
+
import { JobStatus, PaymentType } from "./claim";
|
|
4
3
|
export interface MarkCompletePayload {
|
|
5
4
|
request_id: number;
|
|
6
5
|
from: string;
|
|
@@ -19,7 +18,6 @@ export interface CreateClaimJobsPayload {
|
|
|
19
18
|
amount: bigint;
|
|
20
19
|
token: string;
|
|
21
20
|
decimals: number;
|
|
22
|
-
has_timelock: boolean;
|
|
23
21
|
}
|
|
24
22
|
export interface BatchUpdateStatusPayload {
|
|
25
23
|
request_id: number;
|
|
@@ -53,10 +51,4 @@ export interface ClaimJobLockMetadata {
|
|
|
53
51
|
lock_owner: string;
|
|
54
52
|
lock_reason: string;
|
|
55
53
|
}
|
|
56
|
-
export interface ClaimJobResult extends ClaimJobs {
|
|
57
|
-
multisig_signatures: MultisigSignatureEntry[];
|
|
58
|
-
commitment_hash: string;
|
|
59
|
-
execute_at: Date;
|
|
60
|
-
}
|
|
61
|
-
export type ClaimJobWithDetails = ClaimJobResult;
|
|
62
54
|
//# sourceMappingURL=claim_job_service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claim_job_service.d.ts","sourceRoot":"","sources":["../../../src/services/types/claim_job_service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"claim_job_service.d.ts","sourceRoot":"","sources":["../../../src/services/types/claim_job_service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEjD,MAAM,WAAW,mBAAmB;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,sBAAsB;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,cAAc,CAAC;IAC3B,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,WAAW,CAAC;IAC1B,qBAAqB,CAAC,EAAE,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;IAClD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,wBAAwB;IACrC,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,SAAS,CAAC,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,C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":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,WAAW,CAAC;AAC1B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,SAAS,CAAC;AACxB,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChainId } from "../../interfaces";
|
|
2
2
|
import { AlchemyWebhookNetwork } from "../types/alchemy";
|
|
3
3
|
export declare const get_blockchain_type: (network_name: AlchemyWebhookNetwork) => "tron" | "evm" | "solana" | undefined;
|
|
4
|
-
export declare const get_alchemy_chain_name: (chain: ChainId) => AlchemyWebhookNetwork;
|
|
4
|
+
export declare const get_alchemy_chain_name: (chain: ChainId, is_webhook?: boolean) => AlchemyWebhookNetwork;
|
|
5
5
|
export declare const get_alchemy_chain_id: (network: AlchemyWebhookNetwork) => ChainId;
|
|
6
6
|
//# sourceMappingURL=alchemy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alchemy.d.ts","sourceRoot":"","sources":["../../../src/services/utils/alchemy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAGzD,eAAO,MAAM,mBAAmB,GAAI,cAAc,qBAAqB,
|
|
1
|
+
{"version":3,"file":"alchemy.d.ts","sourceRoot":"","sources":["../../../src/services/utils/alchemy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAGzD,eAAO,MAAM,mBAAmB,GAAI,cAAc,qBAAqB,0CA0CtE,CAAA;AAKD,eAAO,MAAM,sBAAsB,GAAI,OAAO,OAAO,EAAE,aAAY,OAAc,KAAG,qBAoEnF,CAAA;AAGD,eAAO,MAAM,oBAAoB,GAAI,SAAS,qBAAqB,KAAG,OAsDrE,CAAA"}
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.get_alchemy_chain_id = exports.get_alchemy_chain_name = exports.get_blockchain_type = void 0;
|
|
4
4
|
// CONFIG Configuration: New alchemy network
|
|
5
5
|
const get_blockchain_type = (network_name) => {
|
|
6
|
-
console.log(`Getting blockchain type for ${network_name}`);
|
|
7
6
|
const evm_networks = [
|
|
8
7
|
"ETH_MAINNET",
|
|
9
8
|
"MATIC_MAINNET",
|
|
@@ -28,26 +27,24 @@ const get_blockchain_type = (network_name) => {
|
|
|
28
27
|
];
|
|
29
28
|
let evm_match = evm_networks.some(network => network_name.includes(network));
|
|
30
29
|
if (evm_match) {
|
|
31
|
-
console.log(`match evm`);
|
|
32
30
|
return "evm";
|
|
33
31
|
}
|
|
34
32
|
let solana_match = solana_networks.some(network => network_name.includes(network));
|
|
35
33
|
if (solana_match) {
|
|
36
|
-
console.log(`match solana`);
|
|
37
34
|
return "solana";
|
|
38
35
|
}
|
|
39
|
-
let tron_match =
|
|
36
|
+
let tron_match = solana_networks.some(network => network_name.includes(network));
|
|
40
37
|
if (tron_match) {
|
|
41
|
-
console.log(`match tron`);
|
|
42
38
|
return "tron";
|
|
43
39
|
}
|
|
44
|
-
console.log(`no match`);
|
|
45
40
|
//
|
|
46
41
|
// TODO: ADD btc here
|
|
47
42
|
};
|
|
48
43
|
exports.get_blockchain_type = get_blockchain_type;
|
|
49
44
|
// CONFIG Configuration: New alchemy network
|
|
50
|
-
|
|
45
|
+
// default behavior (is_webhook = true) returns name for webhook network name
|
|
46
|
+
// otherwise for endpoint network name
|
|
47
|
+
const get_alchemy_chain_name = (chain, is_webhook = true) => {
|
|
51
48
|
let chain_name = null;
|
|
52
49
|
switch (chain) {
|
|
53
50
|
case ("11155111"):
|
|
@@ -75,10 +72,24 @@ const get_alchemy_chain_name = (chain) => {
|
|
|
75
72
|
chain_name = "AVAX_MAINNET";
|
|
76
73
|
break;
|
|
77
74
|
case ("80002"):
|
|
78
|
-
|
|
75
|
+
// Override name for webhook to support legacy "matic" name for
|
|
76
|
+
// alchemy webhooks
|
|
77
|
+
if (is_webhook) {
|
|
78
|
+
chain_name = "MATIC_AMOY";
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
chain_name = 'POLYGON_AMOY';
|
|
82
|
+
}
|
|
79
83
|
break;
|
|
80
84
|
case ("137"):
|
|
81
|
-
|
|
85
|
+
// Override name for webhook to support legacy "matic" name for
|
|
86
|
+
// alchemy webhooks
|
|
87
|
+
if (is_webhook) {
|
|
88
|
+
chain_name = "MATIC_MAINNET";
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
chain_name = 'POLYGON_MAINNET';
|
|
92
|
+
}
|
|
82
93
|
break;
|
|
83
94
|
case ("103"):
|
|
84
95
|
chain_name = "SOLANA_DEVNET";
|
|
@@ -7,8 +7,6 @@ declare class AsyncTTLCache {
|
|
|
7
7
|
static getInstance(): AsyncTTLCache;
|
|
8
8
|
static create(stale_time_in_ms: number): AsyncTTLCache;
|
|
9
9
|
private resolve_inflight;
|
|
10
|
-
invalidate(key: string): void;
|
|
11
|
-
invalidate_all(): void;
|
|
12
10
|
get_value<K, V>(key: string, data: K, fetch_task: (data: K) => Promise<V>): Promise<any>;
|
|
13
11
|
}
|
|
14
12
|
export default AsyncTTLCache;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AsyncTTLCache.d.ts","sourceRoot":"","sources":["../../src/utils/AsyncTTLCache.ts"],"names":[],"mappings":"AAOA,cAAM,aAAa;IACf,MAAM,CAAC,QAAQ,EAAE,aAAa,CAAC;IAC/B,OAAO,CAAC,QAAQ,CAAwC;IAEjD,aAAa,EAAE,MAAM,CAAC;IAE7B,OAAO,CAAC,KAAK,CAAmB;IAEhC,OAAO;IAKP,MAAM,CAAC,WAAW;IAQlB,MAAM,CAAC,MAAM,CAAC,gBAAgB,EAAE,MAAM,GAAG,aAAa;YAQxC,gBAAgB;
|
|
1
|
+
{"version":3,"file":"AsyncTTLCache.d.ts","sourceRoot":"","sources":["../../src/utils/AsyncTTLCache.ts"],"names":[],"mappings":"AAOA,cAAM,aAAa;IACf,MAAM,CAAC,QAAQ,EAAE,aAAa,CAAC;IAC/B,OAAO,CAAC,QAAQ,CAAwC;IAEjD,aAAa,EAAE,MAAM,CAAC;IAE7B,OAAO,CAAC,KAAK,CAAmB;IAEhC,OAAO;IAKP,MAAM,CAAC,WAAW;IAQlB,MAAM,CAAC,MAAM,CAAC,gBAAgB,EAAE,MAAM,GAAG,aAAa;YAQxC,gBAAgB;IAUjB,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC;CAiCzF;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -39,29 +39,13 @@ class AsyncTTLCache {
|
|
|
39
39
|
return resolved;
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
|
-
invalidate(key) {
|
|
43
|
-
console.log(`Invalidating key ${key}`);
|
|
44
|
-
const existing = this.cache.get(key);
|
|
45
|
-
console.log(`Existing record found : `, existing);
|
|
46
|
-
this.cache.delete(key);
|
|
47
|
-
this.inflight.delete(key);
|
|
48
|
-
console.log(`Deeleted cache for key ${key}`);
|
|
49
|
-
const afterDelete = this.cache.get(key);
|
|
50
|
-
console.log(`After delete key: ${key}`, afterDelete);
|
|
51
|
-
}
|
|
52
|
-
invalidate_all() {
|
|
53
|
-
this.cache.clear();
|
|
54
|
-
this.inflight.clear();
|
|
55
|
-
}
|
|
56
42
|
get_value(key, data, fetch_task) {
|
|
57
43
|
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
-
console.log(`Getting value from AsynTTLCache for key ${key}`);
|
|
59
44
|
let existing_entry = this.cache.get(key);
|
|
60
|
-
console.log(`Existing entry:`, existing_entry);
|
|
61
45
|
let now = new Date().getTime();
|
|
62
46
|
// Return cached value
|
|
63
47
|
if (existing_entry && now - existing_entry.last_update <= this.stale_time_ms) {
|
|
64
|
-
console.log(`AsyncTTLCache: Hitting cache...
|
|
48
|
+
console.log(`AsyncTTLCache: Hitting cache... Value:`, existing_entry.value);
|
|
65
49
|
return existing_entry.value;
|
|
66
50
|
}
|
|
67
51
|
if (!existing_entry || now - existing_entry.last_update > this.stale_time_ms) {
|
|
@@ -80,7 +64,7 @@ class AsyncTTLCache {
|
|
|
80
64
|
this.inflight.delete(key);
|
|
81
65
|
}
|
|
82
66
|
}
|
|
83
|
-
console.log(`AsyncTTLCache: Hitting cache... Value:`, existing_entry);
|
|
67
|
+
console.log(`AsyncTTLCache: Hitting cache... Value:`, existing_entry.value);
|
|
84
68
|
return existing_entry.value;
|
|
85
69
|
});
|
|
86
70
|
}
|
|
@@ -14,13 +14,6 @@ export interface EstimateEscrowBatchWithdrawPayload {
|
|
|
14
14
|
receiver: string;
|
|
15
15
|
requestId: number;
|
|
16
16
|
}
|
|
17
|
-
export interface EstimateEscrowExecuteWithdrawalPayload {
|
|
18
|
-
amount: bigint;
|
|
19
|
-
requestId: number;
|
|
20
|
-
tokenAddress: string;
|
|
21
|
-
receiverAddress: string;
|
|
22
|
-
executeAt: number;
|
|
23
|
-
}
|
|
24
17
|
export declare const needs_approval_and_funding: (blockchain: BlockchainType, chainId: ChainId, token: string, parentIndex: number, childIndex: number, spender: string, dbPool: IDatabasePool, config: IConfig) => Promise<{
|
|
25
18
|
status: boolean;
|
|
26
19
|
needs_approval: boolean;
|
|
@@ -34,7 +27,6 @@ export declare const getWalletBalance: (blockchain: BlockchainType, chainId: Cha
|
|
|
34
27
|
balance: bigint;
|
|
35
28
|
decimals: bigint;
|
|
36
29
|
}>;
|
|
37
|
-
export declare const estimate_execute_withdrawal: (chain_id: ChainId, payload: EstimateEscrowExecuteWithdrawalPayload, caller: string, config: IConfig) => Promise<bigint>;
|
|
38
30
|
export declare const estimate_escrow_method_call_cost: (chain_id: ChainId, payloads: EstimateEscrowBatchWithdrawPayload[], dbPool: IDatabasePool, config: IConfig) => Promise<bigint>;
|
|
39
31
|
export declare const estimateGas: (provider: ethers.Provider, tokenAddress: string, spenderAddress: string | null, amount: bigint, fromAddress: string, chainId: number, transactionType: TransactionType, isMockTransfer?: boolean) => Promise<bigint>;
|
|
40
32
|
//# sourceMappingURL=custodial.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custodial.d.ts","sourceRoot":"","sources":["../../src/utils/custodial.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyC,MAAM,EAAwC,MAAM,QAAQ,CAAC;AAC7G,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAYnF,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAMvD,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,SAAS,GAAG,cAAc,CAAC;AACpE,MAAM,WAAW,iBAAiB;IAC9B,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,OAAO,EAAE,cAAc,EAAE,CAAC;CAC7B;AAED,MAAM,WAAW,kCAAkC;IAC/C,gBAAgB,EAAE,MAAM,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,E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a,EAAE,QAAQ,OAAO;;;EAkG1J,CAAA;AAED,eAAO,MAAM,gCAAgC,GAAU,UAAU,OAAO,EAAE,UAAU,kCAAkC,EAAE,EAAE,QAAQ,aAAa,EAAE,QAAQ,OAAO,oBA2C/J,CAAA;AAED,eAAO,MAAM,WAAW,GACpB,UAAU,MAAM,CAAC,QAAQ,EACzB,cAAc,MAAM,EACpB,gBAAgB,MAAM,GAAG,IAAI,EAC7B,QAAQ,MAAM,EACd,aAAa,MAAM,EACnB,SAAS,MAAM,EACf,iBAAiB,eAAe,EAChC,wBAAsB,oBA8DzB,CAAA"}
|
package/build/utils/custodial.js
CHANGED
|
@@ -12,7 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.estimateGas = exports.estimate_escrow_method_call_cost = exports.
|
|
15
|
+
exports.estimateGas = exports.estimate_escrow_method_call_cost = exports.getWalletBalance = exports.approve_if_not_approved = exports.needs_approval_and_funding = void 0;
|
|
16
16
|
const ethers_1 = require("ethers");
|
|
17
17
|
const ERC20Mock_json_1 = __importDefault(require("../contracts/artifacts/ERC20Mock.json"));
|
|
18
18
|
const Escrow_json_1 = __importDefault(require("../contracts/artifacts/Escrow.json"));
|
|
@@ -118,18 +118,25 @@ const getWalletBalance = (blockchain, chainId, address, token, dbPool, config) =
|
|
|
118
118
|
}
|
|
119
119
|
// Handle SPL token balances
|
|
120
120
|
try {
|
|
121
|
+
// const mintPk = new PublicKey(token);
|
|
122
|
+
// const mintadd = mintPk.toString();
|
|
123
|
+
// // const mint = await getMint(connection, mintPk);
|
|
124
|
+
// const parsedTokenAccounts = await retryWithExponentialBackoff(() => connection.getParsedTokenAccountsByOwner(ownerPk, { programId: TOKEN_PROGRAM_ID }));
|
|
125
|
+
// const targetAccount = parsedTokenAccounts.value.find(a => new PublicKey(a.account.data.parsed.info.mint).toString() === mintPk.toString());
|
|
126
|
+
// if (!targetAccount) throw new Error("Token account not found");
|
|
127
|
+
// const tokenInfo = await connection.getAccountInfo(targetAccount.pubkey);
|
|
128
|
+
// // const parsedInfo = await connection.getParsedAccountInfo(targetAccount.pubkey);
|
|
129
|
+
// const sol_balance = tokenInfo?.lamports;
|
|
130
|
+
// const balance = (targetAccount.account.data as ParsedAccountData).parsed.info.tokenAmount.amount as string;
|
|
131
|
+
// const decimals = (targetAccount.account.data as ParsedAccountData).parsed.info.tokenAmount.decimals as number;
|
|
121
132
|
const mintPk = new web3_js_1.PublicKey(token);
|
|
122
|
-
const
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
const
|
|
129
|
-
// const parsedInfo = await connection.getParsedAccountInfo(targetAccount.pubkey);
|
|
130
|
-
const sol_balance = tokenInfo === null || tokenInfo === void 0 ? void 0 : tokenInfo.lamports;
|
|
131
|
-
const balance = targetAccount.account.data.parsed.info.tokenAmount.amount;
|
|
132
|
-
const decimals = targetAccount.account.data.parsed.info.tokenAmount.decimals;
|
|
133
|
+
const ata = (0, spl_token_1.getAssociatedTokenAddressSync)(mintPk, ownerPk);
|
|
134
|
+
const tokenAccountInfo = yield (0, Utility_1.retryWithExponentialBackoff)(() => connection.getParsedAccountInfo(ata));
|
|
135
|
+
if (!tokenAccountInfo.value)
|
|
136
|
+
return { balance: BigInt(0), decimals: BigInt(0) };
|
|
137
|
+
const parsed = tokenAccountInfo.value.data.parsed;
|
|
138
|
+
const balance = parsed.info.tokenAmount.amount;
|
|
139
|
+
const decimals = parsed.info.tokenAmount.decimals;
|
|
133
140
|
return { balance: BigInt(balance), decimals: BigInt(decimals) };
|
|
134
141
|
}
|
|
135
142
|
catch (error) {
|
|
@@ -172,28 +179,6 @@ const getWalletBalance = (blockchain, chainId, address, token, dbPool, config) =
|
|
|
172
179
|
}
|
|
173
180
|
});
|
|
174
181
|
exports.getWalletBalance = getWalletBalance;
|
|
175
|
-
/// Estimate gas for withdrawing scheduled transaction (withdraw with timelock)
|
|
176
|
-
const estimate_execute_withdrawal = (chain_id, payload, caller, config) => __awaiter(void 0, void 0, void 0, function* () {
|
|
177
|
-
const chain_manager = ChainManager_1.default.getInstance(config);
|
|
178
|
-
const escrow_config = chain_manager.getEscrowContractForChain(parseInt(chain_id));
|
|
179
|
-
const provider = ProviderManager_1.default.getInstance(config).getNewProvider(chain_id).provider;
|
|
180
|
-
const Escrow = new ethers_1.ethers.Contract(escrow_config.addresses[0], Escrow_json_1.default, provider);
|
|
181
|
-
const data = Escrow.interface.encodeFunctionData('executeWithdrawal', [
|
|
182
|
-
payload.amount, payload.requestId, payload.tokenAddress, payload.receiverAddress, payload.executeAt
|
|
183
|
-
]);
|
|
184
|
-
const txDetails = {
|
|
185
|
-
to: Escrow.target,
|
|
186
|
-
data: data,
|
|
187
|
-
from: caller
|
|
188
|
-
};
|
|
189
|
-
const [gasUnits, gasPrice] = yield Promise.all([
|
|
190
|
-
(0, Utility_1.retryWithExponentialBackoff)(() => __awaiter(void 0, void 0, void 0, function* () { return yield provider.estimateGas(txDetails); })),
|
|
191
|
-
(0, Utility_1.retryWithExponentialBackoff)(() => __awaiter(void 0, void 0, void 0, function* () { return yield provider.getFeeData(); }))
|
|
192
|
-
]);
|
|
193
|
-
const totalFee = gasPrice.maxFeePerGas ? gasUnits * gasPrice.maxFeePerGas : gasUnits * (gasPrice.gasPrice || BigInt(0));
|
|
194
|
-
return totalFee;
|
|
195
|
-
});
|
|
196
|
-
exports.estimate_execute_withdrawal = estimate_execute_withdrawal;
|
|
197
182
|
const estimate_escrow_method_call_cost = (chain_id, payloads, dbPool, config) => __awaiter(void 0, void 0, void 0, function* () {
|
|
198
183
|
const errors = new TransactionsErrors_1.default();
|
|
199
184
|
if (payloads.length === 0)
|
|
@@ -222,6 +207,7 @@ const estimate_escrow_method_call_cost = (chain_id, payloads, dbPool, config) =>
|
|
|
222
207
|
chainId: chain_id.toString(),
|
|
223
208
|
value: 0
|
|
224
209
|
};
|
|
210
|
+
console.log(`BATCh WITHDRAW DAT: `, { batch_payloads, data, txDetails });
|
|
225
211
|
// Estimate gas units and get current gas price
|
|
226
212
|
const [gasUnits, gasPrice] = yield Promise.all([
|
|
227
213
|
(0, Utility_1.retryWithExponentialBackoff)(() => __awaiter(void 0, void 0, void 0, function* () { return yield provider.estimateGas(txDetails); })),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ercworldio/blockchain-shared",
|
|
3
|
-
"version": "1.0.3-dev.
|
|
3
|
+
"version": "1.0.3-dev.6",
|
|
4
4
|
"description": "Shared library for blockchain projects",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"@solana/buffer-layout-utils": "^0.2.0",
|
|
72
72
|
"@solana/spl-token": "^0.4.13",
|
|
73
73
|
"@solana/web3.js": "^1.98.2",
|
|
74
|
-
"axios": "^1.
|
|
74
|
+
"axios": "^1.4.0",
|
|
75
75
|
"bech32": "^2.0.0",
|
|
76
76
|
"bip39": "^3.1.0",
|
|
77
77
|
"borsh": "^2.0.0",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"redis": "^5.8.2",
|
|
85
85
|
"reflect-metadata": "^0.2.2",
|
|
86
86
|
"secp256k1": "^5.0.1",
|
|
87
|
-
"tronweb": "^6.
|
|
87
|
+
"tronweb": "^6.1.1",
|
|
88
88
|
"tweetnacl": "^1.0.3",
|
|
89
89
|
"typeorm": "^0.3.24",
|
|
90
90
|
"uuid": "^8.0.0"
|
|
@@ -92,9 +92,6 @@
|
|
|
92
92
|
"peerDependencies": {
|
|
93
93
|
"pg": "^8.16.0"
|
|
94
94
|
},
|
|
95
|
-
"overrides": {
|
|
96
|
-
"axios": "^1.16.1"
|
|
97
|
-
},
|
|
98
95
|
"devDependencies": {
|
|
99
96
|
"@types/bech32": "^1.1.2",
|
|
100
97
|
"@types/bn.js": "^5.2.0",
|