Skip to content

Commit

Permalink
feat: version bump and all path fix
Browse files Browse the repository at this point in the history
  • Loading branch information
arthcp committed Aug 22, 2024
1 parent 2c539c3 commit 77109fa
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 43 deletions.
2 changes: 1 addition & 1 deletion scripts/deploy/helpers/send-msg/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export const sendCounterBridgeMsg = async (
`fees for path ${chainSlug}-${siblingSlug} is ${formatEther(value)} ETH`
);

const { gasLimit, gasPrice, type } = overrides(chainSlug);
const { gasLimit, gasPrice, type } = await overrides(chainSlug);
// console.log({to, data, value, gasLimit});
let response = await relayTx({
to,
Expand Down
2 changes: 1 addition & 1 deletion scripts/rpcConfig/constants/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import { DeploymentMode } from "../../../src";

export const version = {
[DeploymentMode.DEV]: "1.0.5",
[DeploymentMode.PROD]: "1.0.41",
[DeploymentMode.PROD]: "1.0.43",
};
89 changes: 48 additions & 41 deletions scripts/rpcConfig/txdata-builder/generate-calldata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,47 +122,54 @@ export const getTxData = async (): Promise<TxData> => {
.filter((c) => addresses[c]?.["SocketSimulator"]);

const txData: TxData = {};
for (const chainSlug of allChainSlugs) {
console.log(`Getting tx data for ${chainSlug}`);
const packetInfo = await getPacketInfo(
chainSlug,
addresses[chainSlug]?.["CapacitorSimulator"]
);

const sbSimulatorAddress = addresses[chainSlug]?.["SwitchboardSimulator"];
if (sbSimulatorAddress === undefined)
throw new Error("Sb simulator not found!");

const sealTxData = await getSealTxData(chainSlug, signer, packetInfo);
const proposeTxData = await getProposeTxData(
chainSlug,
signer,
packetInfo,
sbSimulatorAddress
);
const attestTxData = await getAttestTxData(
chainSlug,
signer,
packetInfo,
sbSimulatorAddress
);
const executeTxData = await getExecuteTxData(chainSlug, signer, packetInfo);

const simulatorContract = new Contract(
sbSimulatorAddress,
OwnableABIInterface,
getProviderFromChainSlug(chainSlug)
);
const owner = await simulatorContract.owner();

txData[chainSlug] = {
sealTxData,
proposeTxData,
attestTxData,
executeTxData,
owner,
};
}
await Promise.all(
allChainSlugs.map(async (chainSlug) => {
console.log(`Getting tx data for ${chainSlug}`);
const packetInfo = await getPacketInfo(
chainSlug,
addresses[chainSlug]?.["CapacitorSimulator"]
);

const sbSimulatorAddress = addresses[chainSlug]?.["SwitchboardSimulator"];
if (sbSimulatorAddress === undefined)
throw new Error("Sb simulator not found!");

const sealTxData = await getSealTxData(chainSlug, signer, packetInfo);
const proposeTxData = await getProposeTxData(
chainSlug,
signer,
packetInfo,
sbSimulatorAddress
);
const attestTxData = await getAttestTxData(
chainSlug,
signer,
packetInfo,
sbSimulatorAddress
);
const executeTxData = await getExecuteTxData(
chainSlug,
signer,
packetInfo
);

const simulatorContract = new Contract(
sbSimulatorAddress,
OwnableABIInterface,
getProviderFromChainSlug(chainSlug)
);
const owner = await simulatorContract.owner();

txData[chainSlug] = {
sealTxData,
proposeTxData,
attestTxData,
executeTxData,
owner,
};
console.log(`Tx data for ${chainSlug} done`);
})
);

return txData;
};
Expand Down

0 comments on commit 77109fa

Please sign in to comment.