Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audit followup #87

Closed
wants to merge 30 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
a7e0f6f
fix BridgePermissions.sol
sisyphusSmiling Jun 5, 2024
a9fbaff
fix FlowEVMBridgeConfig.evmAddressHasTokenHandler
sisyphusSmiling Jun 5, 2024
cf92c05
add revert on collision in FlowEVMBridgeNFTEscrow.initializeEscrow
sisyphusSmiling Jun 5, 2024
1407213
update returned COA entitlement by FlowEVMBridgeUtils.borrowCOA
sisyphusSmiling Jun 5, 2024
4341076
update deployment script
sisyphusSmiling Jun 10, 2024
6136d31
add input validation in FlowEVMDeploymentRegistry.sol & update byteco…
sisyphusSmiling Jun 12, 2024
331fa9d
fix overflow in NFT templates & update code chunks for all networks
sisyphusSmiling Jun 13, 2024
7985c1d
add input validation to FlowEVMBridgeConfig.associateType
sisyphusSmiling Jun 13, 2024
ef0423a
update .sol dependencies
sisyphusSmiling Jun 13, 2024
209e8ae
bump compiler v & lock pragma + update bytecode consts
sisyphusSmiling Jun 13, 2024
ec91dfd
remove unused test scripts & txns
sisyphusSmiling Jun 13, 2024
7d6f05f
add dry run transaction
sisyphusSmiling Jun 13, 2024
4290e78
remove ownership renunciation from FlowBridgeFactory
sisyphusSmiling Jun 13, 2024
e43bf58
add gasLimit to FlowEVMBridgeConfig in place of hardcoded val
sisyphusSmiling Jun 13, 2024
dfd4ea3
fix FlowEVMBridgeUtils.getEVMOnboardingValues to assert on ERC20
sisyphusSmiling Jun 17, 2024
d43121e
add ICrossVM interface and update bridged ERC20/721 template
sisyphusSmiling Jun 17, 2024
4e8a29e
fix ERC165 implementations
sisyphusSmiling Jun 17, 2024
197f523
update ERC20/721 deployer events
sisyphusSmiling Jun 17, 2024
c61f5b4
add FlowEVMBridgeConfig.AssociationUpdated event
sisyphusSmiling Jun 17, 2024
46c6cc7
add events to IFlowEVMDeploymentRegistry & implement
sisyphusSmiling Jun 17, 2024
5afdabd
fix mismatched behavior & documentation in FlowEVMBridgeUtils
sisyphusSmiling Jun 18, 2024
52232cb
fix hardcoded bridged nft name when resolving NFTCollectionDisplay fr…
sisyphusSmiling Jun 18, 2024
5baa471
fix dict & arr serialization + toUpper bug on numbers
sisyphusSmiling Jun 18, 2024
faa548e
add type-level pausing via FlowEVMBridgeConfig & add test case
sisyphusSmiling Jun 18, 2024
da6999f
polish bridge contract events for traceability & readability
sisyphusSmiling Jun 19, 2024
c36b98d
update EVM contract against flow-go stdlib contract
sisyphusSmiling Jun 19, 2024
1cbd64f
update FlowEVMBridgeHandlerInterfaces event values
sisyphusSmiling Jun 19, 2024
e4a77cf
fix FlowEVMBridgeConfig.isTypePaused
sisyphusSmiling Jun 20, 2024
15d7672
add transaction post-conditions where possible
sisyphusSmiling Jun 20, 2024
ab62c7d
update flow-cli pre-release install script URL
sisyphusSmiling Jun 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update deployment script
  • Loading branch information
sisyphusSmiling committed Jun 17, 2024
commit 4341076904db38b66d6c8994cd81774031830b71
29 changes: 12 additions & 17 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,16 @@ func main() {
contractCode, err := os.ReadFile(contractPath)
checkNoErr(err)

// If the contract is already deployed as-is, skip deployment
a, err := o.GetAccount(ctx, "flow-evm-bridge")
checkNoErr(err)
log.Printf("Checking if contract %s is already deployed...", name)
if a.Contracts[name] != nil {
log.Printf("Contract %s already deployed, skipping...", name)
continue
}
log.Printf("Contract %s not found on %s, deploying...", name, network)

var args []cadence.Value
if name == "FlowEVMBridgeUtils" {
args = []cadence.Value{cadence.String(factoryAddr)}
Expand All @@ -197,23 +207,8 @@ func main() {
WithArg("pause", true),
)
checkNoErr(pauseResult.Err)
log.Printf("Bridge paused, configuring token handlers...")

// TODO: Blocked on FiatToken staging - uncomment once the updated contract is staged & migrated
// Add TokenHandler for specified Types
// fiatToken, err := o.State.Config().Contracts.ByName("FiatToken")
// checkNoErr(err)
// fiatTokenAddress := fiatToken.Aliases.ByNetwork(o.GetNetwork()).Address
// fiatTokenVaultIdentifier := "A." + fiatTokenAddress.String() + ".FiatToken.Vault"
// fiatTokenMinterIdentifier := "A." + fiatTokenAddress.String() + ".FiatToken.MinterResource"
// handlerCreationResult := o.Tx("bridge/admin/token-handler/create_cadence_native_token_handler",
// WithSigner("flow-evm-bridge"),
// WithArg("vaultIdentifier", fiatTokenVaultIdentifier),
// WithArg("minterIdentifier", fiatTokenMinterIdentifier),
// )
// checkNoErr(handlerCreationResult.Err)

log.Printf("Token handlers configured...continuing EVM setup...")

// TODO: Add any TokenHandlers here if needed

/* --- Finish EVM Contract Setup --- */

Expand Down