Skip to content

Commit

Permalink
add assertion on non-nil symbol value in ERC20 deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
sisyphusSmiling committed Apr 13, 2024
1 parent d877f20 commit 4d45b10
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cadence/contracts/bridge/FlowEVMBridge.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,9 @@ contract FlowEVMBridge : IFlowEVMNFTBridge, IFlowEVMTokenBridge {
contractURI = "data:application/json;utf8,{".concat(serializedDisplay).concat("}")
}

// Ensure symbol is assigned before proceeding
assert(symbol != nil, message: "Symbol must be assigned before deploying ERC20 contract")

// Call to the factory contract to deploy an ERC20 & validate result
let callResult: EVM.Result = FlowEVMBridgeUtils.call(
signature: "deployERC20(string,string,string,string,string)",
Expand Down

0 comments on commit 4d45b10

Please sign in to comment.