@pushchain/core 6.0.20 → 6.0.22
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/CHANGELOG.md +67 -0
- package/package.json +8 -2
- package/src/lib/cache/cache.js +2 -0
- package/src/lib/constants/abi/erc20.evm.d.ts +30 -0
- package/src/lib/constants/abi/erc20.evm.js +21 -0
- package/src/lib/constants/abi/index.d.ts +1 -0
- package/src/lib/constants/abi/index.js +7 -1
- package/src/lib/constants/abi/pc20.evm.d.ts +192 -0
- package/src/lib/constants/abi/pc20.evm.js +134 -0
- package/src/lib/constants/abi/prc20.evm.d.ts +172 -0
- package/src/lib/constants/abi/prc20.evm.js +97 -0
- package/src/lib/constants/abi/universalGatewayV0.json +1 -1
- package/src/lib/constants/chain.js +38 -8
- package/src/lib/constants/selectors.js +2 -2
- package/src/lib/constants/tokens.js +4 -3
- package/src/lib/formatters.js +16 -6
- package/src/lib/generated/uexecutor/v1/query.js +2 -4
- package/src/lib/generated/uexecutor/v1/types.d.ts +14 -0
- package/src/lib/generated/uexecutor/v1/types.js +90 -47
- package/src/lib/generated/uexecutor/v2/query.js +2 -4
- package/src/lib/generated/uexecutor/v2/types.d.ts +20 -0
- package/src/lib/generated/uexecutor/v2/types.js +49 -33
- package/src/lib/generated/v1/tx.js +30 -37
- package/src/lib/index.d.ts +3 -0
- package/src/lib/index.js +21 -3
- package/src/lib/internal/buffer.js +1 -2
- package/src/lib/orchestrator/cea-utils.js +89 -83
- package/src/lib/orchestrator/internals/account-manager.js +130 -139
- package/src/lib/orchestrator/internals/cascade.d.ts +0 -6
- package/src/lib/orchestrator/internals/cascade.js +1184 -1059
- package/src/lib/orchestrator/internals/confirmation.js +138 -148
- package/src/lib/orchestrator/internals/error-decoder.js +1 -1
- package/src/lib/orchestrator/internals/errors.js +12 -3
- package/src/lib/orchestrator/internals/execute-funds-only.d.ts +2 -2
- package/src/lib/orchestrator/internals/execute-funds-only.js +297 -259
- package/src/lib/orchestrator/internals/execute-funds-payload.d.ts +2 -2
- package/src/lib/orchestrator/internals/execute-funds-payload.js +220 -220
- package/src/lib/orchestrator/internals/execute-standard.d.ts +0 -8
- package/src/lib/orchestrator/internals/execute-standard.js +339 -342
- package/src/lib/orchestrator/internals/gas-calculator.js +497 -520
- package/src/lib/orchestrator/internals/gas-usd-sizer.js +101 -110
- package/src/lib/orchestrator/internals/gateway-client.js +102 -103
- package/src/lib/orchestrator/internals/helpers.js +30 -27
- package/src/lib/orchestrator/internals/inbound-tracker.js +234 -238
- package/src/lib/orchestrator/internals/outbound-sync.js +463 -452
- package/src/lib/orchestrator/internals/outbound-tracker.js +27 -34
- package/src/lib/orchestrator/internals/payload-builder.d.ts +2 -2
- package/src/lib/orchestrator/internals/payload-builder.js +119 -100
- package/src/lib/orchestrator/internals/pc-usd-oracle.js +121 -129
- package/src/lib/orchestrator/internals/pc20/address-codec.d.ts +31 -0
- package/src/lib/orchestrator/internals/pc20/address-codec.js +124 -0
- package/src/lib/orchestrator/internals/pc20/chain-namespace.d.ts +68 -0
- package/src/lib/orchestrator/internals/pc20/chain-namespace.js +136 -0
- package/src/lib/orchestrator/internals/pc20/errors.d.ts +160 -0
- package/src/lib/orchestrator/internals/pc20/errors.js +236 -0
- package/src/lib/orchestrator/internals/pc20/export.d.ts +176 -0
- package/src/lib/orchestrator/internals/pc20/export.js +431 -0
- package/src/lib/orchestrator/internals/pc20/gate.d.ts +67 -0
- package/src/lib/orchestrator/internals/pc20/gate.js +184 -0
- package/src/lib/orchestrator/internals/pc20/resolver.d.ts +185 -0
- package/src/lib/orchestrator/internals/pc20/resolver.js +649 -0
- package/src/lib/orchestrator/internals/pc20/svm.d.ts +189 -0
- package/src/lib/orchestrator/internals/pc20/svm.js +286 -0
- package/src/lib/orchestrator/internals/pc20/tracking.d.ts +46 -0
- package/src/lib/orchestrator/internals/pc20/tracking.js +109 -0
- package/src/lib/orchestrator/internals/preflight.js +1 -1
- package/src/lib/orchestrator/internals/progress-route-hooks.js +2 -2
- package/src/lib/orchestrator/internals/push-chain-tx.js +319 -329
- package/src/lib/orchestrator/internals/quote.js +90 -94
- package/src/lib/orchestrator/internals/rescue.js +76 -79
- package/src/lib/orchestrator/internals/response-builder.d.ts +28 -1
- package/src/lib/orchestrator/internals/response-builder.js +817 -701
- package/src/lib/orchestrator/internals/route-handlers.d.ts +7 -15
- package/src/lib/orchestrator/internals/route-handlers.js +1522 -1176
- package/src/lib/orchestrator/internals/signing.js +78 -83
- package/src/lib/orchestrator/internals/svm-bridge.d.ts +2 -2
- package/src/lib/orchestrator/internals/svm-bridge.js +161 -93
- package/src/lib/orchestrator/internals/svm-helpers.d.ts +15 -1
- package/src/lib/orchestrator/internals/svm-helpers.js +68 -24
- package/src/lib/orchestrator/internals/svm-rent.d.ts +19 -1
- package/src/lib/orchestrator/internals/svm-rent.js +163 -141
- package/src/lib/orchestrator/internals/tx-transformer.js +26 -23
- package/src/lib/orchestrator/internals/uea-manager.js +89 -86
- package/src/lib/orchestrator/max-pc-for-gas.js +5 -6
- package/src/lib/orchestrator/orchestrator.js +217 -200
- package/src/lib/orchestrator/orchestrator.types.d.ts +121 -1
- package/src/lib/orchestrator/orchestrator.types.js +19 -0
- package/src/lib/orchestrator/payload-builders.d.ts +2 -2
- package/src/lib/orchestrator/payload-builders.js +26 -24
- package/src/lib/orchestrator/route-detector.js +26 -9
- package/src/lib/orchestrator/svm-idl/ix-encoder.js +1 -2
- package/src/lib/orchestrator/svm-idl/normalize-address.js +2 -2
- package/src/lib/orchestrator/svm-idl/resolve.js +1 -2
- package/src/lib/price-fetch/price-fetch.js +67 -68
- package/src/lib/progress-hook/progress-hook.js +124 -72
- package/src/lib/push-chain/push-chain.js +171 -153
- package/src/lib/push-client/push-client.js +223 -237
- package/src/lib/universal/account/account.js +349 -365
- package/src/lib/universal/signer/signer.js +306 -294
- package/src/lib/universal-tx-detector/auto-detect.js +55 -60
- package/src/lib/universal-tx-detector/cascade.js +160 -172
- package/src/lib/universal-tx-detector/child-inbounds.js +67 -75
- package/src/lib/universal-tx-detector/classify.js +2 -3
- package/src/lib/universal-tx-detector/detector-svm.js +139 -147
- package/src/lib/universal-tx-detector/detector.js +145 -157
- package/src/lib/universal-tx-detector/normalize.js +7 -7
- package/src/lib/utils/external-tx-hash.js +1 -2
- package/src/lib/utils.d.ts +44 -0
- package/src/lib/utils.js +762 -683
- package/src/lib/vm-client/evm-client.js +186 -202
- package/src/lib/vm-client/svm-client.d.ts +1 -1
- package/src/lib/vm-client/svm-client.js +220 -224
- package/src/lib/vm-client/vm-client.types.d.ts +14 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,70 @@
|
|
|
1
|
+
@pushchain/core@6.0.22 (2026-08-14)
|
|
2
|
+
|
|
3
|
+
- fix: make PC20 first exports and Solana R3 E2E reliable
|
|
4
|
+
- fix: support PC20 exports for standard ERC-20 tokens
|
|
5
|
+
- feat: curated E2E CI suite with pre-flight fund gate
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
@pushchain/core@6.0.21 (2026-08-01)
|
|
10
|
+
|
|
11
|
+
- fix: pc20 bug fix
|
|
12
|
+
- fix: bug fixes
|
|
13
|
+
- fix: pc20 e2es and bug fixes
|
|
14
|
+
- feat: pc20 fixes
|
|
15
|
+
- fix: pc20 plan
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
@pushchain/core@6.1.0 (unreleased)
|
|
20
|
+
|
|
21
|
+
- Added first-class PC20 support to the universal transaction API. PC20 tokens
|
|
22
|
+
are identified by chain and address without an explicit token-standard flag.
|
|
23
|
+
External wrappers are resolved through UniversalCore, while Push-native
|
|
24
|
+
tokens are validated directly on Push Chain.
|
|
25
|
+
|
|
26
|
+
- Removed the custom `pc20Metadata()` requirement for Push-native PC20 exports.
|
|
27
|
+
Any metadata-compatible ERC-20 born on Push Chain can now be exported: the SDK
|
|
28
|
+
reads the standard `name()`, `symbol()`, and `decimals()` functions, verifies
|
|
29
|
+
deployed bytecode, and continues to reject synthetic PRC20 addresses from the
|
|
30
|
+
PC20 path.
|
|
31
|
+
|
|
32
|
+
- Added `PushChain.utils.tokens.getPC20Address()` for resolving either a
|
|
33
|
+
Push-native PC20 or an external wrapper and listing its confirmed deployments.
|
|
34
|
+
Spending paths also validate registry identity and reject wrong-chain,
|
|
35
|
+
ambiguous, stale, or unregistered token references before approval or
|
|
36
|
+
broadcast.
|
|
37
|
+
|
|
38
|
+
- Added PC20 execution across EVM and Solana for Route 1 (external wrapper burn
|
|
39
|
+
to Push), Route 2 (Push token export), and Route 3 (CEA-held wrapper return).
|
|
40
|
+
This includes first-export wrapper prediction, Solana ATA delivery and
|
|
41
|
+
fallback behavior, PC20 gas quoting, and typed PC20 errors. Route 4 remains
|
|
42
|
+
unsupported for PC20.
|
|
43
|
+
|
|
44
|
+
- Fixed funds-only PC20 returns and cascades producing a selector-only
|
|
45
|
+
`0x50433230` payload. The SDK now preserves PC20 routing metadata, builds a
|
|
46
|
+
complete universal forwarding payload on EVM and Solana, revalidates prepared
|
|
47
|
+
sends against the live registry, and fails closed when no safe payload can be
|
|
48
|
+
constructed.
|
|
49
|
+
|
|
50
|
+
- Fixed PC20 return tracking when a gateway transaction emits both a wrapper
|
|
51
|
+
burn event and a native gas-credit event. Tracking now follows the PC20 burn
|
|
52
|
+
leg by payload selector instead of relying on event position.
|
|
53
|
+
|
|
54
|
+
- Fixed prepaid native gas credit on PC20 burns by using the sender's executor
|
|
55
|
+
account as the gateway recipient instead of the zero address, preventing the
|
|
56
|
+
forwarded funds leg from attempting to credit `address(0)`.
|
|
57
|
+
|
|
58
|
+
- Fixed first PC20 wrapper deployments running out of gas on the destination.
|
|
59
|
+
The SDK now re-quotes UGPC with the resolved deployment-aware limit and writes
|
|
60
|
+
the corresponding explicit limit into the outbound request.
|
|
61
|
+
|
|
62
|
+
- Realigned inbound protobuf fields with the chain, exposed PC20 inbound
|
|
63
|
+
metadata, and added SVM remaining-account support required by the Solana
|
|
64
|
+
gateway.
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
1
68
|
@pushchain/core@6.0.20 (2026-07-10)
|
|
2
69
|
|
|
3
70
|
- fix: support custom EIP-7702 signers and dynamic multicall gas
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pushchain/core",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.22",
|
|
4
4
|
"homepage": "https://push.org",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pushchain",
|
|
@@ -50,7 +50,11 @@
|
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
52
|
"scripts": {
|
|
53
|
-
"build:proto": "scripts/protoc-generate.sh"
|
|
53
|
+
"build:proto": "scripts/protoc-generate.sh",
|
|
54
|
+
"e2e:list": "ts-node --transpile-only __e2e__/ci/run.ts --list",
|
|
55
|
+
"e2e:verify": "ts-node --transpile-only __e2e__/ci/run.ts --verify",
|
|
56
|
+
"e2e:preflight": "ts-node --transpile-only __e2e__/ci/preflight.ts",
|
|
57
|
+
"e2e:ci": "ts-node --transpile-only __e2e__/ci/run.ts"
|
|
54
58
|
},
|
|
55
59
|
"type": "commonjs",
|
|
56
60
|
"main": "./src/index.js",
|
|
@@ -67,7 +71,9 @@
|
|
|
67
71
|
],
|
|
68
72
|
"devDependencies": {
|
|
69
73
|
"@types/bs58": "^4.0.0",
|
|
74
|
+
"dotenv": "^16.4.5",
|
|
70
75
|
"secp256k1": "^5.0.1",
|
|
76
|
+
"ts-node": "10.9.1",
|
|
71
77
|
"ts-proto": "^2.0.3"
|
|
72
78
|
}
|
|
73
79
|
}
|
package/src/lib/cache/cache.js
CHANGED
|
@@ -1,4 +1,34 @@
|
|
|
1
1
|
export declare const ERC20_EVM: readonly [{
|
|
2
|
+
readonly type: "function";
|
|
3
|
+
readonly name: "name";
|
|
4
|
+
readonly inputs: readonly [];
|
|
5
|
+
readonly outputs: readonly [{
|
|
6
|
+
readonly name: "";
|
|
7
|
+
readonly type: "string";
|
|
8
|
+
readonly internalType: "string";
|
|
9
|
+
}];
|
|
10
|
+
readonly stateMutability: "view";
|
|
11
|
+
}, {
|
|
12
|
+
readonly type: "function";
|
|
13
|
+
readonly name: "symbol";
|
|
14
|
+
readonly inputs: readonly [];
|
|
15
|
+
readonly outputs: readonly [{
|
|
16
|
+
readonly name: "";
|
|
17
|
+
readonly type: "string";
|
|
18
|
+
readonly internalType: "string";
|
|
19
|
+
}];
|
|
20
|
+
readonly stateMutability: "view";
|
|
21
|
+
}, {
|
|
22
|
+
readonly type: "function";
|
|
23
|
+
readonly name: "decimals";
|
|
24
|
+
readonly inputs: readonly [];
|
|
25
|
+
readonly outputs: readonly [{
|
|
26
|
+
readonly name: "";
|
|
27
|
+
readonly type: "uint8";
|
|
28
|
+
readonly internalType: "uint8";
|
|
29
|
+
}];
|
|
30
|
+
readonly stateMutability: "view";
|
|
31
|
+
}, {
|
|
2
32
|
readonly type: "function";
|
|
3
33
|
readonly name: "balanceOf";
|
|
4
34
|
readonly inputs: readonly [{
|
|
@@ -2,6 +2,27 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ERC20_EVM = void 0;
|
|
4
4
|
exports.ERC20_EVM = [
|
|
5
|
+
{
|
|
6
|
+
type: 'function',
|
|
7
|
+
name: 'name',
|
|
8
|
+
inputs: [],
|
|
9
|
+
outputs: [{ name: '', type: 'string', internalType: 'string' }],
|
|
10
|
+
stateMutability: 'view',
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
type: 'function',
|
|
14
|
+
name: 'symbol',
|
|
15
|
+
inputs: [],
|
|
16
|
+
outputs: [{ name: '', type: 'string', internalType: 'string' }],
|
|
17
|
+
stateMutability: 'view',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
type: 'function',
|
|
21
|
+
name: 'decimals',
|
|
22
|
+
inputs: [],
|
|
23
|
+
outputs: [{ name: '', type: 'uint8', internalType: 'uint8' }],
|
|
24
|
+
stateMutability: 'view',
|
|
25
|
+
},
|
|
5
26
|
{
|
|
6
27
|
type: 'function',
|
|
7
28
|
name: 'balanceOf',
|
|
@@ -12,5 +12,6 @@ export { CEA_FACTORY_EVM } from './ceaFactory.evm';
|
|
|
12
12
|
export { UNIVERSAL_GATEWAY_PC } from './universalGatewayPC.evm';
|
|
13
13
|
export { UNIVERSAL_CORE_EVM } from './prc20.evm';
|
|
14
14
|
export { UEA_FACTORY_ABI } from './uea-factory';
|
|
15
|
+
export { PC20_FACTORY_EVM, PC20_WRAPPER_EVM, EXTERNAL_GATEWAY_PC20_EVM, VAULT_PC20_FACTORY_EVM, } from './pc20.evm';
|
|
15
16
|
export { WPC_EVM } from './wpc.evm';
|
|
16
17
|
export { UNIV3_SWAP_ROUTER_EVM } from './uniswap-v3-router.evm';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UNIV3_SWAP_ROUTER_EVM = exports.WPC_EVM = exports.UEA_FACTORY_ABI = exports.UNIVERSAL_CORE_EVM = exports.UNIVERSAL_GATEWAY_PC = exports.CEA_FACTORY_EVM = exports.CEA_EVM = exports.SVM_GATEWAY_IDL = exports.ERC20_EVM = exports.UNIVERSAL_GATEWAY_V1_SEND = exports.UNIVERSAL_GATEWAY_V0 = exports.UEA_SVM = exports.UEA_EVM = exports.FACTORY_V1 = exports.FEE_LOCKER_SVM = exports.FEE_LOCKER_EVM = void 0;
|
|
3
|
+
exports.UNIV3_SWAP_ROUTER_EVM = exports.WPC_EVM = exports.VAULT_PC20_FACTORY_EVM = exports.EXTERNAL_GATEWAY_PC20_EVM = exports.PC20_WRAPPER_EVM = exports.PC20_FACTORY_EVM = exports.UEA_FACTORY_ABI = exports.UNIVERSAL_CORE_EVM = exports.UNIVERSAL_GATEWAY_PC = exports.CEA_FACTORY_EVM = exports.CEA_EVM = exports.SVM_GATEWAY_IDL = exports.ERC20_EVM = exports.UNIVERSAL_GATEWAY_V1_SEND = exports.UNIVERSAL_GATEWAY_V0 = exports.UEA_SVM = exports.UEA_EVM = exports.FACTORY_V1 = exports.FEE_LOCKER_SVM = exports.FEE_LOCKER_EVM = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
var feeLocker_evm_1 = require("./feeLocker.evm");
|
|
6
6
|
Object.defineProperty(exports, "FEE_LOCKER_EVM", { enumerable: true, get: function () { return feeLocker_evm_1.FEE_LOCKER_EVM; } });
|
|
@@ -31,6 +31,12 @@ var prc20_evm_1 = require("./prc20.evm");
|
|
|
31
31
|
Object.defineProperty(exports, "UNIVERSAL_CORE_EVM", { enumerable: true, get: function () { return prc20_evm_1.UNIVERSAL_CORE_EVM; } });
|
|
32
32
|
var uea_factory_1 = require("./uea-factory");
|
|
33
33
|
Object.defineProperty(exports, "UEA_FACTORY_ABI", { enumerable: true, get: function () { return uea_factory_1.UEA_FACTORY_ABI; } });
|
|
34
|
+
// PC20
|
|
35
|
+
var pc20_evm_1 = require("./pc20.evm");
|
|
36
|
+
Object.defineProperty(exports, "PC20_FACTORY_EVM", { enumerable: true, get: function () { return pc20_evm_1.PC20_FACTORY_EVM; } });
|
|
37
|
+
Object.defineProperty(exports, "PC20_WRAPPER_EVM", { enumerable: true, get: function () { return pc20_evm_1.PC20_WRAPPER_EVM; } });
|
|
38
|
+
Object.defineProperty(exports, "EXTERNAL_GATEWAY_PC20_EVM", { enumerable: true, get: function () { return pc20_evm_1.EXTERNAL_GATEWAY_PC20_EVM; } });
|
|
39
|
+
Object.defineProperty(exports, "VAULT_PC20_FACTORY_EVM", { enumerable: true, get: function () { return pc20_evm_1.VAULT_PC20_FACTORY_EVM; } });
|
|
34
40
|
// SDK 5.2 gas abstraction (Case C overflow bridging)
|
|
35
41
|
var wpc_evm_1 = require("./wpc.evm");
|
|
36
42
|
Object.defineProperty(exports, "WPC_EVM", { enumerable: true, get: function () { return wpc_evm_1.WPC_EVM; } });
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PC20 ABIs — minimal read surfaces for registry resolution and validation.
|
|
3
|
+
*
|
|
4
|
+
* Sources:
|
|
5
|
+
* PC20Factory push-chain-gateway-contracts/contracts/evm-gateway/src/PC20Factory.sol
|
|
6
|
+
* PC20Wrapper push-chain-gateway-contracts/contracts/evm-gateway/src/PC20Wrapper.sol
|
|
7
|
+
* UniversalGateway push-chain-gateway-contracts/contracts/evm-gateway/src/UniversalGateway.sol
|
|
8
|
+
*
|
|
9
|
+
* Read-only entries only. Writes go through the existing gateway ABIs — PC20
|
|
10
|
+
* changes the payload, not the entrypoint.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Destination-chain factory.
|
|
14
|
+
*
|
|
15
|
+
* `computeWrapperAddress` is deliberately called on-chain rather than
|
|
16
|
+
* reimplementing CREATE2 in the SDK: the factory derives the address from its
|
|
17
|
+
* own `type(PC20Wrapper).creationCode`, so calling the live registered factory
|
|
18
|
+
* cannot desynchronize from the deployed wrapper bytecode the way a mirrored
|
|
19
|
+
* init-code hash would.
|
|
20
|
+
*/
|
|
21
|
+
export declare const PC20_FACTORY_EVM: readonly [{
|
|
22
|
+
readonly type: "function";
|
|
23
|
+
readonly name: "getWrapper";
|
|
24
|
+
readonly inputs: readonly [{
|
|
25
|
+
readonly name: "sourceAsset";
|
|
26
|
+
readonly type: "address";
|
|
27
|
+
readonly internalType: "address";
|
|
28
|
+
}];
|
|
29
|
+
readonly outputs: readonly [{
|
|
30
|
+
readonly name: "wrapper";
|
|
31
|
+
readonly type: "address";
|
|
32
|
+
readonly internalType: "address";
|
|
33
|
+
}];
|
|
34
|
+
readonly stateMutability: "view";
|
|
35
|
+
}, {
|
|
36
|
+
readonly type: "function";
|
|
37
|
+
readonly name: "wrapperToSource";
|
|
38
|
+
readonly inputs: readonly [{
|
|
39
|
+
readonly name: "";
|
|
40
|
+
readonly type: "address";
|
|
41
|
+
readonly internalType: "address";
|
|
42
|
+
}];
|
|
43
|
+
readonly outputs: readonly [{
|
|
44
|
+
readonly name: "";
|
|
45
|
+
readonly type: "address";
|
|
46
|
+
readonly internalType: "address";
|
|
47
|
+
}];
|
|
48
|
+
readonly stateMutability: "view";
|
|
49
|
+
}, {
|
|
50
|
+
readonly type: "function";
|
|
51
|
+
readonly name: "sourceToWrapper";
|
|
52
|
+
readonly inputs: readonly [{
|
|
53
|
+
readonly name: "";
|
|
54
|
+
readonly type: "address";
|
|
55
|
+
readonly internalType: "address";
|
|
56
|
+
}];
|
|
57
|
+
readonly outputs: readonly [{
|
|
58
|
+
readonly name: "";
|
|
59
|
+
readonly type: "address";
|
|
60
|
+
readonly internalType: "address";
|
|
61
|
+
}];
|
|
62
|
+
readonly stateMutability: "view";
|
|
63
|
+
}, {
|
|
64
|
+
readonly type: "function";
|
|
65
|
+
readonly name: "isPC20Wrapper";
|
|
66
|
+
readonly inputs: readonly [{
|
|
67
|
+
readonly name: "addr";
|
|
68
|
+
readonly type: "address";
|
|
69
|
+
readonly internalType: "address";
|
|
70
|
+
}];
|
|
71
|
+
readonly outputs: readonly [{
|
|
72
|
+
readonly name: "";
|
|
73
|
+
readonly type: "bool";
|
|
74
|
+
readonly internalType: "bool";
|
|
75
|
+
}];
|
|
76
|
+
readonly stateMutability: "view";
|
|
77
|
+
}, {
|
|
78
|
+
readonly type: "function";
|
|
79
|
+
readonly name: "computeWrapperAddress";
|
|
80
|
+
readonly inputs: readonly [{
|
|
81
|
+
readonly name: "sourceAsset";
|
|
82
|
+
readonly type: "address";
|
|
83
|
+
readonly internalType: "address";
|
|
84
|
+
}];
|
|
85
|
+
readonly outputs: readonly [{
|
|
86
|
+
readonly name: "predicted";
|
|
87
|
+
readonly type: "address";
|
|
88
|
+
readonly internalType: "address";
|
|
89
|
+
}];
|
|
90
|
+
readonly stateMutability: "view";
|
|
91
|
+
}, {
|
|
92
|
+
readonly type: "function";
|
|
93
|
+
readonly name: "MAX_NAME_LENGTH";
|
|
94
|
+
readonly inputs: readonly [];
|
|
95
|
+
readonly outputs: readonly [{
|
|
96
|
+
readonly name: "";
|
|
97
|
+
readonly type: "uint256";
|
|
98
|
+
readonly internalType: "uint256";
|
|
99
|
+
}];
|
|
100
|
+
readonly stateMutability: "view";
|
|
101
|
+
}, {
|
|
102
|
+
readonly type: "function";
|
|
103
|
+
readonly name: "MAX_SYMBOL_LENGTH";
|
|
104
|
+
readonly inputs: readonly [];
|
|
105
|
+
readonly outputs: readonly [{
|
|
106
|
+
readonly name: "";
|
|
107
|
+
readonly type: "uint256";
|
|
108
|
+
readonly internalType: "uint256";
|
|
109
|
+
}];
|
|
110
|
+
readonly stateMutability: "view";
|
|
111
|
+
}, {
|
|
112
|
+
readonly type: "error";
|
|
113
|
+
readonly name: "EmptyName";
|
|
114
|
+
readonly inputs: readonly [];
|
|
115
|
+
}, {
|
|
116
|
+
readonly type: "error";
|
|
117
|
+
readonly name: "NameTooLong";
|
|
118
|
+
readonly inputs: readonly [];
|
|
119
|
+
}, {
|
|
120
|
+
readonly type: "error";
|
|
121
|
+
readonly name: "EmptySymbol";
|
|
122
|
+
readonly inputs: readonly [];
|
|
123
|
+
}, {
|
|
124
|
+
readonly type: "error";
|
|
125
|
+
readonly name: "SymbolTooLong";
|
|
126
|
+
readonly inputs: readonly [];
|
|
127
|
+
}, {
|
|
128
|
+
readonly type: "error";
|
|
129
|
+
readonly name: "ZeroAddress";
|
|
130
|
+
readonly inputs: readonly [];
|
|
131
|
+
}];
|
|
132
|
+
/** Deployed wrapper on an external chain. `SOURCE_ASSET` is immutable. */
|
|
133
|
+
export declare const PC20_WRAPPER_EVM: readonly [{
|
|
134
|
+
readonly type: "function";
|
|
135
|
+
readonly name: "SOURCE_ASSET";
|
|
136
|
+
readonly inputs: readonly [];
|
|
137
|
+
readonly outputs: readonly [{
|
|
138
|
+
readonly name: "";
|
|
139
|
+
readonly type: "address";
|
|
140
|
+
readonly internalType: "address";
|
|
141
|
+
}];
|
|
142
|
+
readonly stateMutability: "view";
|
|
143
|
+
}, {
|
|
144
|
+
readonly type: "function";
|
|
145
|
+
readonly name: "factory";
|
|
146
|
+
readonly inputs: readonly [];
|
|
147
|
+
readonly outputs: readonly [{
|
|
148
|
+
readonly name: "";
|
|
149
|
+
readonly type: "address";
|
|
150
|
+
readonly internalType: "address";
|
|
151
|
+
}];
|
|
152
|
+
readonly stateMutability: "view";
|
|
153
|
+
}];
|
|
154
|
+
/**
|
|
155
|
+
* Destination Vault's configured factory.
|
|
156
|
+
*
|
|
157
|
+
* The Vault — not the gateway — is what calls `deployWrapper` at settlement
|
|
158
|
+
* (`Vault.sol:327`), so this is the authoritative answer to where a
|
|
159
|
+
* not-yet-deployed wrapper will land. Both pointers exist independently and are
|
|
160
|
+
* set separately; they happen to agree on all four testnets today, but only
|
|
161
|
+
* this one governs deployment.
|
|
162
|
+
*/
|
|
163
|
+
export declare const VAULT_PC20_FACTORY_EVM: readonly [{
|
|
164
|
+
readonly type: "function";
|
|
165
|
+
readonly name: "pc20Factory";
|
|
166
|
+
readonly inputs: readonly [];
|
|
167
|
+
readonly outputs: readonly [{
|
|
168
|
+
readonly name: "";
|
|
169
|
+
readonly type: "address";
|
|
170
|
+
readonly internalType: "contract IPC20Factory";
|
|
171
|
+
}];
|
|
172
|
+
readonly stateMutability: "view";
|
|
173
|
+
}];
|
|
174
|
+
/**
|
|
175
|
+
* External gateway's configured factory.
|
|
176
|
+
*
|
|
177
|
+
* Compared against the reference factory (the destination Vault's
|
|
178
|
+
* `pc20Factory()`, or `UniversalCore.pc20FactoryByChain` if a future upgrade
|
|
179
|
+
* exposes it) — if they disagree the live gateway will not take the PC20 burn
|
|
180
|
+
* path for this token.
|
|
181
|
+
*/
|
|
182
|
+
export declare const EXTERNAL_GATEWAY_PC20_EVM: readonly [{
|
|
183
|
+
readonly type: "function";
|
|
184
|
+
readonly name: "pc20Factory";
|
|
185
|
+
readonly inputs: readonly [];
|
|
186
|
+
readonly outputs: readonly [{
|
|
187
|
+
readonly name: "";
|
|
188
|
+
readonly type: "address";
|
|
189
|
+
readonly internalType: "contract IPC20Factory";
|
|
190
|
+
}];
|
|
191
|
+
readonly stateMutability: "view";
|
|
192
|
+
}];
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* PC20 ABIs — minimal read surfaces for registry resolution and validation.
|
|
4
|
+
*
|
|
5
|
+
* Sources:
|
|
6
|
+
* PC20Factory push-chain-gateway-contracts/contracts/evm-gateway/src/PC20Factory.sol
|
|
7
|
+
* PC20Wrapper push-chain-gateway-contracts/contracts/evm-gateway/src/PC20Wrapper.sol
|
|
8
|
+
* UniversalGateway push-chain-gateway-contracts/contracts/evm-gateway/src/UniversalGateway.sol
|
|
9
|
+
*
|
|
10
|
+
* Read-only entries only. Writes go through the existing gateway ABIs — PC20
|
|
11
|
+
* changes the payload, not the entrypoint.
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.EXTERNAL_GATEWAY_PC20_EVM = exports.VAULT_PC20_FACTORY_EVM = exports.PC20_WRAPPER_EVM = exports.PC20_FACTORY_EVM = void 0;
|
|
15
|
+
/**
|
|
16
|
+
* Destination-chain factory.
|
|
17
|
+
*
|
|
18
|
+
* `computeWrapperAddress` is deliberately called on-chain rather than
|
|
19
|
+
* reimplementing CREATE2 in the SDK: the factory derives the address from its
|
|
20
|
+
* own `type(PC20Wrapper).creationCode`, so calling the live registered factory
|
|
21
|
+
* cannot desynchronize from the deployed wrapper bytecode the way a mirrored
|
|
22
|
+
* init-code hash would.
|
|
23
|
+
*/
|
|
24
|
+
exports.PC20_FACTORY_EVM = [
|
|
25
|
+
{
|
|
26
|
+
type: 'function',
|
|
27
|
+
name: 'getWrapper',
|
|
28
|
+
inputs: [{ name: 'sourceAsset', type: 'address', internalType: 'address' }],
|
|
29
|
+
outputs: [{ name: 'wrapper', type: 'address', internalType: 'address' }],
|
|
30
|
+
stateMutability: 'view',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
type: 'function',
|
|
34
|
+
name: 'wrapperToSource',
|
|
35
|
+
inputs: [{ name: '', type: 'address', internalType: 'address' }],
|
|
36
|
+
outputs: [{ name: '', type: 'address', internalType: 'address' }],
|
|
37
|
+
stateMutability: 'view',
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
type: 'function',
|
|
41
|
+
name: 'sourceToWrapper',
|
|
42
|
+
inputs: [{ name: '', type: 'address', internalType: 'address' }],
|
|
43
|
+
outputs: [{ name: '', type: 'address', internalType: 'address' }],
|
|
44
|
+
stateMutability: 'view',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
type: 'function',
|
|
48
|
+
name: 'isPC20Wrapper',
|
|
49
|
+
inputs: [{ name: 'addr', type: 'address', internalType: 'address' }],
|
|
50
|
+
outputs: [{ name: '', type: 'bool', internalType: 'bool' }],
|
|
51
|
+
stateMutability: 'view',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
type: 'function',
|
|
55
|
+
name: 'computeWrapperAddress',
|
|
56
|
+
inputs: [{ name: 'sourceAsset', type: 'address', internalType: 'address' }],
|
|
57
|
+
outputs: [{ name: 'predicted', type: 'address', internalType: 'address' }],
|
|
58
|
+
stateMutability: 'view',
|
|
59
|
+
},
|
|
60
|
+
// Name/symbol byte limits enforced at deployWrapper. Read so the SDK can fail
|
|
61
|
+
// fast on the Push side instead of reverting on the destination chain.
|
|
62
|
+
{
|
|
63
|
+
type: 'function',
|
|
64
|
+
name: 'MAX_NAME_LENGTH',
|
|
65
|
+
inputs: [],
|
|
66
|
+
outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }],
|
|
67
|
+
stateMutability: 'view',
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
type: 'function',
|
|
71
|
+
name: 'MAX_SYMBOL_LENGTH',
|
|
72
|
+
inputs: [],
|
|
73
|
+
outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }],
|
|
74
|
+
stateMutability: 'view',
|
|
75
|
+
},
|
|
76
|
+
{ type: 'error', name: 'EmptyName', inputs: [] },
|
|
77
|
+
{ type: 'error', name: 'NameTooLong', inputs: [] },
|
|
78
|
+
{ type: 'error', name: 'EmptySymbol', inputs: [] },
|
|
79
|
+
{ type: 'error', name: 'SymbolTooLong', inputs: [] },
|
|
80
|
+
{ type: 'error', name: 'ZeroAddress', inputs: [] },
|
|
81
|
+
];
|
|
82
|
+
/** Deployed wrapper on an external chain. `SOURCE_ASSET` is immutable. */
|
|
83
|
+
exports.PC20_WRAPPER_EVM = [
|
|
84
|
+
{
|
|
85
|
+
type: 'function',
|
|
86
|
+
name: 'SOURCE_ASSET',
|
|
87
|
+
inputs: [],
|
|
88
|
+
outputs: [{ name: '', type: 'address', internalType: 'address' }],
|
|
89
|
+
stateMutability: 'view',
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
type: 'function',
|
|
93
|
+
name: 'factory',
|
|
94
|
+
inputs: [],
|
|
95
|
+
outputs: [{ name: '', type: 'address', internalType: 'address' }],
|
|
96
|
+
stateMutability: 'view',
|
|
97
|
+
},
|
|
98
|
+
];
|
|
99
|
+
/**
|
|
100
|
+
* Destination Vault's configured factory.
|
|
101
|
+
*
|
|
102
|
+
* The Vault — not the gateway — is what calls `deployWrapper` at settlement
|
|
103
|
+
* (`Vault.sol:327`), so this is the authoritative answer to where a
|
|
104
|
+
* not-yet-deployed wrapper will land. Both pointers exist independently and are
|
|
105
|
+
* set separately; they happen to agree on all four testnets today, but only
|
|
106
|
+
* this one governs deployment.
|
|
107
|
+
*/
|
|
108
|
+
exports.VAULT_PC20_FACTORY_EVM = [
|
|
109
|
+
{
|
|
110
|
+
type: 'function',
|
|
111
|
+
name: 'pc20Factory',
|
|
112
|
+
inputs: [],
|
|
113
|
+
outputs: [{ name: '', type: 'address', internalType: 'contract IPC20Factory' }],
|
|
114
|
+
stateMutability: 'view',
|
|
115
|
+
},
|
|
116
|
+
];
|
|
117
|
+
/**
|
|
118
|
+
* External gateway's configured factory.
|
|
119
|
+
*
|
|
120
|
+
* Compared against the reference factory (the destination Vault's
|
|
121
|
+
* `pc20Factory()`, or `UniversalCore.pc20FactoryByChain` if a future upgrade
|
|
122
|
+
* exposes it) — if they disagree the live gateway will not take the PC20 burn
|
|
123
|
+
* path for this token.
|
|
124
|
+
*/
|
|
125
|
+
exports.EXTERNAL_GATEWAY_PC20_EVM = [
|
|
126
|
+
{
|
|
127
|
+
type: 'function',
|
|
128
|
+
name: 'pc20Factory',
|
|
129
|
+
inputs: [],
|
|
130
|
+
outputs: [{ name: '', type: 'address', internalType: 'contract IPC20Factory' }],
|
|
131
|
+
stateMutability: 'view',
|
|
132
|
+
},
|
|
133
|
+
];
|
|
134
|
+
//# sourceMappingURL=pc20.evm.js.map
|