Skip to content

Commit

Permalink
feat: add sepolia support to truffle (#32)
Browse files Browse the repository at this point in the history
* feat: add sepolia support to truffle

* feat: sepolia deployment
  • Loading branch information
strumswell authored Dec 13, 2023
1 parent b92e8f4 commit de45ba2
Show file tree
Hide file tree
Showing 5 changed files with 228 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
node-version: 16
- run: npm ci
- run: npm run build
- run: npm run migrate-goerli
- run: npm run migrate-sepolia
env:
INFURA_PROJECT_ID: ${{secrets.INFURA_PROJECT_ID}}
REGISTRY_WALLET_PRIVATE_KEY: ${{secrets.REGISTRY_WALLET_PRIVATE_KEY}}
Expand Down
209 changes: 209 additions & 0 deletions .openzeppelin/sepolia.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,209 @@
{
"manifestVersion": "3.2",
"proxies": [
{
"address": "0x8FBFDDEbE25a12D873E6782BbE30f1Bc326A6E1C",
"txHash": "0x13e88a72d755f2b3e80c39548a8d03dc382f016fe1a2ffb39c0078c030533f1f",
"kind": "uups"
}
],
"impls": {
"0e7772148d51fefcdf8c12a18d0ecb6d64bdee43cafaa75656161389d0f9933a": {
"address": "0xeDde4673B0DAa8C01a3E771DE929264dE2560608",
"txHash": "0xd29bc029a44aa2407eddf9051526e72391cf79e9af8215a2847e7a3ed23f3b0c",
"layout": {
"solcVersion": "0.8.16",
"storage": [
{
"contract": "Initializable",
"label": "_initialized",
"type": "t_uint8",
"src": "../@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63",
"retypedFrom": "bool"
},
{
"contract": "Initializable",
"label": "_initializing",
"type": "t_bool",
"src": "../@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68"
},
{
"contract": "EIP712Upgradeable",
"label": "_hashedName",
"type": "t_bytes32",
"src": "../@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol:40",
"renamedFrom": "_HASHED_NAME"
},
{
"contract": "EIP712Upgradeable",
"label": "_hashedVersion",
"type": "t_bytes32",
"src": "../@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol:42",
"renamedFrom": "_HASHED_VERSION"
},
{
"contract": "EIP712Upgradeable",
"label": "_name",
"type": "t_string_storage",
"src": "../@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol:44"
},
{
"contract": "EIP712Upgradeable",
"label": "_version",
"type": "t_string_storage",
"src": "../@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol:45"
},
{
"contract": "EIP712Upgradeable",
"label": "__gap",
"type": "t_array(t_uint256)48_storage",
"src": "../@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol:204"
},
{
"contract": "ContextUpgradeable",
"label": "__gap",
"type": "t_array(t_uint256)50_storage",
"src": "../@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36"
},
{
"contract": "PausableUpgradeable",
"label": "_paused",
"type": "t_bool",
"src": "../@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29"
},
{
"contract": "PausableUpgradeable",
"label": "__gap",
"type": "t_array(t_uint256)49_storage",
"src": "../@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116"
},
{
"contract": "OwnableUpgradeable",
"label": "_owner",
"type": "t_address",
"src": "../@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22"
},
{
"contract": "OwnableUpgradeable",
"label": "__gap",
"type": "t_array(t_uint256)49_storage",
"src": "../@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94"
},
{
"contract": "ERC1967UpgradeUpgradeable",
"label": "__gap",
"type": "t_array(t_uint256)50_storage",
"src": "../@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:169"
},
{
"contract": "UUPSUpgradeable",
"label": "__gap",
"type": "t_array(t_uint256)50_storage",
"src": "../@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:111"
},
{
"contract": "RevocationRegistry",
"label": "registry",
"type": "t_mapping(t_address,t_mapping(t_bytes32,t_mapping(t_bytes32,t_bool)))",
"src": "../project:/contracts/RevocationRegistry.sol:13"
},
{
"contract": "RevocationRegistry",
"label": "newOwners",
"type": "t_mapping(t_bytes32,t_address)",
"src": "../project:/contracts/RevocationRegistry.sol:18"
},
{
"contract": "RevocationRegistry",
"label": "delegates",
"type": "t_mapping(t_bytes32,t_mapping(t_address,t_uint256))",
"src": "../project:/contracts/RevocationRegistry.sol:23"
},
{
"contract": "RevocationRegistry",
"label": "nonces",
"type": "t_mapping(t_address,t_uint256)",
"src": "../project:/contracts/RevocationRegistry.sol:26"
},
{
"contract": "RevocationRegistry",
"label": "revokedLists",
"type": "t_mapping(t_bytes32,t_bool)",
"src": "../project:/contracts/RevocationRegistry.sol:30"
},
{
"contract": "RevocationRegistry",
"label": "VERSION_MAJOR",
"type": "t_string_storage",
"src": "../project:/contracts/RevocationRegistry.sol:32"
},
{
"contract": "RevocationRegistry",
"label": "VERSION_MINOR",
"type": "t_string_storage",
"src": "../project:/contracts/RevocationRegistry.sol:33"
},
{
"contract": "RevocationRegistry",
"label": "VERSION_PATCH",
"type": "t_string_storage",
"src": "../project:/contracts/RevocationRegistry.sol:34"
},
{
"contract": "RevocationRegistry",
"label": "VERSION_DELIMITER",
"type": "t_string_storage",
"src": "../project:/contracts/RevocationRegistry.sol:35"
}
],
"types": {
"t_mapping(t_address,t_mapping(t_bytes32,t_mapping(t_bytes32,t_bool)))": {
"label": "mapping(address => mapping(bytes32 => mapping(bytes32 => bool)))"
},
"t_address": {
"label": "address"
},
"t_mapping(t_bytes32,t_mapping(t_bytes32,t_bool))": {
"label": "mapping(bytes32 => mapping(bytes32 => bool))"
},
"t_bytes32": {
"label": "bytes32"
},
"t_mapping(t_bytes32,t_bool)": {
"label": "mapping(bytes32 => bool)"
},
"t_bool": {
"label": "bool"
},
"t_mapping(t_bytes32,t_address)": {
"label": "mapping(bytes32 => address)"
},
"t_mapping(t_bytes32,t_mapping(t_address,t_uint256))": {
"label": "mapping(bytes32 => mapping(address => uint256))"
},
"t_mapping(t_address,t_uint256)": {
"label": "mapping(address => uint256)"
},
"t_uint256": {
"label": "uint256"
},
"t_string_storage": {
"label": "string"
},
"t_array(t_uint256)50_storage": {
"label": "uint256[50]"
},
"t_array(t_uint256)49_storage": {
"label": "uint256[49]"
},
"t_array(t_uint256)48_storage": {
"label": "uint256[48]"
},
"t_uint8": {
"label": "uint8"
}
}
}
}
}
}
12 changes: 12 additions & 0 deletions networks/11155111.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[
{
"contractName": "Migrations",
"address": "0x9B29111Fe308587a7CAf794B648C1951ecb97283",
"transactionHash": "0x1ba6acdb8b757781f2aedafca66983ce8af59332a38da7e662b7227bacdd663b"
},
{
"contractName": "RevocationRegistry",
"address": "0x8FBFDDEbE25a12D873E6782BbE30f1Bc326A6E1C",
"transactionHash": "0x13e88a72d755f2b3e80c39548a8d03dc382f016fe1a2ffb39c0078c030533f1f"
}
]
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"compile-src": "tsc -p tsconfig.src.json --outDir ./dist/",
"migrate": "tsc -p ./tsconfig.migrate.json --outDir ./migrations && npm run compile && truffle migrate",
"migrate-goerli": "tsc -p ./tsconfig.migrate.json --outDir ./migrations && npm run compile && truffle migrate --network goerli",
"migrate-sepolia": "tsc -p ./tsconfig.migrate.json --outDir ./migrations && npm run compile && truffle migrate --network sepolia",
"test": "npm run test:jest && npm run test:truffle",
"test:truffle": "npx truffle test",
"test:truffle:meta": "npx truffle test test/meta-transactions.test.ts",
Expand Down
5 changes: 5 additions & 0 deletions truffle-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ module.exports = {
network_id: 5, // Goerli's id
skipDryRun: true // Skip dry run before migrations? (default: false for public nets )
},
sepolia: {
provider: () => new HDWalletProvider(REGISTRY_WALLET_PRIVATE_KEY, `https://sepolia.infura.io/v3/${INFURA_PROJECT_ID}`),
network_id: 11155111, // Sepolia's id
skipDryRun: true // Skip dry run before migrations? (default: false for public nets )
},
//
// Useful for private networks
// private: {
Expand Down

0 comments on commit de45ba2

Please sign in to comment.