es/ae/contract.js
async function contractCompile (source, options = {}) {
  const bytecode = await this.compileContractAPI(source, options)
  return Object.freeze(Object.assign({
    encodeCall: async (name, args) => this.contractEncodeCall(source, name, args),
    deploy: async (init, options = {}) => this.contractDeploy(bytecode, source, init, options)
  }, { bytecode }))
}
async function contractCompile (source, options = {}) {
  const bytecode = await this.compileContractAPI(source, options)
  return Object.freeze(Object.assign({
    encodeCall: async (name, args) => this.contractEncodeCall(source, name, args),
    deploy: async (init, options = {}) => this.contractDeploy(bytecode, source, init, options)
  }, { bytecode }))
}
async function contractCompile ( source , options = { } ) { const bytecode = await this . compileContractAPI ( source , options ) return Object . freeze ( Object . assign ( { encodeCall : async ( name , args ) => this . contractEncodeCall ( source , name , args ) , deploy : async ( init , options = { } ) => this . contractDeploy ( bytecode , source , init , options ) } , { bytecode } ) ) }
Compile contract source code
@function
@alias module:@aeternity/aepp-sdk/es/ae/contract
@category async
@param {String} source Contract sourece code
@param {Object} options Transaction options (fee, ttl, gas, amount, deposit)
@return {Promise<Object>} Result object
@example
const compiled = await client.contractCompile(SOURCE_CODE)
{
bytecode: CONTRACT_BYTE_CODE,
deploy: (init = [], options = {}) => Deploy Contract,
encodeCall: (fnName, args = []) => Prepare callData
}
Compile contract source code