holosphere 2.0.0-alpha5 → 2.0.0-alpha6
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/dist/cjs/holosphere.cjs +1 -1
- package/dist/esm/holosphere.js +1 -1
- package/dist/index-BtKHqqet.cjs +5 -0
- package/dist/index-BtKHqqet.cjs.map +1 -0
- package/dist/{index-BG8FStkt.cjs → index-CmzkI7SI.cjs} +2 -2
- package/dist/{index-BG8FStkt.cjs.map → index-CmzkI7SI.cjs.map} +1 -1
- package/dist/{index-Cp3xctq8.js → index-JFz-dW43.js} +2 -2
- package/dist/{index-Cp3xctq8.js.map → index-JFz-dW43.js.map} +1 -1
- package/dist/{index-Bbey4GkP.js → index-NOravBLu.js} +239 -116
- package/dist/index-NOravBLu.js.map +1 -0
- package/dist/{indexeddb-storage-BD70pN7q.cjs → indexeddb-storage-C4HsulhA.cjs} +2 -2
- package/dist/{indexeddb-storage-BD70pN7q.cjs.map → indexeddb-storage-C4HsulhA.cjs.map} +1 -1
- package/dist/{indexeddb-storage-Bjg84U5R.js → indexeddb-storage-OtSAVDZY.js} +2 -2
- package/dist/{indexeddb-storage-Bjg84U5R.js.map → indexeddb-storage-OtSAVDZY.js.map} +1 -1
- package/dist/{memory-storage-CD0XFayE.js → memory-storage-ChpcYvxA.js} +2 -2
- package/dist/{memory-storage-CD0XFayE.js.map → memory-storage-ChpcYvxA.js.map} +1 -1
- package/dist/{memory-storage-DmMyJtOo.cjs → memory-storage-MD6ED00P.cjs} +2 -2
- package/dist/{memory-storage-DmMyJtOo.cjs.map → memory-storage-MD6ED00P.cjs.map} +1 -1
- package/dist/{secp256k1-TcN6vWGh.cjs → secp256k1-DcTYQrqC.cjs} +2 -2
- package/dist/{secp256k1-TcN6vWGh.cjs.map → secp256k1-DcTYQrqC.cjs.map} +1 -1
- package/dist/{secp256k1-69sS9O-P.js → secp256k1-PfNOEI7a.js} +2 -2
- package/dist/{secp256k1-69sS9O-P.js.map → secp256k1-PfNOEI7a.js.map} +1 -1
- package/package.json +1 -1
- package/src/contracts/abis/Bundle.json +1438 -1435
- package/src/contracts/deployer.js +32 -3
- package/src/federation/handshake.js +13 -5
- package/src/index.js +9 -1
- package/src/storage/gun-async.js +55 -6
- package/src/storage/gun-auth.js +81 -30
- package/src/storage/gun-wrapper.js +56 -48
- package/src/storage/nostr-client.js +5 -2
- package/dist/index-Bbey4GkP.js.map +0 -1
- package/dist/index-hfVGRwSr.cjs +0 -5
- package/dist/index-hfVGRwSr.cjs.map +0 -1
|
@@ -361,12 +361,12 @@ async function createPersistentStorage(namespace, options = {}) {
|
|
|
361
361
|
const isBrowser = typeof window !== "undefined" && typeof window.indexedDB !== "undefined";
|
|
362
362
|
typeof process !== "undefined" && process.versions && void 0;
|
|
363
363
|
if (isBrowser) {
|
|
364
|
-
const { IndexedDBStorage } = await import("./indexeddb-storage-
|
|
364
|
+
const { IndexedDBStorage } = await import("./indexeddb-storage-OtSAVDZY.js");
|
|
365
365
|
const storage = new IndexedDBStorage();
|
|
366
366
|
await storage.init(namespace);
|
|
367
367
|
return storage;
|
|
368
368
|
} else {
|
|
369
|
-
const { MemoryStorage } = await import("./memory-storage-
|
|
369
|
+
const { MemoryStorage } = await import("./memory-storage-ChpcYvxA.js");
|
|
370
370
|
const storage = new MemoryStorage();
|
|
371
371
|
await storage.init(namespace);
|
|
372
372
|
return storage;
|
|
@@ -730,7 +730,7 @@ class NostrClient {
|
|
|
730
730
|
*/
|
|
731
731
|
async _doPublish(event, options = {}) {
|
|
732
732
|
const waitForRelays = options.waitForRelays || false;
|
|
733
|
-
const signedEvent = finalizeEvent(event, this.privateKey);
|
|
733
|
+
const signedEvent = event.id && event.sig ? event : finalizeEvent(event, this.privateKey);
|
|
734
734
|
await this._cacheEvent(signedEvent);
|
|
735
735
|
if (this.outboxQueue) {
|
|
736
736
|
await this.outboxQueue.enqueue(signedEvent, this.relays);
|
|
@@ -1560,16 +1560,53 @@ function gunPut(gunChain, data, timeout = 1e3) {
|
|
|
1560
1560
|
});
|
|
1561
1561
|
});
|
|
1562
1562
|
}
|
|
1563
|
-
async function gunMap(gunChain, timeout =
|
|
1563
|
+
async function gunMap(gunChain, timeout = 5e3) {
|
|
1564
1564
|
return new Promise((resolve) => {
|
|
1565
1565
|
const items = {};
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1566
|
+
let settled = false;
|
|
1567
|
+
let expectedCount = 0;
|
|
1568
|
+
let receivedCount = 0;
|
|
1569
|
+
const tryResolve = () => {
|
|
1570
|
+
if (settled) return;
|
|
1571
|
+
if (expectedCount > 0 && receivedCount >= expectedCount) {
|
|
1572
|
+
settled = true;
|
|
1573
|
+
resolve(items);
|
|
1574
|
+
}
|
|
1575
|
+
};
|
|
1576
|
+
gunChain.once((parentData) => {
|
|
1577
|
+
if (settled) return;
|
|
1578
|
+
if (!parentData) {
|
|
1579
|
+
settled = true;
|
|
1580
|
+
resolve({});
|
|
1581
|
+
return;
|
|
1582
|
+
}
|
|
1583
|
+
const keys = Object.keys(parentData).filter((k) => k !== "_");
|
|
1584
|
+
if (keys.length === 0) {
|
|
1585
|
+
settled = true;
|
|
1586
|
+
resolve({});
|
|
1587
|
+
return;
|
|
1569
1588
|
}
|
|
1589
|
+
expectedCount = keys.filter((k) => {
|
|
1590
|
+
const item = parentData[k];
|
|
1591
|
+
return item && typeof item === "object" && item["#"];
|
|
1592
|
+
}).length;
|
|
1593
|
+
if (expectedCount === 0) {
|
|
1594
|
+
settled = true;
|
|
1595
|
+
resolve({});
|
|
1596
|
+
return;
|
|
1597
|
+
}
|
|
1598
|
+
gunChain.map().once((data, key) => {
|
|
1599
|
+
if (settled || !data || key.startsWith("_")) return;
|
|
1600
|
+
items[key] = data;
|
|
1601
|
+
receivedCount++;
|
|
1602
|
+
tryResolve();
|
|
1603
|
+
});
|
|
1570
1604
|
});
|
|
1571
1605
|
setTimeout(() => {
|
|
1572
|
-
|
|
1606
|
+
if (!settled) {
|
|
1607
|
+
settled = true;
|
|
1608
|
+
resolve(items);
|
|
1609
|
+
}
|
|
1573
1610
|
}, timeout);
|
|
1574
1611
|
});
|
|
1575
1612
|
}
|
|
@@ -1664,11 +1701,36 @@ async function read$2(gun, path) {
|
|
|
1664
1701
|
}
|
|
1665
1702
|
return data;
|
|
1666
1703
|
}
|
|
1667
|
-
async function readAll$2(gun, path) {
|
|
1704
|
+
async function readAll$2(gun, path, timeout = 5e3) {
|
|
1668
1705
|
return new Promise((resolve) => {
|
|
1669
1706
|
const output2 = /* @__PURE__ */ new Map();
|
|
1670
1707
|
let settled = false;
|
|
1708
|
+
let expectedCount = 0;
|
|
1709
|
+
let receivedCount = 0;
|
|
1671
1710
|
const ref = gun.get(path);
|
|
1711
|
+
const tryResolve = () => {
|
|
1712
|
+
if (settled) return;
|
|
1713
|
+
if (expectedCount > 0 && receivedCount >= expectedCount) {
|
|
1714
|
+
settled = true;
|
|
1715
|
+
resolve(Array.from(output2.values()));
|
|
1716
|
+
}
|
|
1717
|
+
};
|
|
1718
|
+
const parseItem = (data) => {
|
|
1719
|
+
if (!data) return null;
|
|
1720
|
+
let item = null;
|
|
1721
|
+
if (data._json && typeof data._json === "string") {
|
|
1722
|
+
try {
|
|
1723
|
+
item = JSON.parse(data._json);
|
|
1724
|
+
} catch (e) {
|
|
1725
|
+
}
|
|
1726
|
+
} else if (typeof data === "string") {
|
|
1727
|
+
try {
|
|
1728
|
+
item = JSON.parse(data);
|
|
1729
|
+
} catch (e) {
|
|
1730
|
+
}
|
|
1731
|
+
}
|
|
1732
|
+
return item;
|
|
1733
|
+
};
|
|
1672
1734
|
ref.once((parentData) => {
|
|
1673
1735
|
if (settled) return;
|
|
1674
1736
|
if (!parentData) {
|
|
@@ -1682,64 +1744,47 @@ async function readAll$2(gun, path) {
|
|
|
1682
1744
|
resolve([]);
|
|
1683
1745
|
return;
|
|
1684
1746
|
}
|
|
1747
|
+
const referenceKeys = [];
|
|
1685
1748
|
for (const key of keys) {
|
|
1686
1749
|
const rawItem = parentData[key];
|
|
1687
1750
|
if (!rawItem) continue;
|
|
1688
|
-
let item = null;
|
|
1689
1751
|
if (typeof rawItem === "object" && rawItem["#"]) {
|
|
1752
|
+
referenceKeys.push(key);
|
|
1690
1753
|
continue;
|
|
1691
1754
|
}
|
|
1692
|
-
|
|
1693
|
-
try {
|
|
1694
|
-
item = JSON.parse(rawItem._json);
|
|
1695
|
-
} catch (e) {
|
|
1696
|
-
}
|
|
1697
|
-
} else if (typeof rawItem === "string") {
|
|
1698
|
-
try {
|
|
1699
|
-
item = JSON.parse(rawItem);
|
|
1700
|
-
} catch (e) {
|
|
1701
|
-
}
|
|
1702
|
-
}
|
|
1755
|
+
const item = parseItem(rawItem);
|
|
1703
1756
|
if (item && item.id && !item._deleted) {
|
|
1704
1757
|
output2.set(item.id, item);
|
|
1758
|
+
receivedCount++;
|
|
1705
1759
|
}
|
|
1706
1760
|
}
|
|
1707
|
-
|
|
1761
|
+
expectedCount = referenceKeys.length;
|
|
1762
|
+
if (expectedCount === 0) {
|
|
1708
1763
|
settled = true;
|
|
1709
1764
|
resolve(Array.from(output2.values()));
|
|
1710
1765
|
return;
|
|
1711
1766
|
}
|
|
1712
1767
|
ref.map().once((data, key) => {
|
|
1713
1768
|
if (settled || !data || key === "_") return;
|
|
1714
|
-
|
|
1715
|
-
if (data._json && typeof data._json === "string") {
|
|
1716
|
-
try {
|
|
1717
|
-
item = JSON.parse(data._json);
|
|
1718
|
-
} catch (e) {
|
|
1719
|
-
}
|
|
1720
|
-
} else if (typeof data === "string") {
|
|
1721
|
-
try {
|
|
1722
|
-
item = JSON.parse(data);
|
|
1723
|
-
} catch (e) {
|
|
1724
|
-
}
|
|
1725
|
-
}
|
|
1769
|
+
const item = parseItem(data);
|
|
1726
1770
|
if (item && item.id && !item._deleted) {
|
|
1727
|
-
output2.
|
|
1771
|
+
if (!output2.has(item.id)) {
|
|
1772
|
+
output2.set(item.id, item);
|
|
1773
|
+
receivedCount++;
|
|
1774
|
+
tryResolve();
|
|
1775
|
+
}
|
|
1776
|
+
} else {
|
|
1777
|
+
receivedCount++;
|
|
1778
|
+
tryResolve();
|
|
1728
1779
|
}
|
|
1729
1780
|
});
|
|
1730
|
-
setTimeout(() => {
|
|
1731
|
-
if (!settled) {
|
|
1732
|
-
settled = true;
|
|
1733
|
-
resolve(Array.from(output2.values()));
|
|
1734
|
-
}
|
|
1735
|
-
}, 500);
|
|
1736
1781
|
});
|
|
1737
1782
|
setTimeout(() => {
|
|
1738
1783
|
if (!settled) {
|
|
1739
1784
|
settled = true;
|
|
1740
1785
|
resolve(Array.from(output2.values()));
|
|
1741
1786
|
}
|
|
1742
|
-
},
|
|
1787
|
+
}, timeout);
|
|
1743
1788
|
});
|
|
1744
1789
|
}
|
|
1745
1790
|
async function update$2(gun, path, updates) {
|
|
@@ -2823,11 +2868,12 @@ class GunAuth {
|
|
|
2823
2868
|
}
|
|
2824
2869
|
/**
|
|
2825
2870
|
* Read all data from a private lens
|
|
2871
|
+
* First gets count of items, then collects until count is reached
|
|
2826
2872
|
* @param {string} lens - Lens name
|
|
2827
|
-
* @param {number} timeout - Timeout in ms
|
|
2873
|
+
* @param {number} timeout - Timeout in ms (fallback)
|
|
2828
2874
|
* @returns {Promise<Object[]>} Array of data objects
|
|
2829
2875
|
*/
|
|
2830
|
-
async readAllPrivate(lens, timeout =
|
|
2876
|
+
async readAllPrivate(lens, timeout = 5e3) {
|
|
2831
2877
|
if (!this.isAuthenticated()) {
|
|
2832
2878
|
throw new Error("Not authenticated");
|
|
2833
2879
|
}
|
|
@@ -2835,37 +2881,75 @@ class GunAuth {
|
|
|
2835
2881
|
const results = [];
|
|
2836
2882
|
const seen = /* @__PURE__ */ new Set();
|
|
2837
2883
|
const ref = this.getPrivatePath(lens);
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2884
|
+
let settled = false;
|
|
2885
|
+
let expectedCount = 0;
|
|
2886
|
+
let receivedCount = 0;
|
|
2887
|
+
const tryResolve = () => {
|
|
2888
|
+
if (settled) return;
|
|
2889
|
+
if (expectedCount > 0 && receivedCount >= expectedCount) {
|
|
2890
|
+
settled = true;
|
|
2891
|
+
resolve(results);
|
|
2842
2892
|
}
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
parsed = JSON.parse(data._json);
|
|
2858
|
-
} catch (e) {
|
|
2859
|
-
}
|
|
2860
|
-
} else if (typeof data === "object") {
|
|
2861
|
-
parsed = { ...data };
|
|
2862
|
-
delete parsed["_"];
|
|
2893
|
+
};
|
|
2894
|
+
const parseItem = (data) => {
|
|
2895
|
+
if (!data) return null;
|
|
2896
|
+
let parsed = null;
|
|
2897
|
+
if (typeof data === "string") {
|
|
2898
|
+
try {
|
|
2899
|
+
parsed = JSON.parse(data);
|
|
2900
|
+
} catch (e) {
|
|
2901
|
+
parsed = data;
|
|
2902
|
+
}
|
|
2903
|
+
} else if (data._json && typeof data._json === "string") {
|
|
2904
|
+
try {
|
|
2905
|
+
parsed = JSON.parse(data._json);
|
|
2906
|
+
} catch (e) {
|
|
2863
2907
|
}
|
|
2908
|
+
} else if (typeof data === "object") {
|
|
2909
|
+
parsed = { ...data };
|
|
2910
|
+
delete parsed["_"];
|
|
2911
|
+
}
|
|
2912
|
+
return parsed;
|
|
2913
|
+
};
|
|
2914
|
+
ref.once((parentData) => {
|
|
2915
|
+
if (settled) return;
|
|
2916
|
+
if (!parentData) {
|
|
2917
|
+
settled = true;
|
|
2918
|
+
resolve([]);
|
|
2919
|
+
return;
|
|
2920
|
+
}
|
|
2921
|
+
const keys = Object.keys(parentData).filter((k) => k !== "_");
|
|
2922
|
+
if (keys.length === 0) {
|
|
2923
|
+
settled = true;
|
|
2924
|
+
resolve([]);
|
|
2925
|
+
return;
|
|
2926
|
+
}
|
|
2927
|
+
expectedCount = keys.filter((k) => {
|
|
2928
|
+
const item = parentData[k];
|
|
2929
|
+
return item && typeof item === "object" && item["#"];
|
|
2930
|
+
}).length;
|
|
2931
|
+
if (expectedCount === 0) {
|
|
2932
|
+
settled = true;
|
|
2933
|
+
resolve([]);
|
|
2934
|
+
return;
|
|
2935
|
+
}
|
|
2936
|
+
ref.map().once((data, key) => {
|
|
2937
|
+
if (settled || !data || key.startsWith("_") || seen.has(key)) return;
|
|
2938
|
+
seen.add(key);
|
|
2939
|
+
const parsed = parseItem(data);
|
|
2864
2940
|
if (parsed && !parsed._deleted) {
|
|
2865
2941
|
results.push(parsed);
|
|
2866
2942
|
}
|
|
2867
|
-
|
|
2943
|
+
receivedCount++;
|
|
2944
|
+
tryResolve();
|
|
2945
|
+
});
|
|
2868
2946
|
});
|
|
2947
|
+
setTimeout(() => {
|
|
2948
|
+
if (!settled) {
|
|
2949
|
+
settled = true;
|
|
2950
|
+
resolve(results);
|
|
2951
|
+
}
|
|
2952
|
+
}, timeout);
|
|
2869
2953
|
});
|
|
2870
2954
|
}
|
|
2871
2955
|
/**
|
|
@@ -3562,7 +3646,7 @@ class GunDBBackend extends StorageBackend {
|
|
|
3562
3646
|
}
|
|
3563
3647
|
}
|
|
3564
3648
|
const name = "holosphere";
|
|
3565
|
-
const version$1 = "2.0.0-
|
|
3649
|
+
const version$1 = "2.0.0-alpha6";
|
|
3566
3650
|
const description = "Holonic geospatial communication infrastructure combining H3 hexagonal indexing with distributed P2P storage";
|
|
3567
3651
|
const type = "module";
|
|
3568
3652
|
const bin = {
|
|
@@ -5459,7 +5543,7 @@ const sha256 = sha256$1;
|
|
|
5459
5543
|
let secp256k1 = null;
|
|
5460
5544
|
async function loadCrypto() {
|
|
5461
5545
|
if (!secp256k1) {
|
|
5462
|
-
const module2 = await import("./secp256k1-
|
|
5546
|
+
const module2 = await import("./secp256k1-PfNOEI7a.js");
|
|
5463
5547
|
secp256k1 = module2.secp256k1;
|
|
5464
5548
|
}
|
|
5465
5549
|
return secp256k1;
|
|
@@ -6674,8 +6758,8 @@ async function initiateFederationHandshake(holosphere, privateKey, params) {
|
|
|
6674
6758
|
message
|
|
6675
6759
|
} = params;
|
|
6676
6760
|
try {
|
|
6677
|
-
const {
|
|
6678
|
-
const senderPubKey =
|
|
6761
|
+
const { getPublicKey: getPublicKey2 } = await Promise.resolve().then(() => nostrUtils);
|
|
6762
|
+
const senderPubKey = getPublicKey2(privateKey);
|
|
6679
6763
|
const request = createFederationRequest({
|
|
6680
6764
|
senderHolonId: holonId,
|
|
6681
6765
|
senderHolonName: holonName,
|
|
@@ -6710,8 +6794,8 @@ async function acceptFederationRequest$1(holosphere, privateKey, params) {
|
|
|
6710
6794
|
message
|
|
6711
6795
|
} = params;
|
|
6712
6796
|
try {
|
|
6713
|
-
const {
|
|
6714
|
-
const responderPubKey =
|
|
6797
|
+
const { getPublicKey: getPublicKey2 } = await Promise.resolve().then(() => nostrUtils);
|
|
6798
|
+
const responderPubKey = getPublicKey2(privateKey);
|
|
6715
6799
|
if (holosphere.client) {
|
|
6716
6800
|
await addFederatedPartner(holosphere.client, holosphere.config.appName, senderPubKey, {
|
|
6717
6801
|
alias: request.senderHolonName,
|
|
@@ -6723,6 +6807,10 @@ async function acceptFederationRequest$1(holosphere, privateKey, params) {
|
|
|
6723
6807
|
}
|
|
6724
6808
|
}
|
|
6725
6809
|
}
|
|
6810
|
+
await holosphere.federateHolon(holonId, senderPubKey, {
|
|
6811
|
+
lensConfig,
|
|
6812
|
+
partnerName: request.senderHolonName
|
|
6813
|
+
});
|
|
6726
6814
|
const response = createFederationResponse({
|
|
6727
6815
|
requestId: request.requestId,
|
|
6728
6816
|
status: "accepted",
|
|
@@ -17089,7 +17177,7 @@ class ChainManager {
|
|
|
17089
17177
|
*/
|
|
17090
17178
|
async _loadEthers() {
|
|
17091
17179
|
if (!this.ethers) {
|
|
17092
|
-
const ethersModule = await import("./index-
|
|
17180
|
+
const ethersModule = await import("./index-JFz-dW43.js");
|
|
17093
17181
|
this.ethers = ethersModule;
|
|
17094
17182
|
}
|
|
17095
17183
|
return this.ethers;
|
|
@@ -17273,11 +17361,11 @@ class ChainManager {
|
|
|
17273
17361
|
* @param {boolean} [useSigner=true] - Use signer for write operations
|
|
17274
17362
|
* @returns {Contract}
|
|
17275
17363
|
*/
|
|
17276
|
-
async getContract(address,
|
|
17364
|
+
async getContract(address, abi2, useSigner = true) {
|
|
17277
17365
|
this._requireInitialized();
|
|
17278
17366
|
const ethers = await this._loadEthers();
|
|
17279
17367
|
const signerOrProvider = useSigner && this.signer ? this.signer : this.provider;
|
|
17280
|
-
return new ethers.Contract(address,
|
|
17368
|
+
return new ethers.Contract(address, abi2, signerOrProvider);
|
|
17281
17369
|
}
|
|
17282
17370
|
/**
|
|
17283
17371
|
* Deploy a contract
|
|
@@ -17286,13 +17374,13 @@ class ChainManager {
|
|
|
17286
17374
|
* @param {Array} [constructorArgs=[]] - Constructor arguments
|
|
17287
17375
|
* @returns {Promise<{contract, address, deployTx}>}
|
|
17288
17376
|
*/
|
|
17289
|
-
async deployContract(
|
|
17377
|
+
async deployContract(abi2, bytecode2, constructorArgs = []) {
|
|
17290
17378
|
this._requireInitialized();
|
|
17291
17379
|
if (!this.signer) {
|
|
17292
17380
|
throw new Error("Signer required for contract deployment");
|
|
17293
17381
|
}
|
|
17294
17382
|
const ethers = await this._loadEthers();
|
|
17295
|
-
const factory = new ethers.ContractFactory(
|
|
17383
|
+
const factory = new ethers.ContractFactory(abi2, bytecode2, this.signer);
|
|
17296
17384
|
const contract = await factory.deploy(...constructorArgs);
|
|
17297
17385
|
await contract.waitForDeployment();
|
|
17298
17386
|
const address = await contract.getAddress();
|
|
@@ -23011,7 +23099,7 @@ const AppreciativeABI = [
|
|
|
23011
23099
|
anonymous: false
|
|
23012
23100
|
}
|
|
23013
23101
|
];
|
|
23014
|
-
const
|
|
23102
|
+
const abi = [
|
|
23015
23103
|
{
|
|
23016
23104
|
type: "constructor",
|
|
23017
23105
|
inputs: [
|
|
@@ -24446,6 +24534,11 @@ const BundleABI = [
|
|
|
24446
24534
|
]
|
|
24447
24535
|
}
|
|
24448
24536
|
];
|
|
24537
|
+
const bytecode = "0x60806040526040518060400160405280600681526020017f42756e646c650000000000000000000000000000000000000000000000000000815250600290816200004a9190620006da565b5034801562000057575f80fd5b5060405162007e0338038062007e0383398181016040528101906200007d9190620009a6565b60015f819055505f821180156200009b5750670de0b6b3a764000082105b620000dd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000d49062000ac6565b60405180910390fd5b8460035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508460045f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503360055f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508260019081620001ae9190620006da565b5081601381905550806014819055506001600985604051620001d1919062000b26565b90815260200160405180910390205f6101000a81548160ff021916908315150217905550600684908060018154018082558091505060019003905f5260205f20015f909190919091509081620002289190620006da565b50620002396200024460201b60201c565b505050505062000d3a565b60185f620002539190620003e9565b600160145462000264919062000b6b565b67ffffffffffffffff81111562000280576200027f62000480565b5b604051908082528060200260200182016040528015620002af5781602001602082028036833780820191505090505b5060189080519060200190620002c792919062000409565b505f6019819055505f670de0b6b3a764000090505f5b60145481116200037b578160188281548110620002ff57620002fe62000ba5565b5b905f5260205f2001819055508160155f8381526020019081526020015f20805490506200032d919062000bd2565b60195f8282546200033f919062000b6b565b925050819055506200036382601354670de0b6b3a76400006200037f60201b60201c565b91508080620003729062000c1c565b915050620002dd565b5050565b5f808211620003c5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620003bc9062000cb6565b60405180910390fd5b818385620003d4919062000bd2565b620003e0919062000d03565b90509392505050565b5080545f8255905f5260205f209081019062000406919062000459565b50565b828054828255905f5260205f2090810192821562000446579160200282015b828111156200044557825182559160200191906001019062000428565b5b50905062000455919062000459565b5090565b5b8082111562000472575f815f9055506001016200045a565b5090565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680620004f257607f821691505b602082108103620005085762000507620004ad565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026200056c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200052f565b6200057886836200052f565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f620005c2620005bc620005b68462000590565b62000599565b62000590565b9050919050565b5f819050919050565b620005dd83620005a2565b620005f5620005ec82620005c9565b8484546200053b565b825550505050565b5f90565b6200060b620005fd565b62000618818484620005d2565b505050565b5b818110156200063f57620006335f8262000601565b6001810190506200061e565b5050565b601f8211156200068e5762000658816200050e565b620006638462000520565b8101602085101562000673578190505b6200068b620006828562000520565b8301826200061d565b50505b505050565b5f82821c905092915050565b5f620006b05f198460080262000693565b1980831691505092915050565b5f620006ca83836200069f565b9150826002028217905092915050565b620006e58262000476565b67ffffffffffffffff81111562000701576200070062000480565b5b6200070d8254620004da565b6200071a82828562000643565b5f60209050601f83116001811462000750575f84156200073b578287015190505b620007478582620006bd565b865550620007b6565b601f19841662000760866200050e565b5f5b82811015620007895784890151825560018201915060208501945060208101905062000762565b86831015620007a95784890151620007a5601f8916826200069f565b8355505b6001600288020188555050505b505050505050565b5f604051905090565b5f80fd5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f620007fa82620007cf565b9050919050565b6200080c81620007ee565b811462000817575f80fd5b50565b5f815190506200082a8162000801565b92915050565b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b620008538262000838565b810181811067ffffffffffffffff8211171562000875576200087462000480565b5b80604052505050565b5f62000889620007be565b905062000897828262000848565b919050565b5f67ffffffffffffffff821115620008b957620008b862000480565b5b620008c48262000838565b9050602081019050919050565b5f5b83811015620008f0578082015181840152602081019050620008d3565b5f8484015250505050565b5f620009116200090b846200089c565b6200087e565b90508281526020810184848401111562000930576200092f62000834565b5b6200093d848285620008d1565b509392505050565b5f82601f8301126200095c576200095b62000830565b5b81516200096e848260208601620008fb565b91505092915050565b620009828162000590565b81146200098d575f80fd5b50565b5f81519050620009a08162000977565b92915050565b5f805f805f60a08688031215620009c257620009c1620007c7565b5b5f620009d1888289016200081a565b955050602086015167ffffffffffffffff811115620009f557620009f4620007cb565b5b62000a038882890162000945565b945050604086015167ffffffffffffffff81111562000a275762000a26620007cb565b5b62000a358882890162000945565b935050606062000a488882890162000990565b925050608062000a5b8882890162000990565b9150509295509295909350565b5f82825260208201905092915050565b7f53746565706e657373206d7573742062652030203c2073203c203165313800005f82015250565b5f62000aae601e8362000a68565b915062000abb8262000a78565b602082019050919050565b5f6020820190508181035f83015262000adf8162000aa0565b9050919050565b5f81905092915050565b5f62000afc8262000476565b62000b08818562000ae6565b935062000b1a818560208601620008d1565b80840191505092915050565b5f62000b33828462000af0565b915081905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f62000b778262000590565b915062000b848362000590565b925082820190508082111562000b9f5762000b9e62000b3e565b5b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f62000bde8262000590565b915062000beb8362000590565b925082820262000bfb8162000590565b9150828204841483151762000c155762000c1462000b3e565b5b5092915050565b5f62000c288262000590565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820362000c5d5762000c5c62000b3e565b5b600182019050919050565b7f4469766973696f6e206279207a65726f000000000000000000000000000000005f82015250565b5f62000c9e60108362000a68565b915062000cab8262000c68565b602082019050919050565b5f6020820190508181035f83015262000ccf8162000c90565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f62000d0f8262000590565b915062000d1c8362000590565b92508262000d2f5762000d2e62000cd6565b5b828204905092915050565b6170bb8062000d485f395ff3fe608060405260043610610338575f3560e01c806377e7fca2116101aa578063c21be6ae116100f6578063dad4ae3711610094578063e1f1c4a71161006e578063e1f1c4a714610ca5578063e8d5940d14610ccf578063ead6252014610cf7578063f59e4f6514610d3357610349565b8063dad4ae3714610c03578063de8fa43114610c3f578063e15b3f5f14610c6957610349565b8063cafa4ffa116100d0578063cafa4ffa14610b4b578063cc18494814610b75578063d118a53f14610bb1578063d7841a1c14610bdb57610349565b8063c21be6ae14610aa9578063c45a015514610ae5578063ca22431314610b0f57610349565b8063873010d911610163578063918f96871161013d578063918f9687146109e1578063981a63dc14610a09578063b801603514610a45578063b99ef1fa14610a6d57610349565b8063873010d91461095157806387563ec11461098d5780638da5cb5b146109b757610349565b806377e7fca2146108355780637a3c22eb1461085f5780637b0a7e33146108875780637c59dd5f146108c35780637ed628bb146108ff578063804d74701461092957610349565b806339bfeae31161028457806357a32534116102225780636a146024116101fc5780636a1460241461078f5780636bd39c52146107b95780636cc6837e146107e35780636d2687c0146107f957610349565b806357a325341461071557806360a1da831461075157806362d73eb81461077957610349565b80634635fd681161025e5780634635fd681461064b57806351599b151461068757806353055481146106c35780635744426e146106ff57610349565b806339bfeae3146105ab578063404880d9146105e7578063441179e51461062357610349565b806321670f22116102f15780633477ee2e116102cb5780633477ee2e146104e3578063363454ee1461051f578063372c3e7c1461055b57806338eccabd1461058357610349565b806321670f221461046157806328c317d71461047d57806333d6e65f146104b957610349565b806302d05d3f1461035557806306a49fce1461037f57806306fdde03146103a957806312feb905146103d35780631821fcab146103fd5780631a2f4ee51461043957610349565b36610349576103475f34610d5d565b005b6103535f34610d5d565b005b348015610360575f80fd5b50610369611149565b604051610376919061509c565b60405180910390f35b34801561038a575f80fd5b5061039361116e565b6040516103a091906151fa565b60405180910390f35b3480156103b4575f80fd5b506103bd611242565b6040516103ca9190615262565b60405180910390f35b3480156103de575f80fd5b506103e76112ce565b6040516103f491906151fa565b60405180910390f35b348015610408575f80fd5b50610423600480360381019061041e91906153bf565b6113a2565b604051610430919061541e565b60405180910390f35b348015610444575f80fd5b5061045f600480360381019061045a9190615461565b6113cf565b005b61047b600480360381019061047691906154c9565b610d5d565b005b348015610488575f80fd5b506104a3600480360381019061049e91906153bf565b6114f8565b6040516104b091906155be565b60405180910390f35b3480156104c4575f80fd5b506104cd6115a1565b6040516104da919061541e565b60405180910390f35b3480156104ee575f80fd5b50610509600480360381019061050491906155de565b6115a7565b6040516105169190615262565b60405180910390f35b34801561052a575f80fd5b50610545600480360381019061054091906153bf565b61164d565b6040516105529190615623565b60405180910390f35b348015610566575f80fd5b50610581600480360381019061057c91906155de565b611682565b005b34801561058e575f80fd5b506105a960048036038101906105a491906153bf565b611723565b005b3480156105b6575f80fd5b506105d160048036038101906105cc91906153bf565b61189c565b6040516105de9190615623565b60405180910390f35b3480156105f2575f80fd5b5061060d600480360381019061060891906153bf565b6118d1565b60405161061a9190615623565b60405180910390f35b34801561062e575f80fd5b506106496004803603810190610644919061563c565b611906565b005b348015610656575f80fd5b50610671600480360381019061066c91906155de565b611c2b565b60405161067e9190615262565b60405180910390f35b348015610692575f80fd5b506106ad60048036038101906106a891906153bf565b611cd1565b6040516106ba9190615623565b60405180910390f35b3480156106ce575f80fd5b506106e960048036038101906106e49190615696565b611d06565b6040516106f6919061541e565b60405180910390f35b34801561070a575f80fd5b50610713611d1b565b005b348015610720575f80fd5b5061073b600480360381019061073691906153bf565b611e3f565b604051610748919061541e565b60405180910390f35b34801561075c575f80fd5b50610777600480360381019061077291906156c1565b611e6c565b005b348015610784575f80fd5b5061078d612201565b005b34801561079a575f80fd5b506107a361245e565b6040516107b0919061541e565b60405180910390f35b3480156107c4575f80fd5b506107cd61246a565b6040516107da919061541e565b60405180910390f35b3480156107ee575f80fd5b506107f7612470565b005b348015610804575f80fd5b5061081f600480360381019061081a91906155de565b612987565b60405161082c9190615262565b60405180910390f35b348015610840575f80fd5b50610849612a2d565b604051610856919061541e565b60405180910390f35b34801561086a575f80fd5b50610885600480360381019061088091906153bf565b612a33565b005b348015610892575f80fd5b506108ad60048036038101906108a891906155de565b612c87565b6040516108ba91906151fa565b60405180910390f35b3480156108ce575f80fd5b506108e960048036038101906108e491906153bf565b612d6c565b6040516108f69190615623565b60405180910390f35b34801561090a575f80fd5b50610913612da1565b6040516109209190615623565b60405180910390f35b348015610934575f80fd5b5061094f600480360381019061094a91906157fd565b612db3565b005b34801561095c575f80fd5b50610977600480360381019061097291906155de565b612fac565b604051610984919061541e565b60405180910390f35b348015610998575f80fd5b506109a1612fcc565b6040516109ae919061541e565b60405180910390f35b3480156109c2575f80fd5b506109cb612fd2565b6040516109d8919061509c565b60405180910390f35b3480156109ec575f80fd5b50610a076004803603810190610a0291906153bf565b612ff7565b005b348015610a14575f80fd5b50610a2f6004803603810190610a2a91906153bf565b6131ab565b604051610a3c9190615262565b60405180910390f35b348015610a50575f80fd5b50610a6b6004803603810190610a669190615904565b61325e565b005b348015610a78575f80fd5b50610a936004803603810190610a8e91906153bf565b61368c565b604051610aa0919061541e565b60405180910390f35b348015610ab4575f80fd5b50610acf6004803603810190610aca91906153bf565b6136b9565b604051610adc919061509c565b60405180910390f35b348015610af0575f80fd5b50610af9613701565b604051610b06919061509c565b60405180910390f35b348015610b1a575f80fd5b50610b356004803603810190610b3091906156c1565b613726565b604051610b42919061541e565b60405180910390f35b348015610b56575f80fd5b50610b5f61375e565b604051610b6c919061541e565b60405180910390f35b348015610b80575f80fd5b50610b9b6004803603810190610b96919061563c565b613764565b604051610ba8919061509c565b60405180910390f35b348015610bbc575f80fd5b50610bc56137c4565b604051610bd29190615a31565b60405180910390f35b348015610be6575f80fd5b50610c016004803603810190610bfc91906155de565b61381a565b005b348015610c0e575f80fd5b50610c296004803603810190610c2491906153bf565b613947565b604051610c369190615623565b60405180910390f35b348015610c4a575f80fd5b50610c5361397c565b604051610c60919061541e565b60405180910390f35b348015610c74575f80fd5b50610c8f6004803603810190610c8a91906153bf565b613988565b604051610c9c919061541e565b60405180910390f35b348015610cb0575f80fd5b50610cb96139b5565b604051610cc6919061541e565b60405180910390f35b348015610cda575f80fd5b50610cf56004803603810190610cf09190615a51565b6139bb565b005b348015610d02575f80fd5b50610d1d6004803603810190610d189190615461565b613ca9565b604051610d2a9190615262565b60405180910390f35b348015610d3e575f80fd5b50610d47613d5a565b604051610d549190615262565b60405180910390f35b610d65613de6565b5f8034118015610da057505f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b90505f8115610e18573492503373ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167f37de26b9f29dba736fb8291dad9ace7d2f6dc76e3e5faaeca097145b5298f94b5f86604051610e0b929190615ac7565b60405180910390a3610f8a565b8390505f600d5f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20548273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610e93919061509c565b602060405180830381865afa158015610eae573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ed29190615b02565b610edc9190615b5a565b905083811015610f21576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f1890615bd7565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167f37de26b9f29dba736fb8291dad9ace7d2f6dc76e3e5faaeca097145b5298f94b8787604051610f80929190615ac7565b60405180910390a3505b5f610f9a84600e54612710613e2a565b90505f8185610fa99190615b5a565b90505f8083118015610fbf57505f601080549050115b15610fde57610fd087848787613e8d565b81610fdb9190615bf5565b90505b5f82118015610fee57505f601954115b1561100d57610fff87838787613fb6565b8161100a9190615bf5565b90505b3073ffffffffffffffffffffffffffffffffffffffff167fd83308e9158842b2115ec5e6f6395db42fff24e4b5506ef42fe33854fafad655878388611087576040518060400160405280600581526020017f45524332300000000000000000000000000000000000000000000000000000008152506110be565b6040518060400160405280600381526020017f45544800000000000000000000000000000000000000000000000000000000008152505b6040516110cd93929190615c28565b60405180910390a23073ffffffffffffffffffffffffffffffffffffffff167fc2d2b959adca67349f750fed9ef9eaefbec59f24fa563c7fa410157130395c4060018761111a578961111c565b5f5b89855f604051611130959493929190615d96565b60405180910390a25050505050611145614184565b5050565b60045f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6060601b805480602002602001604051908101604052809291908181526020015f905b82821015611239578382905f5260205f200180546111ae90615c91565b80601f01602080910402602001604051908101604052809291908181526020018280546111da90615c91565b80156112255780601f106111fc57610100808354040283529160200191611225565b820191905f5260205f20905b81548152906001019060200180831161120857829003601f168201915b505050505081526020019060010190611191565b50505050905090565b6001805461124f90615c91565b80601f016020809104026020016040519081016040528092919081815260200182805461127b90615c91565b80156112c65780601f1061129d576101008083540402835291602001916112c6565b820191905f5260205f20905b8154815290600101906020018083116112a957829003601f168201915b505050505081565b60606010805480602002602001604051908101604052809291908181526020015f905b82821015611399578382905f5260205f2001805461130e90615c91565b80601f016020809104026020016040519081016040528092919081815260200182805461133a90615c91565b80156113855780601f1061135c57610100808354040283529160200191611385565b820191905f5260205f20905b81548152906001019060200180831161136857829003601f168201915b5050505050815260200190600101906112f1565b50505050905090565b6016818051602081018201805184825260208301602085012081835280955050505050505f915090505481565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461145e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161145590615e38565b60405180910390fd5b612710818361146d9190615bf5565b146114ad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114a490615ea0565b60405180910390fd5b81600e8190555080600f819055507f29dd4a83e71eab2a472a8bb7a7bb9467395098acb48b07c8d9ea7294de0ba0ae82826040516114ec929190615ebe565b60405180910390a15050565b6060600c8260405161150a9190615f1f565b908152602001604051809103902080548060200260200160405190810160405280929190818152602001828054801561159557602002820191905f5260205f20905b815f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001906001019080831161154c575b50505050509050919050565b60145481565b601b81815481106115b6575f80fd5b905f5260205f20015f9150905080546115ce90615c91565b80601f01602080910402602001604051908101604052809291908181526020018280546115fa90615c91565b80156116455780601f1061161c57610100808354040283529160200191611645565b820191905f5260205f20905b81548152906001019060200180831161162857829003601f168201915b505050505081565b6008818051602081018201805184825260208301602085012081835280955050505050505f915054906101000a900460ff1681565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611711576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161170890615e38565b60405180910390fd5b8060148190555061172061418d565b50565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146117b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117a990615e38565b60405180910390fd5b6017816040516117c29190615f1f565b90815260200160405180910390205f9054906101000a900460ff1661181c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161181390615f7f565b60405180910390fd5b611825816142ab565b5f6017826040516118369190615f1f565b90815260200160405180910390205f6101000a81548160ff02191690831515021790555061186261418d565b7fe6db474363a3116f4cf525fc0d78d9dd53e214383db31efef8368f08c4bf7991816040516118919190615262565b60405180910390a150565b601e818051602081018201805184825260208301602085012081835280955050505050505f915054906101000a900460ff1681565b6009818051602081018201805184825260208301602085012081835280955050505050505f915054906101000a900460ff1681565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611995576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161198c90615e38565b60405180910390fd5b6009826040516119a59190615f1f565b90815260200160405180910390205f9054906101000a900460ff166119ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119f690615fe7565b60405180910390fd5b601454811115611a44576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a3b9061604f565b60405180910390fd5b5f601783604051611a559190615f1f565b90815260200160405180910390205f9054906101000a900460ff16611a9a577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff611aba565b601683604051611aaa9190615f1f565b9081526020016040518091039020545b9050601783604051611acc9190615f1f565b90815260200160405180910390205f9054906101000a900460ff1615611af657611af5836142ab565b5b81601684604051611b079190615f1f565b90815260200160405180910390208190555060155f8381526020019081526020015f2083908060018154018082558091505060019003905f5260205f20015f909190919091509081611b5991906161ef565b506001601784604051611b6c9190615f1f565b90815260200160405180910390205f6101000a81548160ff021916908315150217905550611b9861418d565b7f9bca84993827a6bd2bc824f45db9e0ae931cf1f7b1706b7c735ba0102300b4ca8383604051611bc99291906162be565b60405180910390a13073ffffffffffffffffffffffffffffffffffffffff167f7d482c93a88a92e4d27ba697265785162f607bc0ac6c55b868232b3ba3fbb63d6001858486604051611c1e94939291906162ec565b60405180910390a2505050565b60068181548110611c3a575f80fd5b905f5260205f20015f915090508054611c5290615c91565b80601f0160208091040260200160405190810160405280929190818152602001828054611c7e90615c91565b8015611cc95780601f10611ca057610100808354040283529160200191611cc9565b820191905f5260205f20905b815481529060010190602001808311611cac57829003601f168201915b505050505081565b601c818051602081018201805184825260208301602085012081835280955050505050505f915054906101000a900460ff1681565b600d602052805f5260405f205f915090505481565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611daa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611da190615e38565b60405180910390fd5b601a5f9054906101000a900460ff16611df8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611def90616387565b60405180910390fd5b5f601a5f6101000a81548160ff0219169083151502179055507f990bb31515adefe5ecd88a4dca3e9772b32d484c81e22cae38d5482e0d9f35e460405160405180910390a1565b600a818051602081018201805184825260208301602085012081835280955050505050505f915090505481565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611efb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ef290615e38565b60405180910390fd5b611f03613de6565b600882604051611f139190615f1f565b90815260200160405180910390205f9054906101000a900460ff1615611f6e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f65906163ef565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611fdc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fd390616457565b60405180910390fd5b600982604051611fec9190615f1f565b90815260200160405180910390205f9054906101000a900460ff16612046576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161203d906164bf565b60405180910390fd5b5f600a836040516120579190615f1f565b9081526020016040518091039020549050600160088460405161207a9190615f1f565b90815260200160405180910390205f6101000a81548160ff0219169083151502179055505f73ffffffffffffffffffffffffffffffffffffffff166007846040516120c59190615f1f565b90815260200160405180910390205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff160361216b578160078460405161211f9190615f1f565b90815260200160405180910390205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b61217583836143c9565b61217f83836144c5565b5f8111156121f4578173ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167f605614956ef211f270ab0b08a13dd69698dc38d70e20899e1051ae2e1ae6cd5b6001865f866040516121eb94939291906164dd565b60405180910390a35b506121fd614184565b5050565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612290576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161228790615e38565b60405180910390fd5b5f5b601b80549050811015612340575f601d601b83815481106122b6576122b561652e565b5b905f5260205f20016040516122cb91906165db565b9081526020016040518091039020819055505f601c601b83815481106122f4576122f361652e565b5b905f5260205f200160405161230991906165db565b90815260200160405180910390205f6101000a81548160ff0219169083151502179055508080612338906165f1565b915050612292565b50601b5f61234e9190614f5b565b5f5b600680549050811015612415575f601e600683815481106123745761237361652e565b5b905f5260205f200160405161238991906165db565b90815260200160405180910390205f6101000a81548160ff02191690831515021790555060405180602001604052805f815250601f600683815481106123d2576123d161652e565b5b905f5260205f20016040516123e791906165db565b9081526020016040518091039020908161240191906161ef565b50808061240d906165f1565b915050612350565b506001601a5f6101000a81548160ff0219169083151502179055507fc475c26aa25ed8e85a7faa790e5f63b5d7ee1025f12821f4c9bfddd36ab4d11260405160405180910390a1565b670de0b6b3a764000081565b600e5481565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146124ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124f690615e38565b60405180910390fd5b601a5f9054906101000a900460ff1661254d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161254490616387565b60405180910390fd5b5f601b8054905011612594576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161258b90616682565b60405180910390fd5b5f601b5f815481106125a9576125a861652e565b5b905f5260205f200180546125bc90615c91565b80601f01602080910402602001604051908101604052809291908181526020018280546125e890615c91565b80156126335780601f1061260a57610100808354040283529160200191612633565b820191905f5260205f20905b81548152906001019060200180831161261657829003601f168201915b505050505090505f601d601b5f815481106126515761265061652e565b5b905f5260205f200160405161266691906165db565b90815260200160405180910390205490505f600190505b601b805490508110156127c05781601d601b83815481106126a1576126a061652e565b5b905f5260205f20016040516126b691906165db565b90815260200160405180910390205411156127ad57601d601b82815481106126e1576126e061652e565b5b905f5260205f20016040516126f691906165db565b9081526020016040518091039020549150601b818154811061271b5761271a61652e565b5b905f5260205f2001805461272e90615c91565b80601f016020809104026020016040519081016040528092919081815260200182805461275a90615c91565b80156127a55780601f1061277c576101008083540402835291602001916127a5565b820191905f5260205f20905b81548152906001019060200180831161278857829003601f168201915b505050505092505b80806127b8906165f1565b91505061267d565b505f6007836040516127d29190615f1f565b90815260200160405180910390205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603612870576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161286790616710565b60405180910390fd5b5f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505f601a5f6101000a81548160ff0219169083151502179055507f5e99cd5235d5c8c4f0f8dc2626c83130cf843047e4ecbe4c111076e2b31a0d52848460405161291f9291906162be565b60405180910390a18173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a350505050565b60108181548110612996575f80fd5b905f5260205f20015f9150905080546129ae90615c91565b80601f01602080910402602001604051908101604052809291908181526020018280546129da90615c91565b8015612a255780601f106129fc57610100808354040283529160200191612a25565b820191905f5260205f20905b815481529060010190602001808311612a0857829003601f168201915b505050505081565b600f5481565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612ac2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612ab990615e38565b60405180910390fd5b601a5f9054906101000a900460ff16612b10576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b0790616387565b60405180910390fd5b600981604051612b209190615f1f565b90815260200160405180910390205f9054906101000a900460ff16612b7a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b7190616778565b60405180910390fd5b601c81604051612b8a9190615f1f565b90815260200160405180910390205f9054906101000a900460ff1615612be5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612bdc906167e0565b60405180910390fd5b601b81908060018154018082558091505060019003905f5260205f20015f909190919091509081612c1691906161ef565b506001601c82604051612c299190615f1f565b90815260200160405180910390205f6101000a81548160ff0219169083151502179055507f134c877b5bd4770ffc56867fc5d2c549dd813a5db276d378f8d855a04fc7aa1d81604051612c7c9190615262565b60405180910390a150565b606060155f8381526020019081526020015f20805480602002602001604051908101604052809291908181526020015f905b82821015612d61578382905f5260205f20018054612cd690615c91565b80601f0160208091040260200160405190810160405280929190818152602001828054612d0290615c91565b8015612d4d5780601f10612d2457610100808354040283529160200191612d4d565b820191905f5260205f20905b815481529060010190602001808311612d3057829003601f168201915b505050505081526020019060010190612cb9565b505050509050919050565b6011818051602081018201805184825260208301602085012081835280955050505050505f915054906101000a900460ff1681565b601a5f9054906101000a900460ff1681565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612e42576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612e3990615e38565b60405180910390fd5b5f5b8151811015612fa8575f828281518110612e6157612e6061652e565b5b60200260200101519050600981604051612e7b9190615f1f565b90815260200160405180910390205f9054906101000a900460ff1615612ea15750612f95565b6001600982604051612eb39190615f1f565b90815260200160405180910390205f6101000a81548160ff021916908315150217905550600681908060018154018082558091505060019003905f5260205f20015f909190919091509081612f0891906161ef565b507fdfaa3c24567cbffbf024ddfd8dfca7a224b307e94b0df5437facad0f2fea2f9b81604051612f389190615262565b60405180910390a13073ffffffffffffffffffffffffffffffffffffffff167f954917c11fc57299ff064c483b4113756221231fcea3a1a3aa54ebd605a9c1e860018333604051612f8b939291906167fe565b60405180910390a2505b8080612fa0906165f1565b915050612e44565b5050565b60188181548110612fbb575f80fd5b905f5260205f20015f915090505481565b60135481565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614613086576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161307d90615e38565b60405180910390fd5b6009816040516130969190615f1f565b90815260200160405180910390205f9054906101000a900460ff166131a85760016009826040516130c79190615f1f565b90815260200160405180910390205f6101000a81548160ff021916908315150217905550600681908060018154018082558091505060019003905f5260205f20015f90919091909150908161311c91906161ef565b507fdfaa3c24567cbffbf024ddfd8dfca7a224b307e94b0df5437facad0f2fea2f9b8160405161314c9190615262565b60405180910390a13073ffffffffffffffffffffffffffffffffffffffff167f954917c11fc57299ff064c483b4113756221231fcea3a1a3aa54ebd605a9c1e86001833360405161319f939291906167fe565b60405180910390a25b50565b601f818051602081018201805184825260208301602085012081835280955050505050505f9150905080546131df90615c91565b80601f016020809104026020016040519081016040528092919081815260200182805461320b90615c91565b80156132565780601f1061322d57610100808354040283529160200191613256565b820191905f5260205f20905b81548152906001019060200180831161323957829003601f168201915b505050505081565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146132ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016132e490615e38565b60405180910390fd5b8051825114613331576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016133289061688b565b60405180910390fd5b5f5b6010805490508110156133e1575f6012601083815481106133575761335661652e565b5b905f5260205f200160405161336c91906165db565b9081526020016040518091039020819055505f6011601083815481106133955761339461652e565b5b905f5260205f20016040516133aa91906165db565b90815260200160405180910390205f6101000a81548160ff02191690831515021790555080806133d9906165f1565b915050613333565b5060105f6133ef9190614f5b565b5f805b83518110156136095760098482815181106134105761340f61652e565b5b60200260200101516040516134259190615f1f565b90815260200160405180910390205f9054906101000a900460ff1661347f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613476906168f3565b60405180910390fd5b5f8382815181106134935761349261652e565b5b6020026020010151116134db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016134d29061695b565b60405180910390fd5b60108482815181106134f0576134ef61652e565b5b6020026020010151908060018154018082558091505060019003905f5260205f20015f90919091909150908161352691906161ef565b506001601185838151811061353e5761353d61652e565b5b60200260200101516040516135539190615f1f565b90815260200160405180910390205f6101000a81548160ff02191690831515021790555082818151811061358a5761358961652e565b5b602002602001015160128583815181106135a7576135a661652e565b5b60200260200101516040516135bc9190615f1f565b9081526020016040518091039020819055508281815181106135e1576135e061652e565b5b6020026020010151826135f49190615bf5565b91508080613601906165f1565b9150506133f2565b50612710811461364e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613645906169c3565b60405180910390fd5b7f7749ddba77d660c1351ff548a0bf5b09743d6ad44914e3cb9a29a1f805fb09fe838360405161367f9291906169e1565b60405180910390a1505050565b601d818051602081018201805184825260208301602085012081835280955050505050505f915090505481565b6007818051602081018201805184825260208301602085012081835280955050505050505f915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600b82805160208101820180518482526020830160208501208183528095505050505050602052805f5260405f205f91509150505481565b60195481565b600c828051602081018201805184825260208301602085012081835280955050505050508181548110613795575f80fd5b905f5260205f20015f915091509054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6060601880548060200260200160405190810160405280929190818152602001828054801561381057602002820191905f5260205f20905b8154815260200190600101908083116137fc575b5050505050905090565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146138a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016138a090615e38565b60405180910390fd5b5f811180156138bf5750670de0b6b3a764000081105b6138fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016138f590616a60565b60405180910390fd5b8060138190555061390d61418d565b7f5fad7fda6b8fb652ca59780d340772fed3852ba698b3a4cd40ebc117b8ec57508160405161393c919061541e565b60405180910390a150565b6017818051602081018201805184825260208301602085012081835280955050505050505f915054906101000a900460ff1681565b5f600680549050905090565b6012818051602081018201805184825260208301602085012081835280955050505050505f915090505481565b61271081565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614613a4a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613a4190615e38565b60405180910390fd5b601a5f9054906101000a900460ff16613a98576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613a8f90616387565b60405180910390fd5b600982604051613aa89190615f1f565b90815260200160405180910390205f9054906101000a900460ff16613b02576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613af990616ac8565b60405180910390fd5b601c81604051613b129190615f1f565b90815260200160405180910390205f9054906101000a900460ff16613b6c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613b6390616b30565b60405180910390fd5b601e82604051613b7c9190615f1f565b90815260200160405180910390205f9054906101000a900460ff1615613bd7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613bce90616b98565b60405180910390fd5b6001601e83604051613be99190615f1f565b90815260200160405180910390205f6101000a81548160ff02191690831515021790555080601f83604051613c1e9190615f1f565b90815260200160405180910390209081613c3891906161ef565b50601d81604051613c499190615f1f565b90815260200160405180910390205f815480929190613c67906165f1565b91905055507f137ad23732468494166ec34d1367743690ffa17f6ceac8429cba8fc35d088b6e8282604051613c9d929190616bb6565b60405180910390a15050565b6015602052815f5260405f208181548110613cc2575f80fd5b905f5260205f20015f91509150508054613cdb90615c91565b80601f0160208091040260200160405190810160405280929190818152602001828054613d0790615c91565b8015613d525780601f10613d2957610100808354040283529160200191613d52565b820191905f5260205f20905b815481529060010190602001808311613d3557829003601f168201915b505050505081565b60028054613d6790615c91565b80601f0160208091040260200160405190810160405280929190818152602001828054613d9390615c91565b8015613dde5780601f10613db557610100808354040283529160200191613dde565b820191905f5260205f20905b815481529060010190602001808311613dc157829003601f168201915b505050505081565b60025f5403613e21576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60025f81905550565b5f808211613e6d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613e6490616c35565b60405180910390fd5b818385613e7a9190616c53565b613e849190616cc1565b90509392505050565b5f805f90505b601080549050811015613fad575f60108281548110613eb557613eb461652e565b5b905f5260205f20018054613ec890615c91565b80601f0160208091040260200160405190810160405280929190818152602001828054613ef490615c91565b8015613f3f5780601f10613f1657610100808354040283529160200191613f3f565b820191905f5260205f20905b815481529060010190602001808311613f2257829003601f168201915b505050505090505f613f7287601284604051613f5b9190615f1f565b908152602001604051809103902054612710613e2a565b90505f811115613f9857613f898289838989614737565b8380613f94906165f1565b9450505b50508080613fa5906165f1565b915050613e93565b50949350505050565b5f805f90505b601454811161417b575f60155f8381526020019081526020015f208054905090505f8103613fea5750614168565b5f60188381548110613fff57613ffe61652e565b5b905f5260205f200154826140139190616c53565b90505f6140238883601954613e2a565b90505f83826140329190616cc1565b90505f805b85811015614161575f60018761404d9190615b5a565b820361406657828561405f9190615b5a565b9050614078565b83905083836140759190615bf5565b92505b5f81111561414d5761413e60155f8a81526020019081526020015f2083815481106140a6576140a561652e565b5b905f5260205f200180546140b990615c91565b80601f01602080910402602001604051908101604052809291908181526020018280546140e590615c91565b80156141305780601f1061410757610100808354040283529160200191614130565b820191905f5260205f20905b81548152906001019060200180831161411357829003601f168201915b50505050508e838e8e614737565b8880614149906165f1565b9950505b508080614159906165f1565b915050614037565b5050505050505b8080614173906165f1565b915050613fbc565b50949350505050565b60015f81905550565b60185f61419a9190614f79565b60016014546141a99190615bf5565b67ffffffffffffffff8111156141c2576141c161529b565b5b6040519080825280602002602001820160405280156141f05781602001602082028036833780820191505090505b5060189080519060200190614206929190614f97565b505f6019819055505f670de0b6b3a764000090505f5b60145481116142a757816018828154811061423a5761423961652e565b5b905f5260205f2001819055508160155f8381526020019081526020015f20805490506142669190616c53565b60195f8282546142769190615bf5565b9250508190555061429282601354670de0b6b3a7640000613e2a565b9150808061429f906165f1565b91505061421c565b5050565b5f6016826040516142bc9190615f1f565b90815260200160405180910390205490505f60155f8381526020019081526020015f2090505f5b81805490508110156143c357838051906020012082828154811061430a5761430961652e565b5b905f5260205f200160405161431f9190616d8d565b6040518091039020036143b057816001838054905061433e9190615b5a565b8154811061434f5761434e61652e565b5b905f5260205f200182828154811061436a5761436961652e565b5b905f5260205f2001908161437e9190616dca565b50818054806143905761438f616eaf565b5b600190038181905f5260205f20015f6143a99190614fe2565b90556143c3565b80806143bb906165f1565b9150506142e3565b50505050565b5f600a836040516143da9190615f1f565b90815260200160405180910390205490505f8111156144c0575f600a846040516144049190615f1f565b9081526020016040518091039020819055505f8273ffffffffffffffffffffffffffffffffffffffff168260405161443b90616eff565b5f6040518083038185875af1925050503d805f8114614475576040519150601f19603f3d011682016040523d82523d5f602084013e61447a565b606091505b50509050806144be576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016144b590616f5d565b60405180910390fd5b505b505050565b5f600c836040516144d69190615f1f565b908152602001604051809103902080548060200260200160405190810160405280929190818152602001828054801561456157602002820191905f5260205f20905b815f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311614518575b505050505090505f5b8151811015614731575f600b856040516145849190615f1f565b90815260200160405180910390205f8484815181106145a6576145a561652e565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490505f81111561471d575f600b866040516146039190615f1f565b90815260200160405180910390205f8585815181106146255761462461652e565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f208190555080600d5f8585815181106146815761468061652e565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546146d09190615b5a565b9250508190555061471c84828585815181106146ef576146ee61652e565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16614e419092919063ffffffff16565b5b508080614729906165f1565b91505061456a565b50505050565b5f6007866040516147489190615f1f565b90815260200160405180910390205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505f8073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141580156147cb57505f8273ffffffffffffffffffffffffffffffffffffffff163b115b90506008876040516147dd9190615f1f565b90815260200160405180910390205f9054906101000a900460ff16801561483057505f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15614a715783156148e9575f8273ffffffffffffffffffffffffffffffffffffffff168660405161486090616eff565b5f6040518083038185875af1925050503d805f811461489a576040519150601f19603f3d011682016040523d82523d5f602084013e61489f565b606091505b50509050806148e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016148da90616fc5565b60405180910390fd5b50614915565b61491482868573ffffffffffffffffffffffffffffffffffffffff16614e419092919063ffffffff16565b5b8173ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167f7d6a6b7452c2fec7981096e354fb3311f3f3b800ff27def1017b22cbff2751908784886149a6576040518060400160405280600581526020017f45524332300000000000000000000000000000000000000000000000000000008152506149dd565b6040518060400160405280600381526020017f45544800000000000000000000000000000000000000000000000000000000008152505b6040516149ec93929190616fe3565b60405180910390a38173ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167f71e611184866cc19c5f49af6c856ce9bde5a13bcd197c7499b61ab410ac9439960018a88614a51578a614a53565b5f5b8a604051614a6494939291906164dd565b60405180910390a3614e38565b8315614ab05784600a88604051614a889190615f1f565b90815260200160405180910390205f828254614aa49190615bf5565b92505081905550614c50565b5f600b88604051614ac19190615f1f565b90815260200160405180910390205f8873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205403614b8d57600c87604051614b209190615f1f565b908152602001604051809103902086908060018154018082558091505060019003905f5260205f20015f9091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b84600b88604051614b9e9190615f1f565b90815260200160405180910390205f8873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f828254614bf59190615bf5565b9250508190555084600d5f8873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f828254614c489190615bf5565b925050819055505b5f73ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167f7d6a6b7452c2fec7981096e354fb3311f3f3b800ff27def1017b22cbff275190875f88614ce1576040518060400160405280600c81526020017f53544f5245445f45524332300000000000000000000000000000000000000000815250614d18565b6040518060400160405280600a81526020017f53544f5245445f455448000000000000000000000000000000000000000000008152505b604051614d2793929190616fe3565b60405180910390a35f601188604051614d409190615f1f565b90815260200160405180910390205f9054906101000a900460ff16614d9a576040518060400160405280600481526020017f7a6f6e6500000000000000000000000000000000000000000000000000000000815250614dd1565b6040518060400160405280600a81526020017f70657263656e74616765000000000000000000000000000000000000000000008152505b90503073ffffffffffffffffffffffffffffffffffffffff167ff9700e8ac41cc506d3f79229bad9981619140b63838136cdb10ac6ba5f6976ab60018a88614e19578a614e1b565b5f5b8a86604051614e2e95949392919061701f565b60405180910390a2505b50505050505050565b614ebb838473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8585604051602401614e74929190615ac7565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614ec0565b505050565b5f8060205f8451602086015f885af180614edf576040513d5f823e3d81fd5b3d92505f519150505f8214614ef8576001811415614f13565b5f8473ffffffffffffffffffffffffffffffffffffffff163b145b15614f5557836040517f5274afe7000000000000000000000000000000000000000000000000000000008152600401614f4c919061509c565b60405180910390fd5b50505050565b5080545f8255905f5260205f2090810190614f76919061501f565b50565b5080545f8255905f5260205f2090810190614f949190615042565b50565b828054828255905f5260205f20908101928215614fd1579160200282015b82811115614fd0578251825591602001919060010190614fb5565b5b509050614fde9190615042565b5090565b508054614fee90615c91565b5f825580601f10614fff575061501c565b601f0160209004905f5260205f209081019061501b9190615042565b5b50565b5b8082111561503e575f81816150359190614fe2565b50600101615020565b5090565b5b80821115615059575f815f905550600101615043565b5090565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6150868261505d565b9050919050565b6150968161507c565b82525050565b5f6020820190506150af5f83018461508d565b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f81519050919050565b5f82825260208201905092915050565b5f5b838110156151155780820151818401526020810190506150fa565b5f8484015250505050565b5f601f19601f8301169050919050565b5f61513a826150de565b61514481856150e8565b93506151548185602086016150f8565b61515d81615120565b840191505092915050565b5f6151738383615130565b905092915050565b5f602082019050919050565b5f615191826150b5565b61519b81856150bf565b9350836020820285016151ad856150cf565b805f5b858110156151e857848403895281516151c98582615168565b94506151d48361517b565b925060208a019950506001810190506151b0565b50829750879550505050505092915050565b5f6020820190508181035f8301526152128184615187565b905092915050565b5f82825260208201905092915050565b5f615234826150de565b61523e818561521a565b935061524e8185602086016150f8565b61525781615120565b840191505092915050565b5f6020820190508181035f83015261527a818461522a565b905092915050565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6152d182615120565b810181811067ffffffffffffffff821117156152f0576152ef61529b565b5b80604052505050565b5f615302615282565b905061530e82826152c8565b919050565b5f67ffffffffffffffff82111561532d5761532c61529b565b5b61533682615120565b9050602081019050919050565b828183375f83830152505050565b5f61536361535e84615313565b6152f9565b90508281526020810184848401111561537f5761537e615297565b5b61538a848285615343565b509392505050565b5f82601f8301126153a6576153a5615293565b5b81356153b6848260208601615351565b91505092915050565b5f602082840312156153d4576153d361528b565b5b5f82013567ffffffffffffffff8111156153f1576153f061528f565b5b6153fd84828501615392565b91505092915050565b5f819050919050565b61541881615406565b82525050565b5f6020820190506154315f83018461540f565b92915050565b61544081615406565b811461544a575f80fd5b50565b5f8135905061545b81615437565b92915050565b5f80604083850312156154775761547661528b565b5b5f6154848582860161544d565b92505060206154958582860161544d565b9150509250929050565b6154a88161507c565b81146154b2575f80fd5b50565b5f813590506154c38161549f565b92915050565b5f80604083850312156154df576154de61528b565b5b5f6154ec858286016154b5565b92505060206154fd8582860161544d565b9150509250929050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b6155398161507c565b82525050565b5f61554a8383615530565b60208301905092915050565b5f602082019050919050565b5f61556c82615507565b6155768185615511565b935061558183615521565b805f5b838110156155b1578151615598888261553f565b97506155a383615556565b925050600181019050615584565b5085935050505092915050565b5f6020820190508181035f8301526155d68184615562565b905092915050565b5f602082840312156155f3576155f261528b565b5b5f6156008482850161544d565b91505092915050565b5f8115159050919050565b61561d81615609565b82525050565b5f6020820190506156365f830184615614565b92915050565b5f80604083850312156156525761565161528b565b5b5f83013567ffffffffffffffff81111561566f5761566e61528f565b5b61567b85828601615392565b925050602061568c8582860161544d565b9150509250929050565b5f602082840312156156ab576156aa61528b565b5b5f6156b8848285016154b5565b91505092915050565b5f80604083850312156156d7576156d661528b565b5b5f83013567ffffffffffffffff8111156156f4576156f361528f565b5b61570085828601615392565b9250506020615711858286016154b5565b9150509250929050565b5f67ffffffffffffffff8211156157355761573461529b565b5b602082029050602081019050919050565b5f80fd5b5f61575c6157578461571b565b6152f9565b9050808382526020820190506020840283018581111561577f5761577e615746565b5b835b818110156157c657803567ffffffffffffffff8111156157a4576157a3615293565b5b8086016157b18982615392565b85526020850194505050602081019050615781565b5050509392505050565b5f82601f8301126157e4576157e3615293565b5b81356157f484826020860161574a565b91505092915050565b5f602082840312156158125761581161528b565b5b5f82013567ffffffffffffffff81111561582f5761582e61528f565b5b61583b848285016157d0565b91505092915050565b5f67ffffffffffffffff82111561585e5761585d61529b565b5b602082029050602081019050919050565b5f61588161587c84615844565b6152f9565b905080838252602082019050602084028301858111156158a4576158a3615746565b5b835b818110156158cd57806158b9888261544d565b8452602084019350506020810190506158a6565b5050509392505050565b5f82601f8301126158eb576158ea615293565b5b81356158fb84826020860161586f565b91505092915050565b5f806040838503121561591a5761591961528b565b5b5f83013567ffffffffffffffff8111156159375761593661528f565b5b615943858286016157d0565b925050602083013567ffffffffffffffff8111156159645761596361528f565b5b615970858286016158d7565b9150509250929050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b6159ac81615406565b82525050565b5f6159bd83836159a3565b60208301905092915050565b5f602082019050919050565b5f6159df8261597a565b6159e98185615984565b93506159f483615994565b805f5b83811015615a24578151615a0b88826159b2565b9750615a16836159c9565b9250506001810190506159f7565b5085935050505092915050565b5f6020820190508181035f830152615a4981846159d5565b905092915050565b5f8060408385031215615a6757615a6661528b565b5b5f83013567ffffffffffffffff811115615a8457615a8361528f565b5b615a9085828601615392565b925050602083013567ffffffffffffffff811115615ab157615ab061528f565b5b615abd85828601615392565b9150509250929050565b5f604082019050615ada5f83018561508d565b615ae7602083018461540f565b9392505050565b5f81519050615afc81615437565b92915050565b5f60208284031215615b1757615b1661528b565b5b5f615b2484828501615aee565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f615b6482615406565b9150615b6f83615406565b9250828203905081811115615b8757615b86615b2d565b5b92915050565b7f496e73756666696369656e7420746f6b656e2062616c616e63650000000000005f82015250565b5f615bc1601a8361521a565b9150615bcc82615b8d565b602082019050919050565b5f6020820190508181035f830152615bee81615bb5565b9050919050565b5f615bff82615406565b9150615c0a83615406565b9250828201905080821115615c2257615c21615b2d565b5b92915050565b5f606082019050615c3b5f83018661540f565b615c48602083018561540f565b8181036040830152615c5a818461522a565b9050949350505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680615ca857607f821691505b602082108103615cbb57615cba615c64565b5b50919050565b5f819050815f5260205f209050919050565b5f8154615cdf81615c91565b615ce9818661521a565b9450600182165f8114615d035760018114615d1957615d4b565b60ff198316865281151560200286019350615d4b565b615d2285615cc1565b5f5b83811015615d4357815481890152600182019150602081019050615d24565b808801955050505b50505092915050565b5f819050919050565b5f819050919050565b5f615d80615d7b615d7684615d54565b615d5d565b615406565b9050919050565b615d9081615d66565b82525050565b5f60a0820190508181035f830152615dae8188615cd3565b9050615dbd602083018761508d565b615dca604083018661540f565b615dd7606083018561540f565b615de46080830184615d87565b9695505050505050565b7f4f6e6c79206f776e6572000000000000000000000000000000000000000000005f82015250565b5f615e22600a8361521a565b9150615e2d82615dee565b602082019050919050565b5f6020820190508181035f830152615e4f81615e16565b9050919050565b7f4d7573742073756d20746f2031303030300000000000000000000000000000005f82015250565b5f615e8a60118361521a565b9150615e9582615e56565b602082019050919050565b5f6020820190508181035f830152615eb781615e7e565b9050919050565b5f604082019050615ed15f83018561540f565b615ede602083018461540f565b9392505050565b5f81905092915050565b5f615ef9826150de565b615f038185615ee5565b9350615f138185602086016150f8565b80840191505092915050565b5f615f2a8284615eef565b915081905092915050565b7f4e6f7420616e206578746572696f72206d656d626572000000000000000000005f82015250565b5f615f6960168361521a565b9150615f7482615f35565b602082019050919050565b5f6020820190508181035f830152615f9681615f5d565b9050919050565b7f4d75737420626520612062756e646c65206d656d6265720000000000000000005f82015250565b5f615fd160178361521a565b9150615fdc82615f9d565b602082019050919050565b5f6020820190508181035f830152615ffe81615fc5565b9050919050565b7f5a6f6e65206f7574206f662072616e67650000000000000000000000000000005f82015250565b5f61603960118361521a565b915061604482616005565b602082019050919050565b5f6020820190508181035f8301526160668161602d565b9050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026160b77fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8261607c565b6160c1868361607c565b95508019841693508086168417925050509392505050565b5f6160f36160ee6160e984615406565b615d5d565b615406565b9050919050565b5f819050919050565b61610c836160d9565b616120616118826160fa565b848454616088565b825550505050565b5f90565b616134616128565b61613f818484616103565b505050565b5b81811015616162576161575f8261612c565b600181019050616145565b5050565b601f8211156161a75761617881615cc1565b6161818461606d565b81016020851015616190578190505b6161a461619c8561606d565b830182616144565b50505b505050565b5f82821c905092915050565b5f6161c75f19846008026161ac565b1980831691505092915050565b5f6161df83836161b8565b9150826002028217905092915050565b6161f8826150de565b67ffffffffffffffff8111156162115761621061529b565b5b61621b8254615c91565b616226828285616166565b5f60209050601f831160018114616257575f8415616245578287015190505b61624f85826161d4565b8655506162b6565b601f19841661626586615cc1565b5f5b8281101561628c57848901518255600182019150602085019450602081019050616267565b868310156162a957848901516162a5601f8916826161b8565b8355505b6001600288020188555050505b505050505050565b5f6040820190508181035f8301526162d6818561522a565b90506162e5602083018461540f565b9392505050565b5f6080820190508181035f8301526163048187615cd3565b90508181036020830152616318818661522a565b9050616327604083018561540f565b616334606083018461540f565b95945050505050565b7f4e6f2061637469766520656c656374696f6e00000000000000000000000000005f82015250565b5f61637160128361521a565b915061637c8261633d565b602082019050919050565b5f6020820190508181035f83015261639e81616365565b9050919050565b7f416c726561647920636c61696d656400000000000000000000000000000000005f82015250565b5f6163d9600f8361521a565b91506163e4826163a5565b602082019050919050565b5f6020820190508181035f830152616406816163cd565b9050919050565b7f496e76616c69642062656e6566696369617279000000000000000000000000005f82015250565b5f61644160138361521a565b915061644c8261640d565b602082019050919050565b5f6020820190508181035f83015261646e81616435565b9050919050565b7f4e6f742061206d656d62657200000000000000000000000000000000000000005f82015250565b5f6164a9600c8361521a565b91506164b482616475565b602082019050919050565b5f6020820190508181035f8301526164d68161649d565b9050919050565b5f6080820190508181035f8301526164f58187615cd3565b90508181036020830152616509818661522a565b9050616518604083018561508d565b616525606083018461540f565b95945050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f815461656781615c91565b6165718186615ee5565b9450600182165f811461658b57600181146165a0576165d2565b60ff19831686528115158202860193506165d2565b6165a985615cc1565b5f5b838110156165ca578154818901526001820191506020810190506165ab565b838801955050505b50505092915050565b5f6165e6828461655b565b915081905092915050565b5f6165fb82615406565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361662d5761662c615b2d565b5b600182019050919050565b7f4e6f2063616e64696461746573000000000000000000000000000000000000005f82015250565b5f61666c600d8361521a565b915061667782616638565b602082019050919050565b5f6020820190508181035f83015261669981616660565b9050919050565b7f57696e6e6572206d757374206861766520636c61696d656420746f20726563655f8201527f697665206f776e65727368697000000000000000000000000000000000000000602082015250565b5f6166fa602d8361521a565b9150616705826166a0565b604082019050919050565b5f6020820190508181035f830152616727816166ee565b9050919050565b7f4d7573742062652061206d656d626572000000000000000000000000000000005f82015250565b5f61676260108361521a565b915061676d8261672e565b602082019050919050565b5f6020820190508181035f83015261678f81616756565b9050919050565b7f416c726561647920612063616e646964617465000000000000000000000000005f82015250565b5f6167ca60138361521a565b91506167d582616796565b602082019050919050565b5f6020820190508181035f8301526167f7816167be565b9050919050565b5f6060820190508181035f8301526168168186615cd3565b9050818103602083015261682a818561522a565b9050616839604083018461508d565b949350505050565b7f4172726179206c656e677468206d69736d6174636800000000000000000000005f82015250565b5f61687560158361521a565b915061688082616841565b602082019050919050565b5f6020820190508181035f8301526168a281616869565b9050919050565b7f55736572206d75737420626520612062756e646c65206d656d626572000000005f82015250565b5f6168dd601c8361521a565b91506168e8826168a9565b602082019050919050565b5f6020820190508181035f83015261690a816168d1565b9050919050565b7f50657263656e74616765206d75737420626520706f73697469766500000000005f82015250565b5f616945601b8361521a565b915061695082616911565b602082019050919050565b5f6020820190508181035f83015261697281616939565b9050919050565b7f50657263656e7461676573206d7573742073756d20746f2031303030300000005f82015250565b5f6169ad601d8361521a565b91506169b882616979565b602082019050919050565b5f6020820190508181035f8301526169da816169a1565b9050919050565b5f6040820190508181035f8301526169f98185615187565b90508181036020830152616a0d81846159d5565b90509392505050565b7f53746565706e657373206d7573742062652030203c2073203c203165313800005f82015250565b5f616a4a601e8361521a565b9150616a5582616a16565b602082019050919050565b5f6020820190508181035f830152616a7781616a3e565b9050919050565b7f566f746572206d7573742062652061206d656d626572000000000000000000005f82015250565b5f616ab260168361521a565b9150616abd82616a7e565b602082019050919050565b5f6020820190508181035f830152616adf81616aa6565b9050919050565b7f4e6f7420612076616c69642063616e64696461746500000000000000000000005f82015250565b5f616b1a60158361521a565b9150616b2582616ae6565b602082019050919050565b5f6020820190508181035f830152616b4781616b0e565b9050919050565b7f416c726561647920766f746564000000000000000000000000000000000000005f82015250565b5f616b82600d8361521a565b9150616b8d82616b4e565b602082019050919050565b5f6020820190508181035f830152616baf81616b76565b9050919050565b5f6040820190508181035f830152616bce818561522a565b90508181036020830152616be2818461522a565b90509392505050565b7f4469766973696f6e206279207a65726f000000000000000000000000000000005f82015250565b5f616c1f60108361521a565b9150616c2a82616beb565b602082019050919050565b5f6020820190508181035f830152616c4c81616c13565b9050919050565b5f616c5d82615406565b9150616c6883615406565b9250828202616c7681615406565b91508282048414831517616c8d57616c8c615b2d565b5b5092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f616ccb82615406565b9150616cd683615406565b925082616ce657616ce5616c94565b5b828204905092915050565b5f81905092915050565b5f819050815f5260205f209050919050565b5f8154616d1981615c91565b616d238186616cf1565b9450600182165f8114616d3d5760018114616d5257616d84565b60ff1983168652811515820286019350616d84565b616d5b85616cfb565b5f5b83811015616d7c57815481890152600182019150602081019050616d5d565b838801955050505b50505092915050565b5f616d988284616d0d565b915081905092915050565b5f81549050616db181615c91565b9050919050565b5f819050815f5260205f209050919050565b818103616dd8575050616ead565b616de182616da3565b67ffffffffffffffff811115616dfa57616df961529b565b5b616e048254615c91565b616e0f828285616166565b5f601f831160018114616e3c575f8415616e2a578287015490505b616e3485826161d4565b865550616ea6565b601f198416616e4a87616db8565b9650616e5586615cc1565b5f5b82811015616e7c57848901548255600182019150600185019450602081019050616e57565b86831015616e995784890154616e95601f8916826161b8565b8355505b6001600288020188555050505b5050505050505b565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffd5b50565b5f616eea5f83616cf1565b9150616ef582616edc565b5f82019050919050565b5f616f0982616edf565b9150819050919050565b7f45544820636c61696d206661696c6564000000000000000000000000000000005f82015250565b5f616f4760108361521a565b9150616f5282616f13565b602082019050919050565b5f6020820190508181035f830152616f7481616f3b565b9050919050565b7f455448207472616e73666572206661696c6564000000000000000000000000005f82015250565b5f616faf60138361521a565b9150616fba82616f7b565b602082019050919050565b5f6020820190508181035f830152616fdc81616fa3565b9050919050565b5f606082019050616ff65f83018661540f565b6170036020830185615614565b8181036040830152617015818461522a565b9050949350505050565b5f60a0820190508181035f8301526170378188615cd3565b9050818103602083015261704b818761522a565b905061705a604083018661508d565b617067606083018561540f565b8181036080830152617079818461522a565b9050969550505050505056fea2646970667358221220e61ca743da8bf74312a4d4f6b348b3282428098da8234b281a8987056df9bb6364736f6c63430008140033";
|
|
24538
|
+
const BundleABI = {
|
|
24539
|
+
abi,
|
|
24540
|
+
bytecode
|
|
24541
|
+
};
|
|
24449
24542
|
const HolonsABI = [
|
|
24450
24543
|
{
|
|
24451
24544
|
type: "function",
|
|
@@ -25853,7 +25946,7 @@ class ContractDeployer {
|
|
|
25853
25946
|
*/
|
|
25854
25947
|
async _loadEthers() {
|
|
25855
25948
|
if (!this.ethers) {
|
|
25856
|
-
this.ethers = await import("./index-
|
|
25949
|
+
this.ethers = await import("./index-JFz-dW43.js");
|
|
25857
25950
|
}
|
|
25858
25951
|
return this.ethers;
|
|
25859
25952
|
}
|
|
@@ -26061,6 +26154,7 @@ class ContractDeployer {
|
|
|
26061
26154
|
}
|
|
26062
26155
|
/**
|
|
26063
26156
|
* Deploy a Bundle contract (2-way split with steepness)
|
|
26157
|
+
* This is the simplest way to deploy a holon - no registry needed!
|
|
26064
26158
|
* @param {string} name - Contract name
|
|
26065
26159
|
* @param {number} [steepness=500000000000000000n] - Steepness factor (0.5e18 = 50% decay)
|
|
26066
26160
|
* @param {number} [nZones=6] - Number of zones
|
|
@@ -26073,18 +26167,41 @@ class ContractDeployer {
|
|
|
26073
26167
|
const deployerAddress = await signer.getAddress();
|
|
26074
26168
|
const creatorUserId = options.creatorUserId || "creator";
|
|
26075
26169
|
const steepnessValue = steepness || ethers.parseEther("0.5");
|
|
26170
|
+
const abi2 = BundleABI.abi || BundleABI;
|
|
26171
|
+
const bytecode2 = BundleABI.bytecode;
|
|
26172
|
+
if (!bytecode2) {
|
|
26173
|
+
throw new Error("Bundle bytecode not available. Please rebuild contracts.");
|
|
26174
|
+
}
|
|
26076
26175
|
const result = await this._deployContract(
|
|
26077
|
-
|
|
26078
|
-
|
|
26176
|
+
abi2,
|
|
26177
|
+
bytecode2,
|
|
26079
26178
|
[deployerAddress, creatorUserId, name2, steepnessValue, nZones]
|
|
26080
26179
|
);
|
|
26081
26180
|
return {
|
|
26082
26181
|
...result,
|
|
26083
26182
|
type: "Bundle",
|
|
26084
26183
|
steepness: steepnessValue,
|
|
26085
|
-
nZones
|
|
26184
|
+
nZones,
|
|
26185
|
+
creatorUserId,
|
|
26186
|
+
name: name2
|
|
26086
26187
|
};
|
|
26087
26188
|
}
|
|
26189
|
+
/**
|
|
26190
|
+
* Deploy a Bundle contract directly (simplified 1-click deployment)
|
|
26191
|
+
* No registry needed - just deploys and returns the address
|
|
26192
|
+
* @param {string} holonId - Unique identifier for the holon
|
|
26193
|
+
* @param {string} name - Display name for the holon
|
|
26194
|
+
* @param {Object} [options] - Options { steepness, nZones }
|
|
26195
|
+
* @returns {Promise<{address, txHash, contract}>}
|
|
26196
|
+
*/
|
|
26197
|
+
async deployBundleDirect(holonId, name2, options = {}) {
|
|
26198
|
+
const steepness = options.steepness;
|
|
26199
|
+
const nZones = options.nZones || 6;
|
|
26200
|
+
return this.deployBundle(name2, steepness, nZones, {
|
|
26201
|
+
creatorUserId: holonId,
|
|
26202
|
+
...options
|
|
26203
|
+
});
|
|
26204
|
+
}
|
|
26088
26205
|
/**
|
|
26089
26206
|
* Deploy a TestToken (ERC20 for testing)
|
|
26090
26207
|
* @param {string} [initialSupply='1000000'] - Initial supply in whole tokens
|
|
@@ -26144,11 +26261,11 @@ class ContractDeployer {
|
|
|
26144
26261
|
* @returns {Promise<Contract>}
|
|
26145
26262
|
*/
|
|
26146
26263
|
async getContract(address, type2) {
|
|
26147
|
-
const
|
|
26148
|
-
if (!
|
|
26264
|
+
const abi2 = ABIs[type2];
|
|
26265
|
+
if (!abi2) {
|
|
26149
26266
|
throw new Error(`Unknown contract type: ${type2}`);
|
|
26150
26267
|
}
|
|
26151
|
-
return this.chainManager.getContract(address,
|
|
26268
|
+
return this.chainManager.getContract(address, abi2.abi);
|
|
26152
26269
|
}
|
|
26153
26270
|
/**
|
|
26154
26271
|
* Get deployed contract addresses
|
|
@@ -26168,8 +26285,8 @@ class ContractDeployer {
|
|
|
26168
26285
|
* Internal: Deploy a contract
|
|
26169
26286
|
* @private
|
|
26170
26287
|
*/
|
|
26171
|
-
async _deployContract(
|
|
26172
|
-
const result = await this.chainManager.deployContract(
|
|
26288
|
+
async _deployContract(abi2, bytecode2, constructorArgs) {
|
|
26289
|
+
const result = await this.chainManager.deployContract(abi2, bytecode2, constructorArgs);
|
|
26173
26290
|
return {
|
|
26174
26291
|
contract: result.contract,
|
|
26175
26292
|
address: result.address,
|
|
@@ -26191,7 +26308,7 @@ class ContractOperations {
|
|
|
26191
26308
|
*/
|
|
26192
26309
|
async _loadEthers() {
|
|
26193
26310
|
if (!this.ethers) {
|
|
26194
|
-
this.ethers = await import("./index-
|
|
26311
|
+
this.ethers = await import("./index-JFz-dW43.js");
|
|
26195
26312
|
}
|
|
26196
26313
|
return this.ethers;
|
|
26197
26314
|
}
|
|
@@ -26866,11 +26983,11 @@ class HolonContracts {
|
|
|
26866
26983
|
if (this.holonContracts.has(holonId)) {
|
|
26867
26984
|
throw new Error(`Holon ${holonId} already has a contract. Use unlink() first.`);
|
|
26868
26985
|
}
|
|
26869
|
-
const
|
|
26870
|
-
if (!
|
|
26986
|
+
const abi2 = ABIs[type2];
|
|
26987
|
+
if (!abi2) {
|
|
26871
26988
|
throw new Error(`Unknown contract type: ${type2}`);
|
|
26872
26989
|
}
|
|
26873
|
-
const contract = await this.chainManager.getContract(contractAddress,
|
|
26990
|
+
const contract = await this.chainManager.getContract(contractAddress, abi2.abi);
|
|
26874
26991
|
try {
|
|
26875
26992
|
await contract.name();
|
|
26876
26993
|
} catch (error) {
|
|
@@ -27001,9 +27118,9 @@ class HolonContracts {
|
|
|
27001
27118
|
try {
|
|
27002
27119
|
const data = await this.storage.get?.(`holon_contract:${holonId}`);
|
|
27003
27120
|
if (data && data.address && data.type) {
|
|
27004
|
-
const
|
|
27005
|
-
if (
|
|
27006
|
-
const contract = await this.chainManager.getContract(data.address,
|
|
27121
|
+
const abi2 = ABIs[data.type];
|
|
27122
|
+
if (abi2) {
|
|
27123
|
+
const contract = await this.chainManager.getContract(data.address, abi2.abi);
|
|
27007
27124
|
const operations = new ContractOperations(contract, data.type, this.chainManager);
|
|
27008
27125
|
this.holonContracts.set(holonId, {
|
|
27009
27126
|
...data,
|
|
@@ -32307,17 +32424,17 @@ class Interface {
|
|
|
32307
32424
|
* Create a new Interface for the %%fragments%%.
|
|
32308
32425
|
*/
|
|
32309
32426
|
constructor(fragments) {
|
|
32310
|
-
let
|
|
32427
|
+
let abi2 = [];
|
|
32311
32428
|
if (typeof fragments === "string") {
|
|
32312
|
-
|
|
32429
|
+
abi2 = JSON.parse(fragments);
|
|
32313
32430
|
} else {
|
|
32314
|
-
|
|
32431
|
+
abi2 = fragments;
|
|
32315
32432
|
}
|
|
32316
32433
|
this.#functions = /* @__PURE__ */ new Map();
|
|
32317
32434
|
this.#errors = /* @__PURE__ */ new Map();
|
|
32318
32435
|
this.#events = /* @__PURE__ */ new Map();
|
|
32319
32436
|
const frags = [];
|
|
32320
|
-
for (const a of
|
|
32437
|
+
for (const a of abi2) {
|
|
32321
32438
|
try {
|
|
32322
32439
|
frags.push(Fragment.from(a));
|
|
32323
32440
|
} catch (error) {
|
|
@@ -32381,16 +32498,16 @@ class Interface {
|
|
|
32381
32498
|
*/
|
|
32382
32499
|
format(minimal) {
|
|
32383
32500
|
const format = minimal ? "minimal" : "full";
|
|
32384
|
-
const
|
|
32385
|
-
return
|
|
32501
|
+
const abi2 = this.fragments.map((f) => f.format(format));
|
|
32502
|
+
return abi2;
|
|
32386
32503
|
}
|
|
32387
32504
|
/**
|
|
32388
32505
|
* Return the JSON-encoded ABI. This is the format Solidiy
|
|
32389
32506
|
* returns.
|
|
32390
32507
|
*/
|
|
32391
32508
|
formatJson() {
|
|
32392
|
-
const
|
|
32393
|
-
return JSON.stringify(
|
|
32509
|
+
const abi2 = this.fragments.map((f) => f.format("json"));
|
|
32510
|
+
return JSON.stringify(abi2.map((j) => JSON.parse(j)));
|
|
32394
32511
|
}
|
|
32395
32512
|
/**
|
|
32396
32513
|
* The ABI coder that will be used to encode and decode binary
|
|
@@ -35044,12 +35161,12 @@ class BaseContract {
|
|
|
35044
35161
|
* optionally connected to a %%runner%% to perform operations on behalf
|
|
35045
35162
|
* of.
|
|
35046
35163
|
*/
|
|
35047
|
-
constructor(target,
|
|
35164
|
+
constructor(target, abi2, runner, _deployTx) {
|
|
35048
35165
|
assertArgument(typeof target === "string" || isAddressable(target), "invalid value for Contract target", "target", target);
|
|
35049
35166
|
if (runner == null) {
|
|
35050
35167
|
runner = null;
|
|
35051
35168
|
}
|
|
35052
|
-
const iface = Interface.from(
|
|
35169
|
+
const iface = Interface.from(abi2);
|
|
35053
35170
|
defineProperties(this, { target, runner, interface: iface });
|
|
35054
35171
|
Object.defineProperty(this, internal, { value: {} });
|
|
35055
35172
|
let addrPromise;
|
|
@@ -35412,10 +35529,10 @@ class BaseContract {
|
|
|
35412
35529
|
/**
|
|
35413
35530
|
* Create a new Class for the %%abi%%.
|
|
35414
35531
|
*/
|
|
35415
|
-
static buildClass(
|
|
35532
|
+
static buildClass(abi2) {
|
|
35416
35533
|
class CustomContract extends BaseContract {
|
|
35417
35534
|
constructor(address, runner = null) {
|
|
35418
|
-
super(address,
|
|
35535
|
+
super(address, abi2, runner);
|
|
35419
35536
|
}
|
|
35420
35537
|
}
|
|
35421
35538
|
return CustomContract;
|
|
@@ -35423,11 +35540,11 @@ class BaseContract {
|
|
|
35423
35540
|
/**
|
|
35424
35541
|
* Create a new BaseContract with a specified Interface.
|
|
35425
35542
|
*/
|
|
35426
|
-
static from(target,
|
|
35543
|
+
static from(target, abi2, runner) {
|
|
35427
35544
|
if (runner == null) {
|
|
35428
35545
|
runner = null;
|
|
35429
35546
|
}
|
|
35430
|
-
const contract = new this(target,
|
|
35547
|
+
const contract = new this(target, abi2, runner);
|
|
35431
35548
|
return contract;
|
|
35432
35549
|
}
|
|
35433
35550
|
}
|
|
@@ -35462,11 +35579,11 @@ class ContractQueries {
|
|
|
35462
35579
|
* @returns {ethers.Contract}
|
|
35463
35580
|
*/
|
|
35464
35581
|
getContract(address, flavor) {
|
|
35465
|
-
const
|
|
35466
|
-
if (!
|
|
35582
|
+
const abi2 = ContractABIs[flavor];
|
|
35583
|
+
if (!abi2) {
|
|
35467
35584
|
throw new Error(`Unknown contract flavor: ${flavor}`);
|
|
35468
35585
|
}
|
|
35469
|
-
return new Contract(address,
|
|
35586
|
+
return new Contract(address, abi2, this.provider);
|
|
35470
35587
|
}
|
|
35471
35588
|
/**
|
|
35472
35589
|
* Auto-detect contract flavor by calling flavor()
|
|
@@ -37439,6 +37556,7 @@ class HoloSphereBase extends HoloSphere$1 {
|
|
|
37439
37556
|
if (!Array.isArray(data.inbound)) data.inbound = [];
|
|
37440
37557
|
if (!Array.isArray(data.outbound)) data.outbound = [];
|
|
37441
37558
|
if (!data.lensConfig || typeof data.lensConfig !== "object") data.lensConfig = {};
|
|
37559
|
+
if (!data.partnerNames || typeof data.partnerNames !== "object") data.partnerNames = {};
|
|
37442
37560
|
if (!Array.isArray(data.federated)) {
|
|
37443
37561
|
const allFederated = /* @__PURE__ */ new Set([...data.inbound, ...data.outbound]);
|
|
37444
37562
|
data.federated = Array.from(allFederated);
|
|
@@ -37446,7 +37564,7 @@ class HoloSphereBase extends HoloSphere$1 {
|
|
|
37446
37564
|
return data;
|
|
37447
37565
|
}
|
|
37448
37566
|
async federateHolon(sourceHolon, targetHolon, options = {}) {
|
|
37449
|
-
const { lensConfig = { inbound: [], outbound: [] } } = options;
|
|
37567
|
+
const { lensConfig = { inbound: [], outbound: [] }, partnerName = null } = options;
|
|
37450
37568
|
if (sourceHolon === targetHolon) {
|
|
37451
37569
|
throw new Error("Cannot federate a holon with itself");
|
|
37452
37570
|
}
|
|
@@ -37457,15 +37575,20 @@ class HoloSphereBase extends HoloSphere$1 {
|
|
|
37457
37575
|
inbound: [],
|
|
37458
37576
|
outbound: [],
|
|
37459
37577
|
lensConfig: {},
|
|
37578
|
+
partnerNames: {},
|
|
37460
37579
|
timestamp: Date.now()
|
|
37461
37580
|
};
|
|
37462
37581
|
if (!Array.isArray(federationData.federated)) federationData.federated = [];
|
|
37463
37582
|
if (!Array.isArray(federationData.inbound)) federationData.inbound = [];
|
|
37464
37583
|
if (!Array.isArray(federationData.outbound)) federationData.outbound = [];
|
|
37465
37584
|
if (!federationData.lensConfig || typeof federationData.lensConfig !== "object") federationData.lensConfig = {};
|
|
37585
|
+
if (!federationData.partnerNames || typeof federationData.partnerNames !== "object") federationData.partnerNames = {};
|
|
37466
37586
|
if (!federationData.federated.includes(targetHolon)) {
|
|
37467
37587
|
federationData.federated.push(targetHolon);
|
|
37468
37588
|
}
|
|
37589
|
+
if (partnerName) {
|
|
37590
|
+
federationData.partnerNames[targetHolon] = partnerName;
|
|
37591
|
+
}
|
|
37469
37592
|
if (lensConfig.outbound && lensConfig.outbound.length > 0) {
|
|
37470
37593
|
if (!federationData.outbound.includes(targetHolon)) {
|
|
37471
37594
|
federationData.outbound.push(targetHolon);
|
|
@@ -37866,4 +37989,4 @@ export {
|
|
|
37866
37989
|
exists as y,
|
|
37867
37990
|
bytes as z
|
|
37868
37991
|
};
|
|
37869
|
-
//# sourceMappingURL=index-
|
|
37992
|
+
//# sourceMappingURL=index-NOravBLu.js.map
|