diff --git a/src/blog/data.json b/src/blog/data.json index 0d0520ccf..7170d1bc8 100644 --- a/src/blog/data.json +++ b/src/blog/data.json @@ -1,4 +1,12 @@ { + "using-ethpm-and-truffle": { + "title": "Using ethpm and Truffle", + "date": "2021-1-14", + "author": "Nick Gheorghita", + "published": true, + "excerpt": "Truffle now comes with built-in support for ethpm v3 to simplify your development workflow.", + "image": "/img/blog/using-ethpm-and-truffle/blog-thumbnail.png" + }, "2020-is-finally-over-a-year-end-wrapup": { "title": "2020 is Finally Over: A Year End Wrapup", "date": "2020-12-22", diff --git a/src/blog/using-ethpm-and-truffle.md b/src/blog/using-ethpm-and-truffle.md new file mode 100644 index 000000000..c9d391907 --- /dev/null +++ b/src/blog/using-ethpm-and-truffle.md @@ -0,0 +1,248 @@ +[ethpm](https://www.ethpm.com/) is a framework-agnostic, secure protocol for packaging and distributing evm smart contracts and their on-chain deployments. Truffle now comes with built-in support for [ethpm v3](http://ethpm.github.io/ethpm-spec/v3-package-spec.html) to simplify your development workflow. + +## use ethpm x truffle to ... + +- **explore** + - verfied smart contracts & protocols + - on-chain deployments from any chain +- **install** + - interact with verified deployments from your truffle console + - import packaged contracts directly in your own contract + - re-deploy packaged contracts on any chain + - use existing on-chain libraries, stop re-deploying every library you use +- **publish** + - your smart contracts and deployments for other developers to use in their projects + +## some ethpm definitions +- **package**: a [standardized](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-2678.md) JSON object containing the smart contract assets +- **registry**: a [standardized](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1319.md) on-chain datastore that stores package identifiers +- **deployment**: a deployed instance of a contract, either on mainnet or any testnet +- **ethpm uri**: a [standardized](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-2942.md) uri scheme used to identify an ethpm registry or a package + - format: `ethpm://registry_address:chain_id/package_name@version` + - registry example: `ethpm://libraries.ethpm.eth:3` + - package example: `ethpm://libraries.ethpm.eth:3/safe-math@0.1.0` + + +# a word on trust +In any programming paradigm, using packaged code inherently requires **trust** that the author of the package does not include malicious code. With blockchains, the incentive to create malicious packages is greater - since there is direct access to valuable assets. With ethpm - you are always guaranteed to execute the code of the package author. But, we can **not** guarantee that the package author is trustworthy. + +```ONLY INSTALL PACKAGES FROM TRUSTED REGISTRIES!``` + +There is no central registry in ethpm (eg. npm, pip, etc..). ethpm uses a federated model where individual developers, auditors, and organizations maintain their own, permissioned registry. Only the controlling account of a registry is allowed to publish packages to that registry. As long as you **trust** the controlling account of a registry, it is safe to install packages from their registry. + +```ONLY INSTALL PACKAGES FROM TRUSTED REGISTRIES!``` + +**ANYBODY** can create an ethpm registry. **ANYBODY** can create an ethpm package. You must assume that there will be malicious packages on non-permissioned ethpm registries, trying to steal your crypto. Truffle comes connected to a non-permissioned ethpm registry by default. This is simply to enable experimentation with the ethpm protocol - and packages on this registry should **NEVER** be used in production or to manage valuable assets. + +**Always** verify that a registry is maintained by a trusted source. Verification of registry addresses is best done by advertising your registry address via the `README.md` on the Github repository, or Twitter. Connecting your registry address to an ENS domain name further helps simplify the trust-establishment process. + +One more time. Just because a package is available, this **DOES NOT** establish that it is safe. Trust in a package's safety is established by verifying the controlling account of the package's host registry. + +tl:dr; ```ONLY INSTALL PACKAGES FROM TRUSTED REGISTRIES!``` + +# 3 main commands +- `truffle packages`: list available packages on an ethpm registry +- `truffle install`: install a package into your truffle project +- `truffle publish`: publish your truffle project as an ethpm package + +# setting your truffle-config.js +Below are the default values Truffle needs to know to interact with the ethpm ecosystem. This `ethpm` config is located within a project's `truffle-config.js`. To override any of these default values for your project, include the field in your project's `truffle-config.js`. +```javascript + ethpm: { + ipfsHost: "ipfs.infura.io", + ipfsProtocol: "https", + ipfsPort: "5001", + registry: { + address: "0x0bd0200357D26A0bB5d1D1c1Fd56C317B68d15d5", + network: "ropsten", + }, + version: "3" + }, +``` +* `registry` defines the address and network of the connected registry +* the specified `network` must have a matching provider available under the `networks` key +* `address` supports `0x` prefixed addresses or ENS names (to use ENS, make sure you enable ENS in your `truffle-config`) + +# finding a package to install +```ONLY INSTALL PACKAGES FROM REGISTRIES YOU TRUST!``` + +By default, Truffle comes connected to an un-authorized ethpm registry. This means that **anybody** can publish a package to this registry. Packages hosted on this registry should **not** be considered safe to use, but they will make it easier to start playing around with ethpm. + +The best place to find an interesting ethpm package is from the package author. Whether it's the organization's webpage, github repo, or a developer's twitter bio - make sure you source your packages from a registry you trust. If you can't find a registry for the contracts you want - package them up yourself, or tweet at the author to publish their contracts as an ethpm package! + +## tutorial package layout +In this tutorial, we'll be using a package containing the OpenZeppelin ERC20 contract. This package is for tutorial purposes only, it has not been audited and should not be used in production. + +- name: `erc20-example` +- version: `0.0.1` +- manifest uri: `ipfs://QmYmstuuQmVVaWvde5VHzwxs5zDaJbjGk8nGHeTfZnEgoe` +- ethpm uri: `ethpm://0x0bd0200357D26A0bB5d1D1c1Fd56C317B68d15d5:3/erc20-example@0.0.1` +- layout: + - `erc20/` + - `ERC20.sol` + - `IERC20.sol` + - `GSN/Context.sol` + - `buildDependencies/` + - `safe-math` + - `SafeMath.sol` + - `deployments/` + - `ropsten/ERC20` + - `goerli/ERC20` + +# `truffle packages` +To list the available packages on Truffle's default registry or the registry defined in your `truffle-config.js` - run `truffle packages`. + +```bash +Searching for packages published on registry located at: 0x0bd0200357D26A0bB5d1D1c1Fd56C317B68d15d5 +This registry does not appear to have permissioned releases. This means that anybody can publish a package to this registry. +Please be very careful before installing and interacting with packages on this registry. +Package: erc20-example + - 0.0.1 @ ipfs://QmYmstuuQmVVaWvde5VHzwxs5zDaJbjGk8nGHeTfZnEgoe +``` + +# `truffle install` + +Installing a package will write contract assets and deployments to your project's `build/`, and source contracts to `_ethpm_packages/`. Just like `node_modules/`, you should not edit `_ethpm_packages/` folder directly. + +There are a couple different options to install a package... + +From the package's registry set in your `truffle-config.js`. + +```bash +truffle install erc20-example@0.0.1 +``` + +... or to install the latest version of the package. + +```bash +truffle install erc20-example +```` + +Install a package directly with its `ethpm` URI. + +```bash +truffle install ethpm://libraries.ethpm.eth:3/safe-math@1.0.0 +``` + +Install a package directly with its manifest uri (currently, only ipfs manifest uris are supported). + +```bash +truffle install ipfs://QmYmstuuQmVVaWvde5VHzwxs5zDaJbjGk8nGHeTfZnEgoe +``` + +You can install any package under an alias wth the `--alias` flag, and then use the alias to reference the package. This is useful if you want to install two different packages with the same name. + +```bash +truffle install erc20 --alias erc20-alternate +``` + +## interact with a deployment from an installed package +- Run `truffle console` to launch a console connected to the chain defined in your `truffle-config.js`. +- From the console, list all available deployments from the package with `networks` (only deployments found on the connected chain will be available to interact with from the console). +- Then, interact with the contracts like any other truffle contract [link](https://www.trufflesuite.com/docs/truffle/getting-started/interacting-with-your-contracts). + +## deploy a contract from an installed package +- Simply reference the target contract with a string in the form of `"package-name/Contract"`, and run your migration like any other contract + +```js +const ERC20 = artifacts.require("erc20-example/ERC20"); + +module.exports = function (deployer) { + deployer.deploy(ERC20, 'test token', 'TEST'); +}; +``` + +## importing an installed contract into your contract +- importing a top-level contract +```js +import "erc20-example/ERC20.sol" +``` +- importing a nested contract +```js +import "erc20-example/GSN/Context.sol" +``` + +## linking to a library contract in a deployment +Tired of redeploying your libraries over and over? You can find some instances of available libraries on `ethpm://libraries.ethpm.eth:3`. These have not been audited, and are not fit for use in production. + +After installing the `ethpm://libraries.ethpm.eth:1/safe-math@0.1.0` library, you can link your contracts to it like... + +```js +const MyContract = artifacts.require("MyContract"); +const SafeMath = artifacts.require("safe-math/SafeMath"); + +module.exports = function(deployer) { + deployer.link(SafeMath, MyContract); + deployer.deploy(MyContract) +}; +``` + +# `truffle publish` +Publishing ethpm packages makes it easy to distribute your smart contracts and deployments for other developers to use. + +## setting your `ethpm.json` +Before you can publish a package, you must create an `ethpm.json` config file in the root-level of your truffle project. This file defines the `name`, `version`, and metadata for the published package. The only required fields are `"name"` and `"version"`, but it is recommended to use all of the metadata to describe your package. + +```json +{ + "name": "my-package", + "version": "0.0.1", + "meta": { + "description": "My awesome project.", + "license": "MIT", + "links": { + "documentation": "www.readthedocs.com", + "repository": "www.github.com", + "website": "www.project.com" + } + }, + "authors": [ + "Me ", + "Someone else -``` +1. Package name (ex. `my-package`) + - **must** conform to regex: `^[a-z][-a-z0-9]{0,255}$` +2. A package version (ex. `1.0.0`) + - **should** conform to [semver](http://semver.org/) +3. A manifest URI (ex. `ipfs`) + - any content-addressed uri where the [package manifest] is stored. + - IPFS is currently the only supported filestore in truffle -You can also install a package at a specific version: +An ethpm [manifest](https://ethpm.github.io/ethpm-spec/glossary.html#term-package-manifest) is simply a JSON object, that **must** comply with the [ethpm schema](https://github.com/ethpm/ethpm-spec/blob/master/spec/v3.spec.json). A manifest contains the various contract assets that can be included in an ethpm package; including bytecodes, source files, deployment data, compiler data, metadata and more. -```shell -$ truffle install @ -``` +In ethpm, there is no central [registry](https://docs.ethpm.com/erc1319). Every project must deploy and manage their own package registry where they can publish their packages. However, Truffle ships with a non-permissioned, registry to which anybody is able to publish their packages. -Like NPM, EthPM versions follow [semver](http://semver.org/). You can find a list of all available packages at [the Ethereum Package Registry](http://explorer.ethpm.com/). +# ONLY INSTALL PACKAGES FROM TRUSTED REGISTRIES! +Due to the nature of the blockchain, interacting with packaged code carries a much higher risk than in other code platforms (pypi, npm, etc). A single line of malicious code in an otherwise harmless package can be the difference between a succesful project or a disastrous hack. -## Installing Dependencies +Only install packages from registries that are controlled by accounts or organizations whom you trust. Just because a package is available, this does not establish that it is safe. Only install packages from registries controlled by trusted wallets. Validated registry addresses should be sourced directly from an organization / project's github repo or twitter account, and preferably connected to an ENS domain name. -Your project can define an `ethpm.json` file that among other things can pin your project to specific dependencies and versions. To install all dependencies listed in the `ethpm.json` file, run: +Truffle ships with a default unauthenticated registry, to make it easy to get started using ethpm. Practice extreme caution when interacting with the packages on this registry, as anybody can release a package on the default registry. -```shell -$ truffle install -``` +## How to install an ethpm package + +### 1. Set your registry. +By default, your Truffle project will be connected to the default Truffle registry. Some other registries to explore include... +- `libraries.ethpm.eth`: Contains deployments of all [OpenZeppelin](https://github.com/OpenZeppelin/openzeppelin-contracts/) libraries across mainnet and all testnets available to use. +- `registry.ethpm.eth`: Contains packages for ERC1319 registries, so you can easily deploy your own registry. +- [ethpm registry directory](https://docs.ethpm.com/public-registry-directory): A list of verified registries from various projects and organizations. + +Once you have the registry address or ENS name, update the `ethpm/registry/address` and `ethpm/registry/network` fields in your project's `truffle-config.json`. Be sure that your `truffle-config` also includes a valid provider inside its `networks` field for the chain on which your target registry is located. Note that to use the ENS name of a registry, you must have [ENS enabled](https://www.trufflesuite.com/docs/truffle/advanced/ethereum-name-service#configuration). + +### 2. Find your package. +Once you've set your ethpm registry, use the `truffle packages` command to display the available packages on the connected registry. + +### 3. Install your package. +Install your package with `truffle install name[@version]`. If no version is supplied, Truffle will automatically try to install the latest release. + +Other ways to install a package... (these require valid providers also). +- [ethpm URI](https://docs.ethpm.com/uris): + - `truffle install ethpm://libraries.ethpm.eth/ownable@1.0.0` + +- IPFS URI: + - `truffle install ipfs://Qmbasdbf....` -For more details on the `ethpm.json` file, see the [package configuration](/docs/getting_started/packages-ethpm#package-configuration) below. +Since all installed ethpm packages share a namespace, use the `--alias` flag to define an alternate name under which to install packages. -## Consuming installed contracts +``` +truffle install package@1.0.0 --alias another-name +``` + +### 4. Consuming installed contracts -Installed packages will be placed in the `installed_contracts` directory within your project folder. If no `installed_contracts` directory exists it'll be created for you. You should treat this folder like you treat the `node_modules` folder with NPM -- that is, you shouldn't edit the contents inside unless you know what you're doing. :) +Installed packages will be placed in the `_ethpm_packages/` directory within your project folder. If no `_ethpm_packages/` directory exists it'll be created for you. You should treat this folder like you treat the `node_modules` folder with NPM -- that is, you shouldn't edit the contents inside unless you know what you're doing. :) Installed packages can be consumed within your tests, migrations and solidity contract files by `import`'ing or `require`'ing that package and contract by name. For example, the following Solidity contract would import the `owned.sol` file from the `owned` package: ```solidity -pragma solidity ^0.4.2; +pragma solidity ^0.5.1; import "owned/owned.sol"; @@ -53,8 +79,8 @@ Similarly, the following migration file would use the `ENS.sol` contract from th File: `./migrations/2_deploy_contracts.js` ```javascript -var ENS = artifacts.require("ens/ENS"); -var MyContract = artifacts.require("MyContract"); +const ENS = artifacts.require("ens/ENS"); +const MyContract = artifacts.require("MyContract"); module.exports = function(deployer) { // Only deploy ENS if there's not already an address already. @@ -68,68 +94,84 @@ module.exports = function(deployer) { Note that in the migration above, we consume the `ens` package and deploy the ENS contract conditionally based on whether or not ENS already has an address set. This is a fancy trick provided to you by the [deployer](/docs/getting_started/migrations#deployer-deploy-contract-args-options-) that makes it much easier to write migrations dependent on the the existence of network artifacts. In this case, if we were running our migrations on the Ropsten network, this migration **wouldn't** deploy the `ENS` contract because (at the time of this writing) Ropsten is where the canonical `ENS` contract exists -- we wouldn't want to deploy our own. But if we were running our migrations against a different network, or a test network perhaps, then we'd want to deploy the `ENS` contract so that we have a dependency contract to work with. +### 5. Interacting with deployments. +Ethpm packages often contain on-chain deployments, so you can immediately interact with verified contract instances. After you've installed a package, simply fire up your `truffle console` and run the `networks` command to see the available instances. + ## Publishing your own package -Publishing your own package is as straightforward as installing, but like NPM, requires a bit more configuration. +Publishing your own package is as straightforward as installing, but like NPM, requires a bit more configuration. However, currently Truffle only supports publishing solidity contracts. + +### Setup -### Ropsten, Ropsten, Ropsten +By default, your package will be published to the un-authorized, default registry. This registry must not be used in production, and was only created to simplify experimenting with ethpm. We strongly recommend that you deploy your own, authorized ethpm registry to host your packages. -The Ethereum Package Registry currently exists on the Ropsten test network. To publish to the registry, we need to set up our own Ropsten configuration because we'll be making transactions that need to be signed. +To publish to any registry, we need to set up our configuration to make signed transactions. If you are publishing to an authorized registry, the signing address must also be authorized to cut a release on the connected registry. -In this example, we'll use Infura for publishing packages along with the `truffle-hdwallet-provider` NPM module and a 12-word hd-wallet mnemonic that represents our Ethereum address on the Ropsten network. First, install the `truffle-hdwallet-provider` via NPM within your project directory: +In this example, we'll use Infura for publishing packages along with the `truffle-hdwallet-provider` NPM module and a 12-word hd-wallet mnemonic that represents our Ethereum address. First, install the `truffle-hdwallet-provider` via NPM within your project directory: ```shell $ npm install truffle-hdwallet-provider --save ``` -Then edit your configuration to add the `ropsten` network using your 12-word mnemonic: +Then edit your configuration to add a provider using your 12-word mnemonic. The provider must be configured for the network on which the connected registry lives. -File: `truffle.js` +File: `truffle-config.js` ```javascript -var HDWalletProvider = require("truffle-hdwallet-provider"); +const HDWalletProvider = require("truffle-hdwallet-provider"); // 12-word mnemonic -var mnemonic = "opinion destroy betray ..."; +const mnemonic = "opinion destroy betray ..."; +const infuraKey = "INFURA_PROJECT_ID"; module.exports = { + ethpm: { + ipfsHost: "ipfs.infura.io", + ipfsProtocol: "https", + ipfsPort: "5001", + registry: { + address: "0x123abc...", // also accepts ENS + network: "mainnet" // must match a field in "networks" that contains a provider + } + }, networks: { - development: { - host: "127.0.0.1", - port: 8545, - network_id: "*" // Match any network id - }, - ropsten: { + mainnet: { provider: () => - new HDWalletProvider(mnemonic, "https://ropsten.infura.io/v3/YOUR-PROJECT-ID"), - network_id: 3 // official id of the ropsten network + new HDWalletProvider(mnemonic, `https://mainnet.infura.io/v3/${infuraKey}`), + network_id: 1 } } }; ``` +When generating a package, Truffle will collect all available smart contracts and deployments. To successfully generate the package, make sure that you include a provider for each chain on which a deployment is located. + ### Package configuration -Like NPM, configuration options for EthPM go in a separate JSON file called `ethpm.json`. This file sits alongside your Truffle configuration and gives Truffle all the information it needs to publish your package. You can see a full list of available options in the [Configuration](/docs/advanced/configuration) section. +Like NPM, configuration options for ethpm reside in a separate JSON file called `ethpm.json`. This file sits alongside your Truffle configuration and gives Truffle all the information it needs to publish your package. You can see a full list of available options in the [Configuration](/docs/advanced/configuration) section. Keep in mind that once an ethpm package is published to a registry, it cannot be deleted or re-published under the same version to that registry. File: `ethpm.json` -```javascript +```json { - "package_name": "adder", - "version": "0.0.3", - "description": "Simple contract to add two numbers", - "authors": [ - "Tim Coulter " - ], - "keywords": [ - "ethereum", - "addition" - ], - "dependencies": { - "owned": "^0.0.1" - }, - "license": "MIT" + "name": "adder", // required + "version": "0.0.3", // required + "meta": { + "description": "Simple contract to add two numbers", + "license": "MIT", + "links": { + "documentation": "www.readthedocs.com", + "repository": "www.github.com", + "website": "www.project.com" + }, + "authors": [ + "Tim Coulter " + ], + "keywords": [ + "ethereum", + "addition" + ] + } } ``` @@ -160,3 +202,48 @@ $ truffle networks --clean ``` See the [command reference](/docs/advanced/commands#networks) for more information. + + +### Deploy your own registry with the registry package. + +To deploy your own, permissioned ethpm registry, you can use the `ethpm://registry.ethpm.eth:3/standard` package. + +`truffle install ethpm://registry.ethpm.eth:3/standard` + +Inside your `_ethpm_packages/` directory, you should now be able to inspect the source files for the registry contract (remember, don't edit anything inside the `_ethpm_packages/` directory). + +Update your migration file to deploy the registry. + +```javascript +const PackageRegistry = artifacts.require("standard/PackageRegistry") + +module.exports = function(deployer) { + deployer.deploy(PackageRegistry); +}; +``` +Now run `truffle migrate` and save the address of your newly deployed ethpm registry. + +Note that the address used to deploy this registry will be the only account authorized to release packages onto the registry. However, ownership is transferable. It is also recommended that you connect your registry address to an ENS domain for better usability. + +### Use a `libraries.ethpm.eth` libary package + +Tired of wasting gas from redeploying libraries over and over? The libraries from OpenZeppelin, have been deployed to mainnet and all testnets and made available as ethpm packages on the `libraries.ethpm.eth` registry. To use any library is simple. + +Install the package. +`truffle install ethpm://libraries.ethpm.eth:3/safe-math` + +Then link it to any contract in your migrations file. +```javascript +const SafeMath = artifacts.require("safe-math/SafeMath") +const MyContract = artifacts.require("MyContract") + +module.exports = function(deployer) { + deployer.link(SafeMath, MyContract); + deployer.deploy(MyContract); +}; +``` + +### Useful links. +- ask your questions on our [gitter channel](https://gitter.im/ethpm/Lobby?source=orgpage) +- The [`ethpm-cli`](https://github.com/ethpm/ethpm-cli) is equipped with more useful commands to explore and interact with ethpm. +- [documentation](http://docs.ethpm.com/) diff --git a/src/docs/truffle/overview.md b/src/docs/truffle/overview.md index f818cf7dd..b74cdcb9a 100644 --- a/src/docs/truffle/overview.md +++ b/src/docs/truffle/overview.md @@ -20,7 +20,7 @@ A world class development environment, testing framework and asset pipeline for * Automated contract testing for rapid development. * Scriptable, extensible deployment & migrations framework. * Network management for deploying to any number of public & private networks. -* Package management with EthPM & NPM, using the [ERC190](https://github.com/ethereum/EIPs/issues/190) standard. +* Package management with ethpm & NPM, using the [ERC190](https://github.com/ethereum/EIPs/issues/190) standard. * Interactive console for direct contract communication. * Configurable build pipeline with support for tight integration. * External script runner that executes scripts within a Truffle environment. diff --git a/src/docs/truffle/reference/configuration.md b/src/docs/truffle/reference/configuration.md index 46dc0eb18..235be0985 100644 --- a/src/docs/truffle/reference/configuration.md +++ b/src/docs/truffle/reference/configuration.md @@ -425,69 +425,49 @@ workflow commands. For more information, see [Third-Party Plugin Commands](/docs -## EthPM configuration +## ethpm configuration This configuration applies to the optional `ethpm.json` file that exists alongside your `truffle.js` configuration file. -### package_name +### name -Name of the package you're publishing. Your package name must be unique to the EthPM registry. - -Example: -```javascript -package_name: "adder" -``` +(required) Name of the package you're publishing. Your package name must be unique to the ethpm registry. ### version -Version of this package, using the [semver](http://semver.org/) specification. - -Example: -```javascript -version: "0.0.3" -``` - -### description - -A text description of your package for human readers. - -Example: -```javascript -description: "Simple contract to add two numbers" -``` - -### authors - -An array of authors. Can have any format, but we recommend the format below. - -Example: -```javascript -authors: [ - "Tim Coulter " -] -``` - -### keywords +(required) Version of this package. It's recommended to use the [semver](http://semver.org/) specification. -An array of keywords that tag this package with helpful categories. +### meta -Example: -```javascript -keywords: [ - "ethereum", - "addition" -], -``` - -### dependencies +Metadata about the package. -A list of EthPM packages your package depends on, using [semver](http://semver.org/) version ranges, like npm. +- `description`: A text description of your package for human readers. +- `authors`: An array of authors. +- `keywords`: An array of keywords that tag this package with helpful categories. +- `license`: License to use for this package. Strictly informative. +- `links`: Useful links related to the packages. Recommended fields include: `website`, `documentation` and `repository`. Example: -```javascript -dependencies: { - "owned": "^0.0.1", - "erc20-token": "1.0.0" +```json +{ + "name": "adder", + "version": "0.0.3", + "meta": { + "description": "Simple contract to add two numbers", + "authors": [ + "Tim Coulter " + ], + "keywords": [ + "ethereum", + "addition" + ], + "license": "MIT", + "links": { + "website": "www.adderproject.com", + "documentation": "www.readthedocs.com/adder", + "repository": "www.github.com/adderproject/adder" + } + } } ``` diff --git a/src/docs/truffle/reference/truffle-commands.md b/src/docs/truffle/reference/truffle-commands.md index b6b5a460f..4983979ed 100644 --- a/src/docs/truffle/reference/truffle-commands.md +++ b/src/docs/truffle/reference/truffle-commands.md @@ -216,7 +216,7 @@ Options: * ``: Name of the package as listed in the Ethereum Package Registry. (required) * `@`: When specified, will install a specific version of the package, otherwise will install the latest version. -See the [Package Management with EthPM](/docs/getting_started/packages-ethpm) section for more details. +See the [Package Management with ethpm](/docs/getting_started/packages-ethpm) section for more details. ### migrate @@ -291,7 +291,7 @@ Publish a package to the Ethereum Package Registry. truffle publish ``` -All parameters are pulled from your project's configuration file. Takes no arguments. See the [Package Management with EthPM](/docs/getting_started/packages-ethpm) section for more details. +All parameters are pulled from your project's configuration file. Takes no arguments. See the [Package Management with ethpm](/docs/getting_started/packages-ethpm) section for more details. ### run diff --git a/src/img/blog/using-ethpm-and-truffle/blog-header.png b/src/img/blog/using-ethpm-and-truffle/blog-header.png new file mode 100644 index 000000000..dfcb713ab Binary files /dev/null and b/src/img/blog/using-ethpm-and-truffle/blog-header.png differ diff --git a/src/img/blog/using-ethpm-and-truffle/blog-thumbnail.png b/src/img/blog/using-ethpm-and-truffle/blog-thumbnail.png new file mode 100644 index 000000000..74e9d2d93 Binary files /dev/null and b/src/img/blog/using-ethpm-and-truffle/blog-thumbnail.png differ diff --git a/src/js/search.js b/src/js/search.js index b28355743..73667939e 100644 --- a/src/js/search.js +++ b/src/js/search.js @@ -13,7 +13,7 @@ jQuery(function($) { "Compiling Contracts", "Running Migrations", "Interacting with Your Contracts", - "Package Management via EthPM", + "Package Management via ethpm", "Package Management via NPM", "Debugging Your Contracts", "Using Truffle Develop and The Console", @@ -97,4 +97,4 @@ jQuery(function($) { var results = idx.search("migration"); // Get lunr to perform a search console.log(results); }); -}); \ No newline at end of file +}) \ No newline at end of file