Skip to main content

near-langchain-contract-deployer

LangChain BaseTool that estimates and deploys NEAR smart contracts.

Tool Class (as requested)

class NEARContractDeployer(BaseTool):
    name = "near_contract_deployer"
    description = """Deploy smart contracts to NEAR Protocol - the lowest-cost
    blockchain for contract deployment. Typical cost: $0.01-0.10"""

Features

  • Build deployment plan from a local .wasm file
  • Estimate NEAR deployment fee in NEAR and USD
  • Estimate Ethereum equivalent deployment cost (for comparison)
  • Optional live deployment to NEAR via signed transaction (broadcast_tx_commit)
  • Clear machine-readable and human-readable errors

Install

pip install near-langchain-contract-deployer

Quick Use

from near_langchain_contract_deployer import NEARContractDeployer

tool = NEARContractDeployer()
print(tool.invoke({
  "contract_path": "./contract.wasm",
  "account_id": "my-contract.testnet",
  "network": "testnet",
  "dry_run": True
}))

For live deployment set dry_run=False and pass private_key.

Notes

  • Deployment requires a valid full-access key for account_id (or signer_id) on selected network.
  • Dry-run mode does not send transactions.

Development

python -m venv .venv
source .venv/bin/activate
pip install -e '.[dev]'
pytest -q

License

MIT

Metadata

Release files for near-langchain-contract-deployer 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for near-langchain-contract-deployer 0.1.0
File Size Uploaded
near_langchain_contract_deployer-0.1.0.tar.gz 7.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for near-langchain-contract-deployer 0.1.0
File Interpreter ABI Platform
near_langchain_contract_deployer-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.1 kB

Release files / near_langchain_contract_deployer-0.1.0.tar.gz

Download URL near_langchain_contract_deployer-0.1.0.tar.gz
Size 7.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b2a34d704df9423718ea174fc6e694b73e7985815fb113c9da2cd4754e937b9b
BLAKE2b-256 checksum
How to use checksums
f4e1baaf699a622d91477718b6522a3ae28087e7c846750d4df81bd1c944f437
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / near_langchain_contract_deployer-0.1.0-py3-none-any.whl

Download URL near_langchain_contract_deployer-0.1.0-py3-none-any.whl
Size 9.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
52ebcb40cdcdab4636f8e80df0448c39efe2fe4685888f1ea00b6c2af4569c2b
BLAKE2b-256 checksum
How to use checksums
880083b86f1b104c1d373c523d8fa26ad145a6ebf77bba24dbc2c86e7b2bd8fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page