Add import statements and GitHub link in API docs (#2714)

This commit is contained in:
Francisco Giordano
2021-06-11 15:09:32 -03:00
committed by GitHub
parent 9d5f77db9d
commit 75f6dbb86c
5 changed files with 20 additions and 2 deletions

10
docs/helpers.js Normal file
View File

@ -0,0 +1,10 @@
const { version } = require('../package.json');
module.exports = {
'github-link': (contractPath) => {
if (typeof contractPath !== 'string') {
throw new Error('Missing argument');
}
return `https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v${version}/contracts/${contractPath}`;
},
};