-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adds all test networks to oz config contains a deployed instance definition of an ADI token ADI token has a greeting now rebased / readme drops npm lock ignore all secrets
- Loading branch information
1 parent
33cad50
commit 22ec343
Showing
9 changed files
with
1,902 additions
and
28,364 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,4 +22,5 @@ sketch | |
.openzeppelin/.session | ||
|
||
.openzeppelin/dev-* | ||
build | ||
build | ||
.secrets*.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,324 @@ | ||
{ | ||
"contracts": { | ||
"ADIToken": { | ||
"address": "0x06FF75044aEcA980651ba782AE11C9FE20401102", | ||
"constructorCode": "608060405234801561001057600080fd5b506133b6806100206000396000f3fe", | ||
"bodyBytecodeHash": "be522ef7cfa493aaea5bd2a4ae2be57e96102f42d0ebe610a0928e8855ccea98", | ||
"localBytecodeHash": "ccbed0d725e7c1e82c9019dcacab9baf950874081d636a8fe6f7af46a7ffc485", | ||
"deployedBytecodeHash": "ccbed0d725e7c1e82c9019dcacab9baf950874081d636a8fe6f7af46a7ffc485", | ||
"types": { | ||
"t_bool": { | ||
"id": "t_bool", | ||
"kind": "elementary", | ||
"label": "bool" | ||
}, | ||
"t_uint256": { | ||
"id": "t_uint256", | ||
"kind": "elementary", | ||
"label": "uint256" | ||
}, | ||
"t_array:50<t_uint256>": { | ||
"id": "t_array:50<t_uint256>", | ||
"valueType": "t_uint256", | ||
"length": "50", | ||
"kind": "array", | ||
"label": "uint256[50]" | ||
}, | ||
"t_struct<AccessControlUpgradeSafe.RoleData>": { | ||
"id": "t_struct<AccessControlUpgradeSafe.RoleData>", | ||
"kind": "struct", | ||
"label": "AccessControlUpgradeSafe.RoleData", | ||
"members": [ | ||
{ | ||
"label": "members", | ||
"astId": 154, | ||
"type": "t_struct<EnumerableSet.AddressSet>", | ||
"src": "1655:32:2" | ||
}, | ||
{ | ||
"label": "adminRole", | ||
"astId": 156, | ||
"type": "t_bytes32", | ||
"src": "1697:17:2" | ||
} | ||
] | ||
}, | ||
"t_struct<EnumerableSet.AddressSet>": { | ||
"id": "t_struct<EnumerableSet.AddressSet>", | ||
"kind": "struct", | ||
"label": "EnumerableSet.AddressSet", | ||
"members": [ | ||
{ | ||
"label": "_inner", | ||
"astId": 1804, | ||
"type": "t_struct<EnumerableSet.Set>", | ||
"src": "4644:10:10" | ||
} | ||
] | ||
}, | ||
"t_struct<EnumerableSet.Set>": { | ||
"id": "t_struct<EnumerableSet.Set>", | ||
"kind": "struct", | ||
"label": "EnumerableSet.Set", | ||
"members": [ | ||
{ | ||
"label": "_values", | ||
"astId": 1620, | ||
"type": "t_array:dyn<t_bytes32>", | ||
"src": "1213:17:10" | ||
}, | ||
{ | ||
"label": "_indexes", | ||
"astId": 1624, | ||
"type": "t_mapping<t_uint256>", | ||
"src": "1364:37:10" | ||
} | ||
] | ||
}, | ||
"t_bytes32": { | ||
"id": "t_bytes32", | ||
"kind": "elementary", | ||
"label": "bytes32" | ||
}, | ||
"t_array:dyn<t_bytes32>": { | ||
"id": "t_array:dyn<t_bytes32>", | ||
"valueType": "t_bytes32", | ||
"length": "dyn", | ||
"kind": "array", | ||
"label": "bytes32[]" | ||
}, | ||
"t_mapping<t_uint256>": { | ||
"id": "t_mapping<t_uint256>", | ||
"valueType": "t_uint256", | ||
"label": "mapping(key => uint256)", | ||
"kind": "mapping" | ||
}, | ||
"t_mapping<t_struct<AccessControlUpgradeSafe.RoleData>>": { | ||
"id": "t_mapping<t_struct<AccessControlUpgradeSafe.RoleData>>", | ||
"valueType": "t_struct<AccessControlUpgradeSafe.RoleData>", | ||
"label": "mapping(key => AccessControlUpgradeSafe.RoleData)", | ||
"kind": "mapping" | ||
}, | ||
"t_array:49<t_uint256>": { | ||
"id": "t_array:49<t_uint256>", | ||
"valueType": "t_uint256", | ||
"length": "49", | ||
"kind": "array", | ||
"label": "uint256[49]" | ||
}, | ||
"t_string": { | ||
"id": "t_string", | ||
"kind": "elementary", | ||
"label": "string" | ||
}, | ||
"t_uint8": { | ||
"id": "t_uint8", | ||
"kind": "elementary", | ||
"label": "uint8" | ||
}, | ||
"t_array:44<t_uint256>": { | ||
"id": "t_array:44<t_uint256>", | ||
"valueType": "t_uint256", | ||
"length": "44", | ||
"kind": "array", | ||
"label": "uint256[44]" | ||
} | ||
}, | ||
"storage": [ | ||
{ | ||
"contract": "Initializable", | ||
"path": "@openzeppelin/contracts-ethereum-package/contracts/Initializable.sol", | ||
"label": "initialized", | ||
"astId": 49, | ||
"type": "t_bool", | ||
"src": "757:24:1" | ||
}, | ||
{ | ||
"contract": "Initializable", | ||
"path": "@openzeppelin/contracts-ethereum-package/contracts/Initializable.sol", | ||
"label": "initializing", | ||
"astId": 51, | ||
"type": "t_bool", | ||
"src": "876:25:1" | ||
}, | ||
{ | ||
"contract": "Initializable", | ||
"path": "@openzeppelin/contracts-ethereum-package/contracts/Initializable.sol", | ||
"label": "______gap", | ||
"astId": 116, | ||
"type": "t_array:50<t_uint256>", | ||
"src": "1982:29:1" | ||
}, | ||
{ | ||
"contract": "ContextUpgradeSafe", | ||
"path": "@openzeppelin/contracts-ethereum-package/contracts/GSN/Context.sol", | ||
"label": "__gap", | ||
"astId": 43, | ||
"type": "t_array:50<t_uint256>", | ||
"src": "1277:25:0" | ||
}, | ||
{ | ||
"contract": "AccessControlUpgradeSafe", | ||
"path": "@openzeppelin/contracts-ethereum-package/contracts/access/AccessControl.sol", | ||
"label": "_roles", | ||
"astId": 161, | ||
"type": "t_mapping<t_struct<AccessControlUpgradeSafe.RoleData>>", | ||
"src": "1727:44:2" | ||
}, | ||
{ | ||
"contract": "AccessControlUpgradeSafe", | ||
"path": "@openzeppelin/contracts-ethereum-package/contracts/access/AccessControl.sol", | ||
"label": "__gap", | ||
"astId": 406, | ||
"type": "t_array:49<t_uint256>", | ||
"src": "6927:25:2" | ||
}, | ||
{ | ||
"contract": "ERC20UpgradeSafe", | ||
"path": "@openzeppelin/contracts-ethereum-package/contracts/token/ERC20/ERC20.sol", | ||
"label": "_balances", | ||
"astId": 816, | ||
"type": "t_mapping<t_uint256>", | ||
"src": "1481:46:5" | ||
}, | ||
{ | ||
"contract": "ERC20UpgradeSafe", | ||
"path": "@openzeppelin/contracts-ethereum-package/contracts/token/ERC20/ERC20.sol", | ||
"label": "_allowances", | ||
"astId": 822, | ||
"type": "t_mapping<t_uint256>", | ||
"src": "1534:69:5" | ||
}, | ||
{ | ||
"contract": "ERC20UpgradeSafe", | ||
"path": "@openzeppelin/contracts-ethereum-package/contracts/token/ERC20/ERC20.sol", | ||
"label": "_totalSupply", | ||
"astId": 824, | ||
"type": "t_uint256", | ||
"src": "1610:28:5" | ||
}, | ||
{ | ||
"contract": "ERC20UpgradeSafe", | ||
"path": "@openzeppelin/contracts-ethereum-package/contracts/token/ERC20/ERC20.sol", | ||
"label": "_name", | ||
"astId": 826, | ||
"type": "t_string", | ||
"src": "1645:20:5" | ||
}, | ||
{ | ||
"contract": "ERC20UpgradeSafe", | ||
"path": "@openzeppelin/contracts-ethereum-package/contracts/token/ERC20/ERC20.sol", | ||
"label": "_symbol", | ||
"astId": 828, | ||
"type": "t_string", | ||
"src": "1671:22:5" | ||
}, | ||
{ | ||
"contract": "ERC20UpgradeSafe", | ||
"path": "@openzeppelin/contracts-ethereum-package/contracts/token/ERC20/ERC20.sol", | ||
"label": "_decimals", | ||
"astId": 830, | ||
"type": "t_uint8", | ||
"src": "1699:23:5" | ||
}, | ||
{ | ||
"contract": "ERC20UpgradeSafe", | ||
"path": "@openzeppelin/contracts-ethereum-package/contracts/token/ERC20/ERC20.sol", | ||
"label": "__gap", | ||
"astId": 1325, | ||
"type": "t_array:44<t_uint256>", | ||
"src": "11045:25:5" | ||
}, | ||
{ | ||
"contract": "ERC20BurnableUpgradeSafe", | ||
"path": "@openzeppelin/contracts-ethereum-package/contracts/token/ERC20/ERC20Burnable.sol", | ||
"label": "__gap", | ||
"astId": 1406, | ||
"type": "t_array:50<t_uint256>", | ||
"src": "1443:25:6" | ||
}, | ||
{ | ||
"contract": "PausableUpgradeSafe", | ||
"path": "@openzeppelin/contracts-ethereum-package/contracts/utils/Pausable.sol", | ||
"label": "_paused", | ||
"astId": 2030, | ||
"type": "t_bool", | ||
"src": "825:20:11" | ||
}, | ||
{ | ||
"contract": "PausableUpgradeSafe", | ||
"path": "@openzeppelin/contracts-ethereum-package/contracts/utils/Pausable.sol", | ||
"label": "__gap", | ||
"astId": 2119, | ||
"type": "t_array:49<t_uint256>", | ||
"src": "2073:25:11" | ||
}, | ||
{ | ||
"contract": "ERC20PausableUpgradeSafe", | ||
"path": "@openzeppelin/contracts-ethereum-package/contracts/token/ERC20/ERC20Pausable.sol", | ||
"label": "__gap", | ||
"astId": 1471, | ||
"type": "t_array:50<t_uint256>", | ||
"src": "1130:25:7" | ||
}, | ||
{ | ||
"contract": "ERC20PresetMinterPauserUpgradeSafe", | ||
"path": "@openzeppelin/contracts-ethereum-package/contracts/presets/ERC20PresetMinterPauser.sol", | ||
"label": "__gap", | ||
"astId": 791, | ||
"type": "t_array:50<t_uint256>", | ||
"src": "3454:25:4" | ||
} | ||
], | ||
"warnings": { | ||
"hasConstructor": false, | ||
"hasSelfDestruct": false, | ||
"hasDelegateCall": false, | ||
"hasInitialValuesInDeclarations": false, | ||
"uninitializedBaseContracts": [], | ||
"storageUncheckedVars": [ | ||
{ | ||
"contract": "AccessControlUpgradeSafe", | ||
"path": "@openzeppelin/contracts-ethereum-package/contracts/access/AccessControl.sol", | ||
"label": "_roles", | ||
"astId": 161, | ||
"type": "t_mapping<t_struct<AccessControlUpgradeSafe.RoleData>>", | ||
"src": "1727:44:2" | ||
} | ||
], | ||
"storageDiff": [] | ||
} | ||
} | ||
}, | ||
"solidityLibs": {}, | ||
"proxies": { | ||
"ledger-academy/ADIToken": [ | ||
{ | ||
"address": "0x7c9BeD2220B6A7545d31ad8911BAeB7003483337", | ||
"version": "1.0.0", | ||
"implementation": "0x06FF75044aEcA980651ba782AE11C9FE20401102", | ||
"admin": "0x5c19BF66CC2c9386Cdf06d346F32F140A4559be9", | ||
"kind": "Upgradeable" | ||
}, | ||
{ | ||
"address": "0x45EE3015E650074dAdA9c5390eBc7500601eF9c3", | ||
"version": "1.0.0", | ||
"implementation": "0x06FF75044aEcA980651ba782AE11C9FE20401102", | ||
"admin": "0x5c19BF66CC2c9386Cdf06d346F32F140A4559be9", | ||
"kind": "Upgradeable" | ||
} | ||
] | ||
}, | ||
"manifestVersion": "2.2", | ||
"dependencies": { | ||
"@openzeppelin/contracts-ethereum-package": { | ||
"package": "0xCE3FB0777BABB88289088dfad6e82bF4eF74d7e8", | ||
"version": "3.0.0", | ||
"customDeploy": true | ||
} | ||
}, | ||
"version": "1.0.0", | ||
"proxyAdmin": { | ||
"address": "0x5c19BF66CC2c9386Cdf06d346F32F140A4559be9" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# The Ledger academy | ||
|
||
## Deploy your contracts... | ||
|
||
`yarn` | ||
create a mnemonic for you (npx mnemonic) | ||
add a `.secrets.json`: | ||
|
||
``` | ||
{ | ||
"mnemonic": "choose your words wisely ...", | ||
"projectId": "YOUR_INFURA_POJECT_KEY" | ||
} | ||
``` | ||
|
||
then fund your 1st account with ether. | ||
https://goerli-faucet.slock.it/ | ||
https://faucet.rinkeby.io/ | ||
https://faucet.ropsten.be/ | ||
|
||
and send some test ether to your metamask instance on the same network | ||
|
||
then | ||
|
||
`npx oz deploy` take down its address, add it to your `.secrets.json` as `contractAddress`: | ||
|
||
``` | ||
{ | ||
..., | ||
"contractAddress": "0x7c9BeD2220B6A7545d31ad8911BAeB7003483337" | ||
} | ||
``` | ||
|
||
after contract has been compiled copy / link the compiled json definition into the src folder: | ||
|
||
``` | ||
ln -s build/contracts/ADIToken.json src/contracts | ||
``` | ||
|
||
now you can read its ABI from Javascript | ||
|
||
## live instances: | ||
|
||
goerli: 0x7c9BeD2220B6A7545d31ad8911BAeB7003483337 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.