Skip to content

Conversation

grasphoper
Copy link
Contributor

@grasphoper grasphoper commented Aug 30, 2025

This deployment is required to update us to using a new SP1Helios deployment from here, but also bumps BSC deployment with OFT functionality.

This PR also deploys Universal_Adapter for BSC in order to keep parity of functionality between Adapter and Spoke for BSC (i.e. both support OFT now)

@grasphoper grasphoper changed the title chore: deploy new BSC Spoke chore: deploy new BSC contracts Aug 30, 2025
// ! Notice. Params below helped deploy Universal_Spoke on BSC, but might not be desirable always
// gas: "auto",
// gasPrice: 3e8, // 0.3 GWEI
// allowUnlimitedContractSize: true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know why allowUnlimitedContractSize was needed here? That seems like it specifically should cause the deployment to fail when actually sending the create transaction.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea it might be a local error...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know why allowUnlimitedContractSize was needed here?

Hmm, perhaps it wasn't needed actually. I was trying to throw everything at this config to make it not revert with the "deployment out of gas" error

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty sure it wasn't needed. Removed here ca5816e

@@ -18,6 +27,10 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
throw new Error(`Wrapped native token not found for ${wrappedNativeSymbol} on chainId ${spokeChainId}`);
}

const oftEid = getOftEid(hubChainId);
// ! Notice. Deployed has to adjust this fee cap based on dst chain's native token. 4.4 BNB for BSC
const oftFeeCap = toWei(4.4); // ~1 ETH fee cap
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would happen if the BNB:ETH exchange rate moved sharply? Would we need to redeploy or does our fee cap give us a wide room for error?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is extremely wide. A normal quote is never > $10. We give a HUGE buffer here

The fee cap is meant to prevent a single incorreect quote from draining our (potentially big?) native token balance, we cap it at like $3-4K. IMO 4.4 BNB is fine here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants