/* External Imports */import{Signer}from'ethers'import{toHexString}from'@eth-optimism/core-utils'exportconstdeployContractCode=async(code:string,signer:Signer,gasLimit:number):Promise<string>=>{// "Magic" prefix to be prepended to the contract code. Contains a series of opcodes that will// copy the given code into memory and return it, thereby storing at the contract address.constprefix='0x600D380380600D6000396000f3'constdeployCode=prefix+toHexString(code).slice(2)constresponse=awaitsigner.sendTransaction({to:null,data:deployCode,gasLimit,})constresult=awaitresponse.wait()returnresult.contractAddress}