From 3658e1de81324c773117a4b5e39ba939b5816091 Mon Sep 17 00:00:00 2001 From: Andrew B Coathup <28278242+abcoathup@users.noreply.github.com> Date: Wed, 26 Feb 2020 12:19:05 +1100 Subject: [PATCH 1/2] Update import.md GitHub import Update GitHub import instructions to use a release tag where available and change the example of importing from OpenZeppelin Contracts to use an official release rather than the master branch. --- docs/import.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/import.md b/docs/import.md index 2eac9141db..528a1982bd 100644 --- a/docs/import.md +++ b/docs/import.md @@ -30,12 +30,12 @@ This method uses **remixd** - the remix daemon. Please go to the [remixd tutori Importing from GitHub --------------------- -It is possible to import files directly from GitHub. +It is possible to import files directly from GitHub. You should specify the release tag (where available), otherwise you will get the latest code in the master branch. For OpenZeppelin Contracts you should only use code published in an official release, the example below imports from OpenZeppelin Contracts v2.5.0. ``` pragma solidity >=0.4.22 <0.6.0; -import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/SafeMath.sol"; +import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v2.5.0/contracts/math/SafeMath.sol"; ``` From 09e3373f1f8e2d2446144b00f0151efc15269539 Mon Sep 17 00:00:00 2001 From: Andrew B Coathup <28278242+abcoathup@users.noreply.github.com> Date: Wed, 26 Feb 2020 12:29:06 +1100 Subject: [PATCH 2/2] Update import.md console instructions Update console import instructions to use a release tag where available and change the example of importing from OpenZeppelin Contracts to use an official release rather than the master branch. --- docs/import.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/import.md b/docs/import.md index 528a1982bd..333a710185 100644 --- a/docs/import.md +++ b/docs/import.md @@ -61,10 +61,10 @@ import 'ipfs://Qmdyq9ZmWcaryd1mgGZ4PttRNctLGUSAMpPqufsk6uRMKh'; Importing from the console -------------------------- -You can also use a remix command remix.loadurl('')in the console: +You can also use a remix command remix.loadurl('')in the console. You should specify the release tag (where available), otherwise you will get the latest code in the master branch. For OpenZeppelin Contracts you should only use code published in an official release, the example below imports from OpenZeppelin Contracts v2.5.0. ``` -remix.loadurl('https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/SafeMath.sol') +remix.loadurl('https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v2.5.0/contracts/math/SafeMath.sol') ``` Notice that this will create a `github` folder in the file explorer. To load a file in the `github` folder, you would use a command like this: