Skip to content

Commit

Permalink
chore: use hardhat-secure-accounts for non local chains
Browse files Browse the repository at this point in the history
Signed-off-by: Tomás Migone <[email protected]>
  • Loading branch information
tmigone committed Nov 15, 2024
1 parent a256d74 commit 9ae3410
Show file tree
Hide file tree
Showing 63 changed files with 281,722 additions and 3 deletions.
10 changes: 7 additions & 3 deletions packages/horizon/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import '@nomicfoundation/hardhat-toolbox'
import '@nomicfoundation/hardhat-ignition-ethers'
import 'hardhat-storage-layout'
import 'hardhat-contract-sizer'
import 'hardhat-secure-accounts'

import { HardhatUserConfig } from 'hardhat/config'

Expand All @@ -20,17 +21,20 @@ const config: HardhatUserConfig = {
artifacts: './build/contracts',
sources: './contracts',
},
secureAccounts: {
enabled: true,
},
networks: {
hardhat: {
secureAccounts: {
enabled: false,
},
accounts: {
mnemonic: 'myth like bonus scare over problem client lizard pioneer submit female collect',
},
},
arbitrumSepolia: {
url: 'https://sepolia-rollup.arbitrum.io/rpc',
accounts: {
mnemonic: process.env.MNEMONIC ?? '',
},
},
},
etherscan: {
Expand Down
1 change: 1 addition & 0 deletions packages/horizon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"hardhat": "^2.20.1",
"hardhat-contract-sizer": "^2.10.0",
"hardhat-gas-reporter": "^1.0.8",
"hardhat-secure-accounts": "^1.0.4",
"hardhat-storage-layout": "^0.1.7",
"lint-staged": "^15.2.2",
"prettier": "^3.2.5",
Expand Down
17 changes: 17 additions & 0 deletions packages/subgraph-service/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import '@nomicfoundation/hardhat-ignition-ethers'
import '@nomicfoundation/hardhat-toolbox'
import 'hardhat-contract-sizer'
import 'hardhat-storage-layout'
import 'hardhat-secure-accounts'
import 'solidity-docgen'

import { HardhatUserConfig } from 'hardhat/config'
Expand All @@ -21,6 +22,22 @@ const config: HardhatUserConfig = {
artifacts: './build/contracts',
sources: './contracts',
},
secureAccounts: {
enabled: true,
},
networks: {
hardhat: {
secureAccounts: {
enabled: false,
},
accounts: {
mnemonic: 'myth like bonus scare over problem client lizard pioneer submit female collect',
},
},
arbitrumSepolia: {
url: 'https://sepolia-rollup.arbitrum.io/rpc',
},
},
}

