@bgd-labs/toolbox 0.0.25 → 0.0.26

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/index.mjs CHANGED
@@ -14009,6 +14009,72 @@ async function tenderly_sim({ accountSlug, projectSlug, accessToken }, body) {
14009
14009
  );
14010
14010
  return response.json();
14011
14011
  }
14012
+ function unwrapComponents(input) {
14013
+ return input.map((input2) => {
14014
+ if (input2.type === "tuple") {
14015
+ return {
14016
+ name: input2.name,
14017
+ type: input2.type,
14018
+ internalType: input2.type,
14019
+ indexed: input2.indexed,
14020
+ components: unwrapComponents(input2.components)
14021
+ };
14022
+ }
14023
+ return {
14024
+ name: input2.name,
14025
+ type: input2.type,
14026
+ internalType: input2.type,
14027
+ indexed: input2.indexed
14028
+ };
14029
+ });
14030
+ }
14031
+ function unwrapLogInputs(inputs) {
14032
+ return inputs.map((input) => {
14033
+ if (input.soltype?.type === "tuple") {
14034
+ return {
14035
+ name: input.soltype?.name,
14036
+ type: input.soltype?.type,
14037
+ indexed: input.soltype?.indexed,
14038
+ internalType: input.soltype?.type,
14039
+ components: unwrapComponents(input.soltype?.components)
14040
+ };
14041
+ }
14042
+ return {
14043
+ name: input.soltype?.name,
14044
+ type: input.soltype?.type,
14045
+ indexed: input.soltype?.indexed,
14046
+ internalType: input.soltype?.type
14047
+ };
14048
+ });
14049
+ }
14050
+ function tenderly_logsToAbiLogs(logs) {
14051
+ return logs.map((log) => {
14052
+ return {
14053
+ type: "event",
14054
+ name: log.name,
14055
+ ...log.inputs ? { inputs: unwrapLogInputs(log.inputs) } : {}
14056
+ };
14057
+ });
14058
+ }
14059
+
14060
+ // src/ecosystem/tenderly.types.ts
14061
+ var SoltypeType = /* @__PURE__ */ ((SoltypeType2) => {
14062
+ SoltypeType2["Address"] = "address";
14063
+ SoltypeType2["Bool"] = "bool";
14064
+ SoltypeType2["Bytes32"] = "bytes32";
14065
+ SoltypeType2["MappingAddressUint256"] = "mapping (address => uint256)";
14066
+ SoltypeType2["MappingUint256Uint256"] = "mapping (uint256 => uint256)";
14067
+ SoltypeType2["String"] = "string";
14068
+ SoltypeType2["Tuple"] = "tuple";
14069
+ SoltypeType2["TypeAddress"] = "address[]";
14070
+ SoltypeType2["TypeTuple"] = "tuple[]";
14071
+ SoltypeType2["Uint16"] = "uint16";
14072
+ SoltypeType2["Uint256"] = "uint256";
14073
+ SoltypeType2["Uint48"] = "uint48";
14074
+ SoltypeType2["Uint56"] = "uint56";
14075
+ SoltypeType2["Uint8"] = "uint8";
14076
+ return SoltypeType2;
14077
+ })(SoltypeType || {});
14012
14078
 
14013
14079
  // src/ecosystem/event-db.ts
14014
14080
  var EVENT_DB = [];
@@ -28687,6 +28753,22 @@ function checkCode(bytecode) {
28687
28753
 
28688
28754
  // src/seatbelt/verified.ts
28689
28755
  import { getCode } from "viem/actions";
28756
+ var VerificationStatus = /* @__PURE__ */ ((VerificationStatus2) => {
28757
+ VerificationStatus2[VerificationStatus2["EOA"] = 0] = "EOA";
28758
+ VerificationStatus2[VerificationStatus2["CONTRACT"] = 1] = "CONTRACT";
28759
+ VerificationStatus2[VerificationStatus2["ERROR"] = 2] = "ERROR";
28760
+ return VerificationStatus2;
28761
+ })(VerificationStatus || {});
28762
+ function verificationStatusToString(status) {
28763
+ switch (status) {
28764
+ case 0 /* EOA */:
28765
+ return "EOA";
28766
+ case 1 /* CONTRACT */:
28767
+ return "Contract";
28768
+ case 2 /* ERROR */:
28769
+ return "Error";
28770
+ }
28771
+ }
28690
28772
  async function getVerificationStatus({
28691
28773
  client,
28692
28774
  addresses,
@@ -28904,6 +28986,8 @@ export {
28904
28986
  RAY,
28905
28987
  SECONDS_PER_YEAR,
28906
28988
  SelfdestuctCheckState,
28989
+ SoltypeType,
28990
+ VerificationStatus,
28907
28991
  WAD,
28908
28992
  WAD_RAY_RATIO,
28909
28993
  aaveAddressesProvider_IncentivesControllerSlot,
@@ -28980,11 +29064,13 @@ export {
28980
29064
  tenderly_createVnet,
28981
29065
  tenderly_deleteVnet,
28982
29066
  tenderly_getVnet,
29067
+ tenderly_logsToAbiLogs,
28983
29068
  tenderly_sim,
28984
29069
  tenderly_simVnet,
28985
29070
  toTxLink,
28986
29071
  transformTenderlyStateDiff,
28987
29072
  validateAip,
29073
+ verificationStatusToString,
28988
29074
  wadDiv,
28989
29075
  wadToRay
28990
29076
  };