Skip to main content

Circle Contracts

Project description

circle-smart-contract-platform

This is the Circle Contracts API documentation.

  • API version: 1.0
  • Package version: 7.0.0

Requirements.

Python 3.7+

Installation

pip install

pip install circle-smart-contract-platform

Then import the package:

from circle.web3 import smart_contract_platform

Usage

  1. Generate an API key, if you haven't already, in the Web3 Services Console. This API key will be used for authentication and authorization when making requests to Circle's APIs. API key can be set by environment variable or function parameter
export CIRCLE_WEB3_API_KEY="Your API KEY"
  1. Register an entity secret following Circle's Developer-Controlled QuickStart. This step ensures that your account is correctly set up to interact with Circle's APIs. Entity secret can be set by environment variable or function parameter
export CIRCLE_ENTITY_SECRET="Your entity secret"
  1. Initiate API client
from circle.web3 import utils

client = utils.init_smart_contract_platform_client(api_key="Your API KEY", entity_secret="Your entity secret")
  1. Interact with the client:
from circle.web3 import smart_contract_platform

api_instance = smart_contract_platform.DeployImportApi(client)

# import contract
try:
    request = smart_contract_platform.ImportContractRequest.from_dict({
        "name": "UChildERC20Proxy",
        "address": "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",
        "blockchain": "MATIC"
    })
    response = api_instance.import_contract(request)
    print(response)
except smart_contract_platform.ApiException as e:
    print("Exception when calling DeployImportApi->import_contract: %s\n" % e)

We recommend reading through the official documentation and QuickStart guides mentioned above to ensure a smooth setup and usage experience.

Configuration

The client accept following configuration parameters:

Option Required Description
api_key Yes Api Key that is used to authenticate against Circle APIs. Must be provided by ether env variable or function parameter.
entity_secret Yes Your configured entity secret. Must be provided by ether env variable or function parameter.
host No Optional base URL to override the default: https://api.circle.com/v1/w3s.
user_agent No Optional custom user agent request header. We will prepend it to default user agent header if provided.

Need help or have questions?

Here are some helpful links, if you encounter any issues or have questions about this SDK:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

circle_smart_contract_platform-7.0.0.tar.gz (44.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

circle_smart_contract_platform-7.0.0-py3-none-any.whl (105.6 kB view details)

Uploaded Python 3

File details

Details for the file circle_smart_contract_platform-7.0.0.tar.gz.

File metadata

File hashes

Hashes for circle_smart_contract_platform-7.0.0.tar.gz
Algorithm Hash digest
SHA256 81ab1e4cc00a7f9613cb09f50daa54fdd2cc71d0f48a2939a831b01f59c80fba
MD5 d14e5d2135ef977b77c4df6835b09c9a
BLAKE2b-256 a1e228b48b5d21e060fdeead6fdf8492e9b734deddc4dfc6dd9e9ea4c06b328f

See more details on using hashes here.

File details

Details for the file circle_smart_contract_platform-7.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for circle_smart_contract_platform-7.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 66eefe396bec7b8cb0b93d59074930990ae36708c0fe54f9c9fe6b216ecb6e46
MD5 34f9cf8427024015d8a466a8b13a6e0a
BLAKE2b-256 30c5d38f8ecf5cd27fe2c941892e9321665811433bad074113aed97798887168

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page