export default config

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
{
"_format": "hh-sol-artifact-1",
"contractName": "GraphProxy",
"sourceName": "contracts/upgrades/GraphProxy.sol",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_impl",
"type": "address"
},
{
"internalType": "address",
"name": "_admin",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "oldAdmin",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newAdmin",
"type": "address"
}
],
"name": "AdminUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "oldImplementation",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newImplementation",
"type": "address"
}
],
"name": "ImplementationUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "oldPendingImplementation",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newPendingImplementation",
"type": "address"
}
],
"name": "PendingImplementationUpdated",
"type": "event"
},
{
"stateMutability": "payable",
"type": "fallback"
},
{
"inputs": [],
"name": "acceptUpgrade",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes",
"name": "data",
"type": "bytes"
}
],
"name": "acceptUpgradeAndCall",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "admin",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "implementation",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "pendingImplementation",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_newAdmin",
"type": "address"
}
],
"name": "setAdmin",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_newImplementation",
"type": "address"
}
],
"name": "upgradeTo",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"stateMutability": "payable",
"type": "receive"
}
],
"bytecode": "0x608060405234801561001057600080fd5b50604051610a12380380610a128339818101604052604081101561003357600080fd5b50805160209091015161004581610055565b61004e826100b3565b5050610137565b600061005f610111565b6000805160206109d2833981519152838155604051919250906001600160a01b0380851691908416907f101b8081ff3b56bbf45deb824d86a3b0fd38b7e3dd42421105cf8abe9106db0b90600090a3505050565b60006100bd610124565b6000805160206109f2833981519152838155604051919250906001600160a01b0380851691908416907f980c0d30fe97457c47903527d88b7009a1643be6de24d2af664214919f0540a190600090a3505050565b6000805160206109d28339815191525490565b6000805160206109f28339815191525490565b61088c806101466000396000f3fe6080604052600436106100745760003560e01c80635c60da1b1161004e5780635c60da1b14610104578063623faf6114610119578063704b6c0214610196578063f851a440146101c957610083565b80633659cfe61461008b578063396f7b23146100be57806359fc20bb146100ef57610083565b36610083576100816101de565b005b6100816101de565b34801561009757600080fd5b50610081600480360360208110156100ae57600080fd5b50356001600160a01b031661029e565b3480156100ca57600080fd5b506100d36102d8565b604080516001600160a01b039092168252519081900360200190f35b3480156100fb57600080fd5b50610081610338565b34801561011057600080fd5b506100d3610393565b34801561012557600080fd5b506100816004803603602081101561013c57600080fd5b81019060208101813564010000000081111561015757600080fd5b82018360208201111561016957600080fd5b8035906020019184600183028401116401000000008311171561018b57600080fd5b5090925090506103e1565b3480156101a257600080fd5b50610081600480360360208110156101b957600080fd5b50356001600160a01b03166104f1565b3480156101d557600080fd5b506100d3610576565b6101e66105c0565b6001600160a01b0316336001600160a01b0316141561024c576040805162461bcd60e51b815260206004820152601f60248201527f43616e6e6f742066616c6c6261636b20746f2070726f78792074617267657400604482015290519081900360640190fd5b6040516001600160a01b037f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc541636600083376000803684845af490503d806000843e81801561029a578184f35b8184fd5b6102a66105c0565b6001600160a01b0316336001600160a01b031614156102cd576102c8816105e5565b6102d5565b6102d56101de565b50565b60006102e26105c0565b6001600160a01b0316336001600160a01b031614806103195750610304610655565b6001600160a01b0316336001600160a01b0316145b1561032d57610326610655565b9050610335565b6103356101de565b90565b6103406105c0565b6001600160a01b0316336001600160a01b031614806103775750610362610655565b6001600160a01b0316336001600160a01b0316145b156103895761038461067a565b610391565b6103916101de565b565b600061039d6105c0565b6001600160a01b0316336001600160a01b031614806103d457506103bf610655565b6001600160a01b0316336001600160a01b0316145b1561032d57610326610751565b6103e96105c0565b6001600160a01b0316336001600160a01b03161480610420575061040b610655565b6001600160a01b0316336001600160a01b0316145b156104e55761042d61067a565b6000610437610751565b6001600160a01b031683836040518083838082843760405192019450600093509091505080830381855af49150503d8060008114610491576040519150601f19603f3d011682016040523d82523d6000602084013e610496565b606091505b50509050806104df576040805162461bcd60e51b815260206004820152601060248201526f125b5c1b0818d85b1b0819985a5b195960821b604482015290519081900360640190fd5b506104ed565b6104ed6101de565b5050565b6104f96105c0565b6001600160a01b0316336001600160a01b031614156102cd576001600160a01b03811661056d576040805162461bcd60e51b815260206004820152601e60248201527f41646d696e2063616e7420626520746865207a65726f20616464726573730000604482015290519081900360640190fd5b6102c881610776565b60006105806105c0565b6001600160a01b0316336001600160a01b031614806105b757506105a2610655565b6001600160a01b0316336001600160a01b0316145b1561032d576103265b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b60006105ef610655565b7f9e5eddc59e0b171f57125ab86bee043d9128098c3a6b9adb4f2e86333c2f6f8c838155604051919250906001600160a01b0380851691908416907f980c0d30fe97457c47903527d88b7009a1643be6de24d2af664214919f0540a190600090a3505050565b7f9e5eddc59e0b171f57125ab86bee043d9128098c3a6b9adb4f2e86333c2f6f8c5490565b6000610684610655565b90506001600160a01b0381166106e1576040805162461bcd60e51b815260206004820152601b60248201527f496d706c2063616e6e6f74206265207a65726f20616464726573730000000000604482015290519081900360640190fd5b336001600160a01b0382161461073e576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c792070656e64696e6720696d706c656d656e746174696f6e0000000000604482015290519081900360640190fd5b610747816107e6565b6102d560006105e5565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b60006107806105c0565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103838155604051919250906001600160a01b0380851691908416907f101b8081ff3b56bbf45deb824d86a3b0fd38b7e3dd42421105cf8abe9106db0b90600090a3505050565b60006107f0610751565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc838155604051919250906001600160a01b0380851691908416907faa3f731066a578e5f39b4215468d826cdd15373cbc0dfc9cb9bdc649718ef7da90600090a350505056fea264697066735822122041ce882775d17ef838c17f08249aa48a5f3ea1c65b581e69896452640b274de264736f6c63430007060033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61039e5eddc59e0b171f57125ab86bee043d9128098c3a6b9adb4f2e86333c2f6f8c",
"deployedBytecode": "0x6080604052600436106100745760003560e01c80635c60da1b1161004e5780635c60da1b14610104578063623faf6114610119578063704b6c0214610196578063f851a440146101c957610083565b80633659cfe61461008b578063396f7b23146100be57806359fc20bb146100ef57610083565b36610083576100816101de565b005b6100816101de565b34801561009757600080fd5b50610081600480360360208110156100ae57600080fd5b50356001600160a01b031661029e565b3480156100ca57600080fd5b506100d36102d8565b604080516001600160a01b039092168252519081900360200190f35b3480156100fb57600080fd5b50610081610338565b34801561011057600080fd5b506100d3610393565b34801561012557600080fd5b506100816004803603602081101561013c57600080fd5b81019060208101813564010000000081111561015757600080fd5b82018360208201111561016957600080fd5b8035906020019184600183028401116401000000008311171561018b57600080fd5b5090925090506103e1565b3480156101a257600080fd5b50610081600480360360208110156101b957600080fd5b50356001600160a01b03166104f1565b3480156101d557600080fd5b506100d3610576565b6101e66105c0565b6001600160a01b0316336001600160a01b0316141561024c576040805162461bcd60e51b815260206004820152601f60248201527f43616e6e6f742066616c6c6261636b20746f2070726f78792074617267657400604482015290519081900360640190fd5b6040516001600160a01b037f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc541636600083376000803684845af490503d806000843e81801561029a578184f35b8184fd5b6102a66105c0565b6001600160a01b0316336001600160a01b031614156102cd576102c8816105e5565b6102d5565b6102d56101de565b50565b60006102e26105c0565b6001600160a01b0316336001600160a01b031614806103195750610304610655565b6001600160a01b0316336001600160a01b0316145b1561032d57610326610655565b9050610335565b6103356101de565b90565b6103406105c0565b6001600160a01b0316336001600160a01b031614806103775750610362610655565b6001600160a01b0316336001600160a01b0316145b156103895761038461067a565b610391565b6103916101de565b565b600061039d6105c0565b6001600160a01b0316336001600160a01b031614806103d457506103bf610655565b6001600160a01b0316336001600160a01b0316145b1561032d57610326610751565b6103e96105c0565b6001600160a01b0316336001600160a01b03161480610420575061040b610655565b6001600160a01b0316336001600160a01b0316145b156104e55761042d61067a565b6000610437610751565b6001600160a01b031683836040518083838082843760405192019450600093509091505080830381855af49150503d8060008114610491576040519150601f19603f3d011682016040523d82523d6000602084013e610496565b606091505b50509050806104df576040805162461bcd60e51b815260206004820152601060248201526f125b5c1b0818d85b1b0819985a5b195960821b604482015290519081900360640190fd5b506104ed565b6104ed6101de565b5050565b6104f96105c0565b6001600160a01b0316336001600160a01b031614156102cd576001600160a01b03811661056d576040805162461bcd60e51b815260206004820152601e60248201527f41646d696e2063616e7420626520746865207a65726f20616464726573730000604482015290519081900360640190fd5b6102c881610776565b60006105806105c0565b6001600160a01b0316336001600160a01b031614806105b757506105a2610655565b6001600160a01b0316336001600160a01b0316145b1561032d576103265b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b60006105ef610655565b7f9e5eddc59e0b171f57125ab86bee043d9128098c3a6b9adb4f2e86333c2f6f8c838155604051919250906001600160a01b0380851691908416907f980c0d30fe97457c47903527d88b7009a1643be6de24d2af664214919f0540a190600090a3505050565b7f9e5eddc59e0b171f57125ab86bee043d9128098c3a6b9adb4f2e86333c2f6f8c5490565b6000610684610655565b90506001600160a01b0381166106e1576040805162461bcd60e51b815260206004820152601b60248201527f496d706c2063616e6e6f74206265207a65726f20616464726573730000000000604482015290519081900360640190fd5b336001600160a01b0382161461073e576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c792070656e64696e6720696d706c656d656e746174696f6e0000000000604482015290519081900360640190fd5b610747816107e6565b6102d560006105e5565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b60006107806105c0565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103838155604051919250906001600160a01b0380851691908416907f101b8081ff3b56bbf45deb824d86a3b0fd38b7e3dd42421105cf8abe9106db0b90600090a3505050565b60006107f0610751565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc838155604051919250906001600160a01b0380851691908416907faa3f731066a578e5f39b4215468d826cdd15373cbc0dfc9cb9bdc649718ef7da90600090a350505056fea264697066735822122041ce882775d17ef838c17f08249aa48a5f3ea1c65b581e69896452640b274de264736f6c63430007060033",
"linkReferences": {},
"deployedLinkReferences": {}
}
Loading

0 comments on commit 9ae3410

Please sign in to comment.