interface SmartContractAPIClient {
    compileSmartContract(compileSmartContractRequest, options?): AxiosPromise<CompiledSmartContract>;
    createSmartContract(walletId, addressId, createSmartContractRequest, options?): AxiosPromise<SmartContract>;
    deploySmartContract(walletId, addressId, smartContractId, deploySmartContractRequest, options?): AxiosPromise<SmartContract>;
    getSmartContract(walletId, addressId, smartContractId, options?): AxiosPromise<SmartContract>;
    listSmartContracts(page?, options?): AxiosPromise<SmartContractList>;
    readContract(networkId, contractAddress, readContractRequest): AxiosPromise<SolidityValue>;
    registerSmartContract(networkId?, contractAddress?, registerSmartContractRequest?, options?): AxiosPromise<SmartContract>;
    updateSmartContract(networkId?, contractAddress?, updateSmartContractRequest?, options?): AxiosPromise<SmartContract>;
}

Methods

  • Compiles a custom contract.

    Parameters

    • compileSmartContractRequest: CompileSmartContractRequest

      The request body containing the compile smart contract details.

    • Optional options: RawAxiosRequestConfig

      Axios request options.

    Returns AxiosPromise<CompiledSmartContract>

    • A promise resolving to the compiled smart contract.

    Throws

    If the request fails.

  • Creates a new Smart Contract.

    Parameters

    • walletId: string

      The ID of the wallet the address belongs to.

    • addressId: string

      The ID of the address to create the smart contract for.

    • createSmartContractRequest: CreateSmartContractRequest

      The request body containing the smart contract details.

    • Optional options: RawAxiosRequestConfig

      Axios request options.

    Returns AxiosPromise<SmartContract>

    Throws

    If the request fails.

  • Deploys a Smart Contract.

    Parameters

    • walletId: string

      The ID of the wallet the address belongs to.

    • addressId: string

      The ID of the address the smart contract belongs to.

    • smartContractId: string

      The ID of the smart contract to deploy.

    • deploySmartContractRequest: DeploySmartContractRequest

      The request body containing deployment details.

    • Optional options: RawAxiosRequestConfig

      Axios request options.

    Returns AxiosPromise<SmartContract>

    Throws

    If the request fails.

  • Gets a specific Smart Contract.

    Parameters

    • walletId: string

      The ID of the wallet the address belongs to.

    • addressId: string

      The ID of the address the smart contract belongs to.

    • smartContractId: string

      The ID of the smart contract to retrieve.

    • Optional options: RawAxiosRequestConfig

      Axios request options.

    Returns AxiosPromise<SmartContract>

    Throws

    If the request fails.

  • List smart contracts belonging to the CDP project.

    Parameters

    • Optional page: string

      A cursor for pagination across multiple pages of results. Don&#39;t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

    • Optional options: RawAxiosRequestConfig

      Axios request options.

    Returns AxiosPromise<SmartContractList>

    Summary

    List smart contracts belonging to the CDP project

    Throws

    If the request fails.

  • Read a contract

    Parameters

    • networkId: string

      Unique identifier for the blockchain network

    • contractAddress: string

      EVM address of the smart contract (42 characters, including '0x', in lowercase)

    • readContractRequest: ReadContractRequest

      The request body containing the method, args, and optionally the ABI

    Returns AxiosPromise<SolidityValue>

    • A promise resolving to the contract read result

    Throws

    If the request fails

  • Register a smart contract.

    Parameters

    • Optional networkId: string

      The network ID.

    • Optional contractAddress: string

      The contract address.

    • Optional registerSmartContractRequest: RegisterSmartContractRequest

      The request body containing the register smart contract details.

    • Optional options: RawAxiosRequestConfig

      Axios request options

    Returns AxiosPromise<SmartContract>

    • A promise resolving to the register smart contract result

    Summary

    Register a smart contract.

    Throws

    If the request fails

  • Update a smart contract.

    Parameters

    • Optional networkId: string

      The network ID.

    • Optional contractAddress: string

      The contract address.

    • Optional updateSmartContractRequest: UpdateSmartContractRequest

      The request body containing the update smart contract details.

    • Optional options: RawAxiosRequestConfig

      Axios request options

    Returns AxiosPromise<SmartContract>

    • A promise resolving to the update smart contract result

    Summary

    Update a smart contract.

    Throws

    If the request fails