@ercworldio/blockchain-shared 1.0.5-dev.8-PLAT304.4 → 1.0.7
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 +1 -10
- package/build/chains/networks_prod-ab120.json +644 -0
- package/build/chains/networks_prod-dz.json +2 -2
- package/build/chains/networks_stg-ab120-mainnet.json +681 -0
- package/build/chains/networks_stg-ab120.json +597 -0
- package/build/chains/networks_stg-dz.json +1 -10
- package/build/contracts/Escrow.d.ts +0 -2
- package/build/contracts/Escrow.d.ts.map +1 -1
- package/build/contracts/Escrow.js +0 -63
- package/build/contracts/contract-events/EscrowEvents.d.ts +14 -14
- package/build/contracts/contract-events/EscrowEvents.d.ts.map +1 -1
- package/build/contracts/contract-events/EscrowEvents.js +5 -5
- package/build/contracts/typechain-types/contracts/escrow/Escrow.d.ts +17 -31
- package/build/contracts/typechain-types/contracts/escrow/Escrow.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/EscrowSignature__factory.d.ts +1 -1
- package/build/contracts/typechain-types/factories/contracts/escrow/EscrowSignature__factory.js +1 -1
- package/build/contracts/typechain-types/factories/contracts/escrow/Escrow__factory.d.ts +8 -66
- 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 +10 -87
- package/build/contracts/typechain-types/factories/contracts/lib/MultisigLib__factory.d.ts +1 -1
- package/build/contracts/typechain-types/factories/contracts/lib/MultisigLib__factory.js +1 -1
- package/build/services/solana/escrow/services/EscrowAdminUtility.d.ts +8 -0
- package/build/services/solana/escrow/services/EscrowAdminUtility.d.ts.map +1 -1
- package/build/services/solana/escrow/services/EscrowAdminUtility.js +46 -5
- package/build/utils/custodial.d.ts.map +1 -1
- package/build/utils/custodial.js +19 -0
- package/package.json +1 -1
package/build/contracts/typechain-types/factories/contracts/escrow/EscrowAccessControl__factory.js
CHANGED
|
@@ -967,7 +967,7 @@ const _abi = [
|
|
|
967
967
|
type: "function",
|
|
968
968
|
},
|
|
969
969
|
];
|
|
970
|
-
const _bytecode = "
|
|
970
|
+
const _bytecode = "0x60808060405234601557610f52908161001a8239f35b5f80fdfe6080806040526004361015610012575f80fd5b5f3560e01c90816301ffc9a71461070a5750806320f5117c146106d2578063248a9ca3146106a05780632f2ff15d1461066357806336568abe1461061f5780633945c4a6146106025780633aa98a941461051c5780634a78b2f5146104e2578063518713d21461049b5780637026cb58146104615780637ef066c8146104275780638e8b3f2f1461040a57806391d14854146103da578063a0c7f799146103a0578063a217fddf14610386578063b2065f601461034c578063b700f45614610312578063bec4742c146102f5578063c0608667146102bb578063c4707a8314610294578063d547741f1461024e578063ebdf690f14610214578063f01068a1146101da578063f5b541a6146101b3578063fa07bb54146101795763fddbf3f31461013a575f80fd5b34610175576020366003190112610175576001600160a01b0361015b61075d565b165f526003602052602060ff60405f205416604051908152f35b5f80fd5b34610175575f3660031901126101755760206040517faf82374944a6f0200e0a96e99d9d9aa4925409c95c28b14a1d426baddd614aa88152f35b34610175575f3660031901126101755760206040515f516020610efd5f395f51905f528152f35b34610175575f3660031901126101755760206040517fb7733e58c7517dbd9e44ca467a39c0556186bc3a7271956f0a22baafb5dc93c38152f35b34610175575f3660031901126101755760206040517fede9dcdb0ce99dc7cec9c7be9246ad08b37853683ad91569c187b647ddf5e21c8152f35b346101755760403660031901126101755761029260043561026d610773565b9061028d610286825f525f602052600160405f20015490565b3390610d73565b610abe565b005b34610175575f3660031901126101755760206040515f516020610edd5f395f51905f528152f35b34610175575f3660031901126101755760206040517ff7401a2aa2d57dbee8bd296c5ac47eac2db8a2db2ff59d50c0534dc8be92dc6e8152f35b34610175575f366003190112610175576020600754604051908152f35b34610175575f3660031901126101755760206040517fdd7d143944313e9468ffd66e8786351a1538ac1bd6bac96fbbaac11d42f60a518152f35b34610175575f3660031901126101755760206040517f4d7d81d86b902e627e6f0ca462e1191bd8af9cb4b8de2660c10b6349acb6ff9b8152f35b34610175575f3660031901126101755760206040515f8152f35b34610175575f3660031901126101755760206040517fbbfb55d933c2bfa638763473275b1d84c4418e58d26cf9d2cd5758237756d9f08152f35b346101755760403660031901126101755760206104006103f8610773565b600435610951565b6040519015158152f35b34610175575f366003190112610175576020600554604051908152f35b34610175575f3660031901126101755760206040517f20eabc094169e10bc6be263d742d992b10fb206c3c0411e1cbabdd3cf47922298152f35b34610175575f3660031901126101755760206040517f3261beaeb016c41750eb5ecd6c92c85305d1a0aecaaaa6e0f4cf499f7ae258fb8152f35b346101755760203660031901126101755760206104b661075d565b6104bf81610789565b9081156104d2575b506040519015158152f35b6104dc91506108bd565b826104c7565b34610175575f3660031901126101755760206040517fd64fcb6a6f590e3ec3e331a5d9c60e0ca7468054939fe8e8dfe25f11ad1c1e7a8152f35b346101755760603660031901126101755761053561075d565b61053d610773565b60443591906001600160a01b03831683036101755760ff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460401c16156105f357600180546001600160a01b0319166001600160a01b0384161790556105a381610789565b156105e3575b506105b381610829565b156105d3575b506105c3816108bd565b156105ca57005b61029290610a7c565b6105dc90610a4e565b50816105b9565b6105ec906109c4565b50826105a9565b631afcd79f60e31b5f5260045ffd5b34610175575f366003190112610175576020600654604051908152f35b3461017557604036600319011261017557610638610773565b336001600160a01b038216036106545761029290600435610abe565b63334bd91960e11b5f5260045ffd5b3461017557604036600319011261017557610292600435610682610773565b9061069b610286825f525f602052600160405f20015490565b610aaa565b346101755760203660031901126101755760206106ca6004355f525f602052600160405f20015490565b604051908152f35b34610175576020366003190112610175576001600160a01b036106f361075d565b165f526004602052602060405f2054604051908152f35b34610175576020366003190112610175576004359063ffffffff60e01b821680920361017557602091637965db0b60e01b811490811561074c575b5015158152f35b6301ffc9a760e01b14905083610745565b600435906001600160a01b038216820361017557565b602435906001600160a01b038216820361017557565b6107925f610b60565b906020820151156107eb576001600160a01b03165f9081526003602052604090205490519060088210156107d757600160ff8093161b16166107d2575f90565b600190565b634e487b7160e01b5f52602160045260245ffd5b6001600160a01b03165f9081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff16919050565b61083f5f516020610efd5f395f51905f52610b60565b9060208201511561087f576001600160a01b03165f9081526003602052604090205490519060088210156107d757600160ff8093161b16166107d2575f90565b6001600160a01b03165f9081527fee57cd81e84075558e8fcc182a1f4393f91fc97f963a136e66b7f949a62f319f602052604090205460ff16919050565b6108d35f516020610edd5f395f51905f52610b60565b90602082015115610913576001600160a01b03165f9081526003602052604090205490519060088210156107d757600160ff8093161b16166107d2575f90565b6001600160a01b03165f9081527f4272c0e29c36ddb672dd25a254bda59e4d959f5c13bec396162edadccdbf7935602052604090205460ff16919050565b9061095b82610b60565b9160208301511561099c57506001600160a01b03165f9081526003602052604090205490519060088210156107d757600160ff8093161b16166107d2575f90565b5f908152602081815260408083206001600160a01b039094168352929052205460ff16919050565b6109ce815f610e06565b906109d85f610b60565b90602082015115610a49576001600160a01b03165f8181526003602052604090205490919060ff16610a3657519060088210156107d7575f52600360205260ff8060018160405f2094161b1681835416171660ff1982541617905590565b5063f893a86f60e01b5f5260045260245ffd5b505090565b610a65815f516020610efd5f395f51905f52610e06565b906109d85f516020610efd5f395f51905f52610b60565b610a93815f516020610edd5f395f51905f52610e06565b906109d85f516020610edd5f395f51905f52610b60565b906109d8610ab88284610e06565b92610b60565b90610acc610ab88284610e75565b90602082015115610a49576001600160a01b03165f8181526003602052604090205490919060ff1615610a4957519060088210156107d7575f52600360205260ff808060018160405f2095161b1619835416161660ff1982541617905590565b604051906040820182811067ffffffffffffffff821117610b4c57604052565b634e487b7160e01b5f52604160045260245ffd5b610b68610b2c565b5f8082526020909101527fede9dcdb0ce99dc7cec9c7be9246ad08b37853683ad91569c187b647ddf5e21c8103610baf5750610ba2610b2c565b5f81526001602082015290565b7ff7401a2aa2d57dbee8bd296c5ac47eac2db8a2db2ff59d50c0534dc8be92dc6e8103610bed5750610bdf610b2c565b600181526001602082015290565b7f4d7d81d86b902e627e6f0ca462e1191bd8af9cb4b8de2660c10b6349acb6ff9b8103610c2b5750610c1d610b2c565b600281526001602082015290565b7f20eabc094169e10bc6be263d742d992b10fb206c3c0411e1cbabdd3cf47922298103610c695750610c5b610b2c565b600381526001602082015290565b7fbbfb55d933c2bfa638763473275b1d84c4418e58d26cf9d2cd5758237756d9f08103610ca75750610c99610b2c565b600481526001602082015290565b7f3261beaeb016c41750eb5ecd6c92c85305d1a0aecaaaa6e0f4cf499f7ae258fb8103610ce55750610cd7610b2c565b600581526001602082015290565b7fd64fcb6a6f590e3ec3e331a5d9c60e0ca7468054939fe8e8dfe25f11ad1c1e7a8103610d235750610d15610b2c565b600681526001602082015290565b7faf82374944a6f0200e0a96e99d9d9aa4925409c95c28b14a1d426baddd614aa814610d5d57610d51610b2c565b5f81525f602082015290565b610d65610b2c565b600781526001602082015290565b90610d7d82610b60565b90602082015115610dd4576001600160a01b03165f818152600360205260409020549151909160088210156107d757600160ff8093161b161615610dbf575050565b63e2517d3f60e01b5f5260045260245260445ffd5b9050610de08183610951565b15610de9575050565b63e2517d3f60e01b5f5260018060a01b031660045260245260445ffd5b610e108282610951565b610e6f575f818152602081815260408083206001600160a01b0395909516808452949091528120805460ff19166001179055339291907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9080a4600190565b50505f90565b610e7f8282610951565b15610e6f575f818152602081815260408083206001600160a01b0395909516808452949091528120805460ff19169055339291907ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9080a460019056fe9d98d3d08f0062b192694645e127c98e5f96f3bbec331d061acaac3ace2327f997667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929a2646970667358221220414f57bf92d9c6781f6d2a6d02d758c0a31f6b30fb6d0f57458d23dc4aedbb3664736f6c634300081c0033";
|
|
971
971
|
const isSuperArgs = (xs) => xs.length > 1;
|
|
972
972
|
class EscrowAccessControl__factory extends ethers_1.ContractFactory {
|
|
973
973
|
constructor(...args) {
|
package/build/contracts/typechain-types/factories/contracts/escrow/EscrowSignature__factory.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export declare class EscrowSignature__factory extends ContractFactory {
|
|
|
14
14
|
deploymentTransaction(): ContractTransactionResponse;
|
|
15
15
|
}>;
|
|
16
16
|
connect(runner: ContractRunner | null): EscrowSignature__factory;
|
|
17
|
-
static readonly bytecode = "
|
|
17
|
+
static readonly bytecode = "0x608080604052346015576104e6908161001a8239f35b5f80fdfe60806040526004361015610011575f80fd5b5f5f3560e01c806331993fdf1461021a5780633644e515146101fe578063ac21242d146101465763d37dbaa214610046575f80fd5b3461014357610054366103e9565b94806080604096939495965161006981610355565b6001815260208101948552604081019760018060a01b03168852606081019660018060a01b031687520193845261012f57602061011d8787878787519260018060a01b039051169160018060a01b0390511690519060405192878401947f30df4329ee18debd99f937f6d70edc594d2957d5c194e77ab788df398c193af28652600160408601526060850152608084015260a083015260c082015260c0815261011360e082610371565b5190205f54610435565b6040516001600160a01b039091168152f35b634e487b7160e01b81526021600452602490fd5b80fd5b346101fa57602061011d610159366103e9565b93608060405161016881610355565b5f8082528982019384526001600160a01b03968716604080840191825296881660608085019182529490930186905293519351915186517fe35cf8b8df51aa49768d4a7859037953b72f9188d7c60825dfd506ac7c8d430c818d0190815297810192909252928101939093528516608083015290931660a084015260c08084019190915282529061011360e082610371565b5f80fd5b346101fa575f3660031901126101fa5760205f54604051908152f35b346101fa5760403660031901126101fa5760043567ffffffffffffffff81116101fa5761024b903690600401610393565b60243567ffffffffffffffff81116101fa5761026b903690600401610393565b9060ff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460401c1615610346576040516080810181811067ffffffffffffffff821117610332576040528181528260208201524660408201526060309101526020815191012090602081519101206040519060208201927f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f8452604083015260608201524660808201523060a082015260a0815261032b60c082610371565b5190205f55005b634e487b7160e01b5f52604160045260245ffd5b631afcd79f60e31b5f5260045ffd5b60a0810190811067ffffffffffffffff82111761033257604052565b90601f8019910116810190811067ffffffffffffffff82111761033257604052565b81601f820112156101fa5780359067ffffffffffffffff821161033257604051926103c8601f8401601f191660200185610371565b828452602083830101116101fa57815f926020809301838601378301015290565b60e06003198201126101fa57600435916024356001600160a01b03811681036101fa57916044356001600160a01b03811681036101fa579160606064359260831901126101fa57608490565b9060405190602082019261190160f01b84526022830152604282015260428152610460606282610371565b5190209080359060ff82168092036101fa5760209260406080925f9482519384528684015285810135828401520135606082015282805260015afa156104a5575f5190565b6040513d5f823e3d90fdfea2646970667358221220d67d98cc49e8b68c2f54651657692b9a28c72d5cd20d1ba0d89c7f517d308fff64736f6c634300081c0033";
|
|
18
18
|
static readonly abi: readonly [{
|
|
19
19
|
readonly inputs: readonly [];
|
|
20
20
|
readonly name: "InvalidInitialization";
|
package/build/contracts/typechain-types/factories/contracts/escrow/EscrowSignature__factory.js
CHANGED
|
@@ -173,7 +173,7 @@ const _abi = [
|
|
|
173
173
|
type: "function",
|
|
174
174
|
},
|
|
175
175
|
];
|
|
176
|
-
const _bytecode = "
|
|
176
|
+
const _bytecode = "0x608080604052346015576104e6908161001a8239f35b5f80fdfe60806040526004361015610011575f80fd5b5f5f3560e01c806331993fdf1461021a5780633644e515146101fe578063ac21242d146101465763d37dbaa214610046575f80fd5b3461014357610054366103e9565b94806080604096939495965161006981610355565b6001815260208101948552604081019760018060a01b03168852606081019660018060a01b031687520193845261012f57602061011d8787878787519260018060a01b039051169160018060a01b0390511690519060405192878401947f30df4329ee18debd99f937f6d70edc594d2957d5c194e77ab788df398c193af28652600160408601526060850152608084015260a083015260c082015260c0815261011360e082610371565b5190205f54610435565b6040516001600160a01b039091168152f35b634e487b7160e01b81526021600452602490fd5b80fd5b346101fa57602061011d610159366103e9565b93608060405161016881610355565b5f8082528982019384526001600160a01b03968716604080840191825296881660608085019182529490930186905293519351915186517fe35cf8b8df51aa49768d4a7859037953b72f9188d7c60825dfd506ac7c8d430c818d0190815297810192909252928101939093528516608083015290931660a084015260c08084019190915282529061011360e082610371565b5f80fd5b346101fa575f3660031901126101fa5760205f54604051908152f35b346101fa5760403660031901126101fa5760043567ffffffffffffffff81116101fa5761024b903690600401610393565b60243567ffffffffffffffff81116101fa5761026b903690600401610393565b9060ff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460401c1615610346576040516080810181811067ffffffffffffffff821117610332576040528181528260208201524660408201526060309101526020815191012090602081519101206040519060208201927f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f8452604083015260608201524660808201523060a082015260a0815261032b60c082610371565b5190205f55005b634e487b7160e01b5f52604160045260245ffd5b631afcd79f60e31b5f5260045ffd5b60a0810190811067ffffffffffffffff82111761033257604052565b90601f8019910116810190811067ffffffffffffffff82111761033257604052565b81601f820112156101fa5780359067ffffffffffffffff821161033257604051926103c8601f8401601f191660200185610371565b828452602083830101116101fa57815f926020809301838601378301015290565b60e06003198201126101fa57600435916024356001600160a01b03811681036101fa57916044356001600160a01b03811681036101fa579160606064359260831901126101fa57608490565b9060405190602082019261190160f01b84526022830152604282015260428152610460606282610371565b5190209080359060ff82168092036101fa5760209260406080925f9482519384528684015285810135828401520135606082015282805260015afa156104a5575f5190565b6040513d5f823e3d90fdfea2646970667358221220d67d98cc49e8b68c2f54651657692b9a28c72d5cd20d1ba0d89c7f517d308fff64736f6c634300081c0033";
|
|
177
177
|
const isSuperArgs = (xs) => xs.length > 1;
|
|
178
178
|
class EscrowSignature__factory extends ethers_1.ContractFactory {
|
|
179
179
|
constructor(...args) {
|
|
@@ -1361,6 +1361,10 @@ export declare class Escrow__factory extends ContractFactory {
|
|
|
1361
1361
|
readonly internalType: "struct Types.Signature";
|
|
1362
1362
|
readonly name: "signature";
|
|
1363
1363
|
readonly type: "tuple";
|
|
1364
|
+
}, {
|
|
1365
|
+
readonly internalType: "address";
|
|
1366
|
+
readonly name: "receiver";
|
|
1367
|
+
readonly type: "address";
|
|
1364
1368
|
}];
|
|
1365
1369
|
readonly name: "deposit";
|
|
1366
1370
|
readonly outputs: readonly [];
|
|
@@ -1396,6 +1400,10 @@ export declare class Escrow__factory extends ContractFactory {
|
|
|
1396
1400
|
readonly internalType: "struct Types.Signature";
|
|
1397
1401
|
readonly name: "signature";
|
|
1398
1402
|
readonly type: "tuple";
|
|
1403
|
+
}, {
|
|
1404
|
+
readonly internalType: "address";
|
|
1405
|
+
readonly name: "receiver";
|
|
1406
|
+
readonly type: "address";
|
|
1399
1407
|
}];
|
|
1400
1408
|
readonly name: "depositErc20";
|
|
1401
1409
|
readonly outputs: readonly [];
|
|
@@ -2371,72 +2379,6 @@ export declare class Escrow__factory extends ContractFactory {
|
|
|
2371
2379
|
}];
|
|
2372
2380
|
readonly stateMutability: "view";
|
|
2373
2381
|
readonly type: "function";
|
|
2374
|
-
}, {
|
|
2375
|
-
readonly inputs: readonly [{
|
|
2376
|
-
readonly internalType: "uint256";
|
|
2377
|
-
readonly name: "packed";
|
|
2378
|
-
readonly type: "uint256";
|
|
2379
|
-
}];
|
|
2380
|
-
readonly name: "unpackAdminThresholds";
|
|
2381
|
-
readonly outputs: readonly [{
|
|
2382
|
-
readonly components: readonly [{
|
|
2383
|
-
readonly internalType: "uint8";
|
|
2384
|
-
readonly name: "sigsManagerRequired";
|
|
2385
|
-
readonly type: "uint8";
|
|
2386
|
-
}, {
|
|
2387
|
-
readonly internalType: "uint8";
|
|
2388
|
-
readonly name: "sigsExecutiveRequired";
|
|
2389
|
-
readonly type: "uint8";
|
|
2390
|
-
}, {
|
|
2391
|
-
readonly internalType: "bool";
|
|
2392
|
-
readonly name: "configured";
|
|
2393
|
-
readonly type: "bool";
|
|
2394
|
-
}];
|
|
2395
|
-
readonly internalType: "struct Types.AdminMultisigConfig";
|
|
2396
|
-
readonly name: "";
|
|
2397
|
-
readonly type: "tuple";
|
|
2398
|
-
}];
|
|
2399
|
-
readonly stateMutability: "view";
|
|
2400
|
-
readonly type: "function";
|
|
2401
|
-
}, {
|
|
2402
|
-
readonly inputs: readonly [{
|
|
2403
|
-
readonly internalType: "uint256";
|
|
2404
|
-
readonly name: "packed";
|
|
2405
|
-
readonly type: "uint256";
|
|
2406
|
-
}];
|
|
2407
|
-
readonly name: "unpackTokenThresholds";
|
|
2408
|
-
readonly outputs: readonly [{
|
|
2409
|
-
readonly components: readonly [{
|
|
2410
|
-
readonly internalType: "uint256";
|
|
2411
|
-
readonly name: "thresholdAmount";
|
|
2412
|
-
readonly type: "uint256";
|
|
2413
|
-
}, {
|
|
2414
|
-
readonly internalType: "uint8";
|
|
2415
|
-
readonly name: "sigsExecutiveBelow";
|
|
2416
|
-
readonly type: "uint8";
|
|
2417
|
-
}, {
|
|
2418
|
-
readonly internalType: "uint8";
|
|
2419
|
-
readonly name: "sigsExecutiveAbove";
|
|
2420
|
-
readonly type: "uint8";
|
|
2421
|
-
}, {
|
|
2422
|
-
readonly internalType: "uint8";
|
|
2423
|
-
readonly name: "sigsBelow";
|
|
2424
|
-
readonly type: "uint8";
|
|
2425
|
-
}, {
|
|
2426
|
-
readonly internalType: "uint8";
|
|
2427
|
-
readonly name: "sigsAbove";
|
|
2428
|
-
readonly type: "uint8";
|
|
2429
|
-
}, {
|
|
2430
|
-
readonly internalType: "bool";
|
|
2431
|
-
readonly name: "configured";
|
|
2432
|
-
readonly type: "bool";
|
|
2433
|
-
}];
|
|
2434
|
-
readonly internalType: "struct Types.MultisigConfig";
|
|
2435
|
-
readonly name: "";
|
|
2436
|
-
readonly type: "tuple";
|
|
2437
|
-
}];
|
|
2438
|
-
readonly stateMutability: "view";
|
|
2439
|
-
readonly type: "function";
|
|
2440
2382
|
}, {
|
|
2441
2383
|
readonly inputs: readonly [];
|
|
2442
2384
|
readonly name: "unpause";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Escrow__factory.d.ts","sourceRoot":"","sources":["../../../../../../src/contracts/typechain-types/factories/contracts/escrow/Escrow__factory.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,eAAe,EACf,2BAA2B,EAE5B,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,EAAE,MAAM,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAChF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,KAAK,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"Escrow__factory.d.ts","sourceRoot":"","sources":["../../../../../../src/contracts/typechain-types/factories/contracts/escrow/Escrow__factory.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,eAAe,EACf,2BAA2B,EAE5B,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,EAAE,MAAM,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAChF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,KAAK,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAspGhF,KAAK,uBAAuB,GACxB,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,GACjB,qBAAqB,CAAC,OAAO,eAAe,CAAC,CAAC;AAMlD,qBAAa,eAAgB,SAAQ,eAAe;gBACtC,GAAG,IAAI,EAAE,uBAAuB;IAQnC,oBAAoB,CAC3B,SAAS,CAAC,EAAE,mBAAmB,GAAG;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,GAClD,OAAO,CAAC,yBAAyB,CAAC;IAG5B,MAAM,CAAC,SAAS,CAAC,EAAE,mBAAmB,GAAG;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,GACzB,OAAO,CAC7C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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAAQ;IAC3B,MAAM,CAAC,eAAe,IAAI,eAAe;IAGzC,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,cAAc,GAAG,IAAI,GAAG,MAAM;CAGxE"}
|
|
@@ -1739,6 +1739,11 @@ const _abi = [
|
|
|
1739
1739
|
name: "signature",
|
|
1740
1740
|
type: "tuple",
|
|
1741
1741
|
},
|
|
1742
|
+
{
|
|
1743
|
+
internalType: "address",
|
|
1744
|
+
name: "receiver",
|
|
1745
|
+
type: "address",
|
|
1746
|
+
},
|
|
1742
1747
|
],
|
|
1743
1748
|
name: "deposit",
|
|
1744
1749
|
outputs: [],
|
|
@@ -1784,6 +1789,11 @@ const _abi = [
|
|
|
1784
1789
|
name: "signature",
|
|
1785
1790
|
type: "tuple",
|
|
1786
1791
|
},
|
|
1792
|
+
{
|
|
1793
|
+
internalType: "address",
|
|
1794
|
+
name: "receiver",
|
|
1795
|
+
type: "address",
|
|
1796
|
+
},
|
|
1787
1797
|
],
|
|
1788
1798
|
name: "depositErc20",
|
|
1789
1799
|
outputs: [],
|
|
@@ -3058,93 +3068,6 @@ const _abi = [
|
|
|
3058
3068
|
stateMutability: "view",
|
|
3059
3069
|
type: "function",
|
|
3060
3070
|
},
|
|
3061
|
-
{
|
|
3062
|
-
inputs: [
|
|
3063
|
-
{
|
|
3064
|
-
internalType: "uint256",
|
|
3065
|
-
name: "packed",
|
|
3066
|
-
type: "uint256",
|
|
3067
|
-
},
|
|
3068
|
-
],
|
|
3069
|
-
name: "unpackAdminThresholds",
|
|
3070
|
-
outputs: [
|
|
3071
|
-
{
|
|
3072
|
-
components: [
|
|
3073
|
-
{
|
|
3074
|
-
internalType: "uint8",
|
|
3075
|
-
name: "sigsManagerRequired",
|
|
3076
|
-
type: "uint8",
|
|
3077
|
-
},
|
|
3078
|
-
{
|
|
3079
|
-
internalType: "uint8",
|
|
3080
|
-
name: "sigsExecutiveRequired",
|
|
3081
|
-
type: "uint8",
|
|
3082
|
-
},
|
|
3083
|
-
{
|
|
3084
|
-
internalType: "bool",
|
|
3085
|
-
name: "configured",
|
|
3086
|
-
type: "bool",
|
|
3087
|
-
},
|
|
3088
|
-
],
|
|
3089
|
-
internalType: "struct Types.AdminMultisigConfig",
|
|
3090
|
-
name: "",
|
|
3091
|
-
type: "tuple",
|
|
3092
|
-
},
|
|
3093
|
-
],
|
|
3094
|
-
stateMutability: "view",
|
|
3095
|
-
type: "function",
|
|
3096
|
-
},
|
|
3097
|
-
{
|
|
3098
|
-
inputs: [
|
|
3099
|
-
{
|
|
3100
|
-
internalType: "uint256",
|
|
3101
|
-
name: "packed",
|
|
3102
|
-
type: "uint256",
|
|
3103
|
-
},
|
|
3104
|
-
],
|
|
3105
|
-
name: "unpackTokenThresholds",
|
|
3106
|
-
outputs: [
|
|
3107
|
-
{
|
|
3108
|
-
components: [
|
|
3109
|
-
{
|
|
3110
|
-
internalType: "uint256",
|
|
3111
|
-
name: "thresholdAmount",
|
|
3112
|
-
type: "uint256",
|
|
3113
|
-
},
|
|
3114
|
-
{
|
|
3115
|
-
internalType: "uint8",
|
|
3116
|
-
name: "sigsExecutiveBelow",
|
|
3117
|
-
type: "uint8",
|
|
3118
|
-
},
|
|
3119
|
-
{
|
|
3120
|
-
internalType: "uint8",
|
|
3121
|
-
name: "sigsExecutiveAbove",
|
|
3122
|
-
type: "uint8",
|
|
3123
|
-
},
|
|
3124
|
-
{
|
|
3125
|
-
internalType: "uint8",
|
|
3126
|
-
name: "sigsBelow",
|
|
3127
|
-
type: "uint8",
|
|
3128
|
-
},
|
|
3129
|
-
{
|
|
3130
|
-
internalType: "uint8",
|
|
3131
|
-
name: "sigsAbove",
|
|
3132
|
-
type: "uint8",
|
|
3133
|
-
},
|
|
3134
|
-
{
|
|
3135
|
-
internalType: "bool",
|
|
3136
|
-
name: "configured",
|
|
3137
|
-
type: "bool",
|
|
3138
|
-
},
|
|
3139
|
-
],
|
|
3140
|
-
internalType: "struct Types.MultisigConfig",
|
|
3141
|
-
name: "",
|
|
3142
|
-
type: "tuple",
|
|
3143
|
-
},
|
|
3144
|
-
],
|
|
3145
|
-
stateMutability: "view",
|
|
3146
|
-
type: "function",
|
|
3147
|
-
},
|
|
3148
3071
|
{
|
|
3149
3072
|
inputs: [],
|
|
3150
3073
|
name: "unpause",
|
|
@@ -14,7 +14,7 @@ export declare class MultisigLib__factory extends ContractFactory {
|
|
|
14
14
|
deploymentTransaction(): ContractTransactionResponse;
|
|
15
15
|
}>;
|
|
16
16
|
connect(runner: ContractRunner | null): MultisigLib__factory;
|
|
17
|
-
static readonly bytecode = "
|
|
17
|
+
static readonly bytecode = "0x6080806040523460175760399081601c823930815050f35b5f80fdfe5f80fdfea264697066735822122002ea187294b298bf7bf6d0a40f9a8b5a245ecd7426c4f8f366b5a9bf3e11584164736f6c634300081c0033";
|
|
18
18
|
static readonly abi: readonly [{
|
|
19
19
|
readonly inputs: readonly [{
|
|
20
20
|
readonly internalType: "uint256";
|
|
@@ -108,7 +108,7 @@ const _abi = [
|
|
|
108
108
|
type: "error",
|
|
109
109
|
},
|
|
110
110
|
];
|
|
111
|
-
const _bytecode = "
|
|
111
|
+
const _bytecode = "0x6080806040523460175760399081601c823930815050f35b5f80fdfe5f80fdfea264697066735822122002ea187294b298bf7bf6d0a40f9a8b5a245ecd7426c4f8f366b5a9bf3e11584164736f6c634300081c0033";
|
|
112
112
|
const isSuperArgs = (xs) => xs.length > 1;
|
|
113
113
|
class MultisigLib__factory extends ethers_1.ContractFactory {
|
|
114
114
|
constructor(...args) {
|
|
@@ -41,6 +41,14 @@ export declare class EscrowAdminUtility {
|
|
|
41
41
|
private missingAddresses;
|
|
42
42
|
private createLookupTable;
|
|
43
43
|
private extendLookupTable;
|
|
44
|
+
/**
|
|
45
|
+
* Polls the lookup table until `predicate` holds, or throws after `timeoutMs`. Pooled RPC
|
|
46
|
+
* endpoints route consecutive requests to backends at slightly different slots, so a write
|
|
47
|
+
* that just confirmed on one node is not yet visible when the next request reads or
|
|
48
|
+
* simulates against it. Every "write the table, then immediately read/extend it" step has
|
|
49
|
+
* to tolerate that lag rather than trusting a single read.
|
|
50
|
+
*/
|
|
51
|
+
private pollLookupTable;
|
|
44
52
|
private waitForLookupTableActivation;
|
|
45
53
|
/** Resolves (and caches) the configured lookup table; [] when none is set or it's missing. */
|
|
46
54
|
private resolveLookupTables;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EscrowAdminUtility.d.ts","sourceRoot":"","sources":["../../../../../src/services/solana/escrow/services/EscrowAdminUtility.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAwD,UAAU,EAAE,OAAO,EAAoB,SA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kBAAkB,CAAC,EAAE,MAAM,GAAG,kBAAkB;CAM5J;AAED,eAAe,kBAAkB,CAAC"}
|
|
@@ -117,10 +117,14 @@ class EscrowAdminUtility {
|
|
|
117
117
|
// Re-read and confirm the table actually covers what we need. A half-provisioned table
|
|
118
118
|
// (created but not extended) silently compiles to a v0 message with zero lookups, giving
|
|
119
119
|
// none of the size saving — so treat partial coverage as a hard failure rather than
|
|
120
|
-
// reporting success and overflowing later.
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
120
|
+
// reporting success and overflowing later. Poll rather than single-read: on a pooled RPC
|
|
121
|
+
// the read right after a write can still land on a backend that hasn't caught up.
|
|
122
|
+
try {
|
|
123
|
+
yield this.pollLookupTable(table, t => this.missingAddresses(t.state.addresses, required).length === 0, "final completeness");
|
|
124
|
+
}
|
|
125
|
+
catch (_a) {
|
|
126
|
+
const settled = yield this.fetchLookupTable(table);
|
|
127
|
+
const stillMissing = settled ? this.missingAddresses(settled.state.addresses, required) : required;
|
|
124
128
|
throw new Error(`Lookup table ${table.toBase58()} is incomplete: ${stillMissing.length}/${required.length} addresses missing`);
|
|
125
129
|
}
|
|
126
130
|
this.lookupTableAddress = table;
|
|
@@ -190,6 +194,10 @@ class EscrowAdminUtility {
|
|
|
190
194
|
authority, payer: authority, recentSlot: slot,
|
|
191
195
|
});
|
|
192
196
|
yield this.sendLegacyTransaction([createIx], signer);
|
|
197
|
+
// Wait until the new account is readable as a LUT before extending it: on a pooled RPC
|
|
198
|
+
// a lagging backend would otherwise simulate the extend against a still-System-owned
|
|
199
|
+
// account and fail with InvalidAccountOwner.
|
|
200
|
+
yield this.pollLookupTable(table, () => true, "post-create visibility");
|
|
193
201
|
yield this.extendLookupTable(table, addresses, signer);
|
|
194
202
|
return table;
|
|
195
203
|
});
|
|
@@ -199,17 +207,50 @@ class EscrowAdminUtility {
|
|
|
199
207
|
const authority = this.provider.wallet.publicKey;
|
|
200
208
|
// Chunked so the extend instruction itself stays under the transaction size limit.
|
|
201
209
|
for (let i = 0; i < addresses.length; i += 20) {
|
|
210
|
+
const chunk = addresses.slice(i, i + 20);
|
|
202
211
|
yield this.sendLegacyTransaction([
|
|
203
212
|
web3_js_1.AddressLookupTableProgram.extendLookupTable({
|
|
204
|
-
payer: authority, authority, lookupTable: table, addresses:
|
|
213
|
+
payer: authority, authority, lookupTable: table, addresses: chunk,
|
|
205
214
|
}),
|
|
206
215
|
], signer);
|
|
216
|
+
// Confirm this chunk landed and propagated before moving on, so a later read
|
|
217
|
+
// (this loop's next chunk, or the caller's completeness check) never sees a
|
|
218
|
+
// stale pre-extend view of the table.
|
|
219
|
+
const want = chunk.map(a => a.toBase58());
|
|
220
|
+
yield this.pollLookupTable(table, t => {
|
|
221
|
+
const have = new Set(t.state.addresses.map(a => a.toBase58()));
|
|
222
|
+
return want.every(a => have.has(a));
|
|
223
|
+
}, `extend chunk @${i}`);
|
|
207
224
|
}
|
|
208
225
|
// A table is only usable from the slot after it was written; wait so the first v0
|
|
209
226
|
// transaction referencing it can actually resolve the accounts.
|
|
210
227
|
yield this.waitForLookupTableActivation(table);
|
|
211
228
|
});
|
|
212
229
|
}
|
|
230
|
+
/**
|
|
231
|
+
* Polls the lookup table until `predicate` holds, or throws after `timeoutMs`. Pooled RPC
|
|
232
|
+
* endpoints route consecutive requests to backends at slightly different slots, so a write
|
|
233
|
+
* that just confirmed on one node is not yet visible when the next request reads or
|
|
234
|
+
* simulates against it. Every "write the table, then immediately read/extend it" step has
|
|
235
|
+
* to tolerate that lag rather than trusting a single read.
|
|
236
|
+
*/
|
|
237
|
+
pollLookupTable(table_1, predicate_1, label_1) {
|
|
238
|
+
return __awaiter(this, arguments, void 0, function* (table, predicate, label, timeoutMs = 45000, intervalMs = 1500) {
|
|
239
|
+
const deadline = Date.now() + timeoutMs;
|
|
240
|
+
let last = null;
|
|
241
|
+
while (Date.now() < deadline) {
|
|
242
|
+
const { value } = yield this.provider.connection.getAddressLookupTable(table, { commitment: "confirmed" });
|
|
243
|
+
if (value) {
|
|
244
|
+
last = value;
|
|
245
|
+
if (predicate(value))
|
|
246
|
+
return value;
|
|
247
|
+
}
|
|
248
|
+
yield new Promise(r => setTimeout(r, intervalMs));
|
|
249
|
+
}
|
|
250
|
+
throw new Error(`Lookup table ${table.toBase58()} did not converge (${label}): ` +
|
|
251
|
+
(last ? `${last.state.addresses.length} addresses on chain` : "table not visible after write"));
|
|
252
|
+
});
|
|
253
|
+
}
|
|
213
254
|
waitForLookupTableActivation(table_1) {
|
|
214
255
|
return __awaiter(this, arguments, void 0, function* (table, timeoutMs = 30000) {
|
|
215
256
|
const startSlot = yield this.provider.connection.getSlot("confirmed");
|
|
@@ -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,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACrB;AACD,MAAM,WAAW,sCAAsC;IACnD,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,Y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EAAE,EAAE,QAAQ,aAAa,EAAE,QAAQ,OAAO,oBAoE/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,oBAgEzB,CAAA"}
|
package/build/utils/custodial.js
CHANGED
|
@@ -204,6 +204,7 @@ const estimate_execute_withdrawal = (chain_id, payload, caller, config) => __awa
|
|
|
204
204
|
});
|
|
205
205
|
exports.estimate_execute_withdrawal = estimate_execute_withdrawal;
|
|
206
206
|
const estimate_escrow_method_call_cost = (chain_id, payloads, dbPool, config) => __awaiter(void 0, void 0, void 0, function* () {
|
|
207
|
+
var _a;
|
|
207
208
|
const errors = new TransactionsErrors_1.default();
|
|
208
209
|
if (payloads.length === 0)
|
|
209
210
|
throw new Error(errors.EmptyPayload("estimating Escrow withdrawal cost"));
|
|
@@ -219,6 +220,24 @@ const estimate_escrow_method_call_cost = (chain_id, payloads, dbPool, config) =>
|
|
|
219
220
|
receiverAddress: p.receiver
|
|
220
221
|
};
|
|
221
222
|
});
|
|
223
|
+
// Check reserves before ever attempting to simulate. A probe against an empty (or
|
|
224
|
+
// under-funded) reserve reverts inside IERC20.safeTransfer, and how that surfaces is
|
|
225
|
+
// entirely up to the token: some revert with a decodable custom error, but non-standard
|
|
226
|
+
// tokens (e.g. mainnet USDT's pre-0.4.22 contract) revert via a bare assert/INVALID opcode
|
|
227
|
+
// with zero returndata — nothing to pattern-match on. Reserves are known upfront and
|
|
228
|
+
// deterministic, so check them directly instead of inferring "no funds" from the shape of
|
|
229
|
+
// a revert. A batch can mix tokens (the queue isn't token-filtered) and `_withdraw` checks
|
|
230
|
+
// each request's reserves independently in the same atomic call, so any one under-funded
|
|
231
|
+
// token sinks the whole batch — check every distinct token, not just the first.
|
|
232
|
+
// Message matches the string this call's callers already fall back on.
|
|
233
|
+
const required_per_token = new Map();
|
|
234
|
+
for (const p of batch_payloads) {
|
|
235
|
+
required_per_token.set(p.tokenAddress, ((_a = required_per_token.get(p.tokenAddress)) !== null && _a !== void 0 ? _a : BigInt(0)) + p.amount);
|
|
236
|
+
}
|
|
237
|
+
const coverages = yield Promise.all([...required_per_token.entries()].map(([tokenAddress, amount]) => Escrow.getReservesCoverage(amount, tokenAddress).then(c => ({ amount, coverage: c }))));
|
|
238
|
+
if (coverages.some(({ amount, coverage }) => coverage.currentReserves < amount)) {
|
|
239
|
+
throw new Error("InsufficientReserves");
|
|
240
|
+
}
|
|
222
241
|
const data = Escrow.interface.encodeFunctionData('batch_withdraw', [
|
|
223
242
|
batch_payloads
|
|
224
243
|
]);
|