Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
A fast, flexible and simple development environment framework for Ethereum smart contract, testing and deployment on Ethereum virtual machine(EVM). https://cobraframework.github.io
A fast, flexible and simple development environment framework for Ethereum smart contract, testing and deployment on Ethereum virtual machine(EVM).
With cobra you can get built-in smart contract compilation, linking, deployment, binary management, automated contract testing with Unittest and PyTest frameworks, scriptable deployment & migrations framework and network management for deploying to many public & private networks like INFURA or Ganache CLI.
This library requires the solc
executable to be present.
Only versions >=0.4.2
are supported and tested though this library may work
with other versions.
PIP to install cobra globally. For Linux sudo may be required.
$ pip install eth-cobra
We welcome pull requests. To get started, just fork this repo, clone it locally, and run:
$ pip install -e . -r requirements.txt
Initialize project structure
A default set of contract and tests, run the following command:
$ cobra init
Get help:
$ cobra --help
From there, you can run cobra compile
, cobra deploy/migrate
and cobra test --unittest/--pytest
to compile your contracts, deploy those contracts to the network, and run their associated unit tests.
compile:
solidity_path: "./contracts" # global
artifact_path: "./build/contracts"
contracts: [
contract: {
solidity: "Contract.sol",
solidity_path: "./contracts/libs", # detail
import_remappings: [
"=/path/folder/contracts/"
],
allow_paths: [
"/path/folder/contracts/"
]
}
]
deploy:
artifact_path: "./build/contracts/"
contracts: [
contract: {
artifact: "Contract.json",
links: ["Contract.json"]
}
]
test:
artifact_path: "./build/contracts/"
test_paths: ["./tests"]
contracts: [
contract: {
artifact: "Contract.json",
links: ["Contract.json"]
}
]
network:
development: {
url: "https://ropsten.infura.io/...",
host: "localhost",
port: 8545,
hdwallet: {
mnemonic: "decide adjust legend nation type same task aim rigid lucky guilt close", # or
seed: "decide adjust legend nation type same task aim rigid lucky guilt close",
password: "meherett",
private: "5f8935bb3b61b312ba1114cbf6f1ea30102383f2b043a1b213aa482132d25049",
gas: 3000000,
gas_price: 1000000
},
protocol: "HTTP", # HTTP, HTTPS, WS(WebSocket) and ICP
account: {
address: "0x6a373a75c388ac2d160f1d2b6d9ada34f29831cd",
gas: 3000000,
gas_price: 1000000
}
}
Tests are still under development.
You can run the tests with:
$ pytest tests
Or use tox
to run the complete suite against the full set of build targets, or pytest to run specific
tests against a specific version of Python.
Meheret Tesfaye – @meherett – meherett@zoho.com
Distributed under the MIT license. See LICENSE
for more information.
This project is licensed under the MIT License - see the LICENSE file for details
FAQs
A fast, flexible and simple development environment framework for Ethereum smart contract, testing and deployment on Ethereum virtual machine(EVM). https://cobraframework.github.io
We found that eth-cobra demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.