Skip to content

Commit

Permalink
feat: add setter for mining pass receivers and update access control
Browse files Browse the repository at this point in the history
  • Loading branch information
MejiasDev committed Jul 3, 2024
1 parent 5174d47 commit d8fb6db
Show file tree
Hide file tree
Showing 15 changed files with 340 additions and 108 deletions.
4 changes: 2 additions & 2 deletions config/addresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ export const addresses: {
[ChainId.AVALANCHE_TESTNET]: '0xa3b0496e5E7748B3C02752220508c4297B29b99C',
},
xVAPE: {
[ChainId.AVALANCHE]: '0x856D9680ceD5ee696980F44e8eaA2E090d92a6Db',
[ChainId.AVALANCHE]: '0x0fA2CCC39Cc3B225A7649eD84ec76Ee5217d07c4', // StableVapeReplenishmentPool
[ChainId.AVALANCHE_TESTNET]: '0x723bc5612cf6Ee5756cbb322719d142e6E23478C',
},
replenishmentPool: {
vpndReplenishmentPool: {
[ChainId.AVALANCHE]: '0x1cEc7B81Fdc2d46241B54b5190AF7967A93aa0E0',
[ChainId.AVALANCHE_TESTNET]: '0xcf00c1ac6d26d52054ec89be6e093f2e270d61d9',
},
Expand Down
43 changes: 40 additions & 3 deletions deployments/DiamondManagerFacet.json

Large diffs are not rendered by default.

11 changes: 8 additions & 3 deletions deployments/FeeCollectorFacet.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@
"name": "FeeCollectorFacet__Only_Owner",
"type": "error"
},
{
"inputs": [],
"name": "LAuthorizable__OnlyAuthorized",
"type": "error"
},
{
"inputs": [],
"name": "collectBoostFees",
Expand All @@ -101,8 +106,8 @@
"type": "function"
}
],
"bytecode": "0x608060405234801561001057600080fd5b5061075c806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063238e2b2b1461003b578063b2e07cf414610045575b600080fd5b61004361004d565b005b610043610361565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c13205473ffffffffffffffffffffffffffffffffffffffff1633146100bd576040517f117239d000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008060090180548060200260200160405190810160405280929190818152602001828054801561012457602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff1681526001909101906020018083116100f9575b505083516015549495509373ffffffffffffffffffffffffffffffffffffffff16925060009150505b8281101561035b57600080601001600086848151811061016f5761016f61066f565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050600080601001600087858151811061020b5761020b61066f565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8684815181106102bc576102bc61066f565b6020026020010151836040518363ffffffff1660e01b815260040161030392919073ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b6020604051808303816000875af1158015610322573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610346919061069e565b50508080610353906106c7565b91505061014d565b50505050565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c13205473ffffffffffffffffffffffffffffffffffffffff1633146103d1576040517f117239d000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080600e0180548060200260200160405190810160405280929190818152602001828054801561043857602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff16815260019091019060200180831161040d575b505083516017549495509373ffffffffffffffffffffffffffffffffffffffff16925060009150505b8281101561035b5760008060100160008684815181106104835761048361066f565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050600080601001600087858151811061051f5761051f61066f565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8684815181106105d0576105d061066f565b6020026020010151836040518363ffffffff1660e01b815260040161061792919073ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b6020604051808303816000875af1158015610636573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061065a919061069e565b50508080610667906106c7565b915050610461565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000602082840312156106b057600080fd5b815180151581146106c057600080fd5b9392505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361071f577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b506001019056fea264697066735822122048b53c3ef455a6ea4970f0bf630b74ee51be009e97a9643469fe0476f8a1bac964736f6c63430008120033",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c8063238e2b2b1461003b578063b2e07cf414610045575b600080fd5b61004361004d565b005b610043610361565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c13205473ffffffffffffffffffffffffffffffffffffffff1633146100bd576040517f117239d000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008060090180548060200260200160405190810160405280929190818152602001828054801561012457602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff1681526001909101906020018083116100f9575b505083516015549495509373ffffffffffffffffffffffffffffffffffffffff16925060009150505b8281101561035b57600080601001600086848151811061016f5761016f61066f565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050600080601001600087858151811061020b5761020b61066f565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8684815181106102bc576102bc61066f565b6020026020010151836040518363ffffffff1660e01b815260040161030392919073ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b6020604051808303816000875af1158015610322573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610346919061069e565b50508080610353906106c7565b91505061014d565b50505050565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c13205473ffffffffffffffffffffffffffffffffffffffff1633146103d1576040517f117239d000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080600e0180548060200260200160405190810160405280929190818152602001828054801561043857602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff16815260019091019060200180831161040d575b505083516017549495509373ffffffffffffffffffffffffffffffffffffffff16925060009150505b8281101561035b5760008060100160008684815181106104835761048361066f565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050600080601001600087858151811061051f5761051f61066f565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8684815181106105d0576105d061066f565b6020026020010151836040518363ffffffff1660e01b815260040161061792919073ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b6020604051808303816000875af1158015610636573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061065a919061069e565b50508080610667906106c7565b915050610461565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000602082840312156106b057600080fd5b815180151581146106c057600080fd5b9392505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361071f577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b506001019056fea264697066735822122048b53c3ef455a6ea4970f0bf630b74ee51be009e97a9643469fe0476f8a1bac964736f6c63430008120033",
"bytecode": "0x608060405234801561001057600080fd5b506106f5806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063238e2b2b1461003b578063b2e07cf414610045575b600080fd5b61004361004d565b005b6100436102fc565b6100586000336105a5565b6000806009018054806020026020016040519081016040528092919081815260200182805480156100bf57602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610094575b505083516015549495509373ffffffffffffffffffffffffffffffffffffffff16925060009150505b828110156102f657600080601001600086848151811061010a5761010a610608565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008060100160008785815181106101a6576101a6610608565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb86848151811061025757610257610608565b6020026020010151836040518363ffffffff1660e01b815260040161029e92919073ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b6020604051808303816000875af11580156102bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102e19190610637565b505080806102ee90610660565b9150506100e8565b50505050565b6103076000336105a5565b600080600e0180548060200260200160405190810160405280929190818152602001828054801561036e57602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610343575b505083516017549495509373ffffffffffffffffffffffffffffffffffffffff16925060009150505b828110156102f65760008060100160008684815181106103b9576103b9610608565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050600080601001600087858151811061045557610455610608565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb86848151811061050657610506610608565b6020026020010151836040518363ffffffff1660e01b815260040161054d92919073ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b6020604051808303816000875af115801561056c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105909190610637565b5050808061059d90610660565b915050610397565b73ffffffffffffffffffffffffffffffffffffffff811660009081526020839052604090205460ff16610604576040517f2c52e07400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006020828403121561064957600080fd5b8151801515811461065957600080fd5b9392505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036106b8577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b506001019056fea2646970667358221220c0e50f7a2e00ec6cb7715aa67ebc50d83e9642cd83aa6fb025436cba4c2556e964736f6c63430008120033",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c8063238e2b2b1461003b578063b2e07cf414610045575b600080fd5b61004361004d565b005b6100436102fc565b6100586000336105a5565b6000806009018054806020026020016040519081016040528092919081815260200182805480156100bf57602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610094575b505083516015549495509373ffffffffffffffffffffffffffffffffffffffff16925060009150505b828110156102f657600080601001600086848151811061010a5761010a610608565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008060100160008785815181106101a6576101a6610608565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb86848151811061025757610257610608565b6020026020010151836040518363ffffffff1660e01b815260040161029e92919073ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b6020604051808303816000875af11580156102bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102e19190610637565b505080806102ee90610660565b9150506100e8565b50505050565b6103076000336105a5565b600080600e0180548060200260200160405190810160405280929190818152602001828054801561036e57602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610343575b505083516017549495509373ffffffffffffffffffffffffffffffffffffffff16925060009150505b828110156102f65760008060100160008684815181106103b9576103b9610608565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050600080601001600087858151811061045557610455610608565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb86848151811061050657610506610608565b6020026020010151836040518363ffffffff1660e01b815260040161054d92919073ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b6020604051808303816000875af115801561056c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105909190610637565b5050808061059d90610660565b915050610397565b73ffffffffffffffffffffffffffffffffffffffff811660009081526020839052604090205460ff16610604576040517f2c52e07400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006020828403121561064957600080fd5b8151801515811461065957600080fd5b9392505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036106b8577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b506001019056fea2646970667358221220c0e50f7a2e00ec6cb7715aa67ebc50d83e9642cd83aa6fb025436cba4c2556e964736f6c63430008120033",
"linkReferences": {},
"deployedLinkReferences": {}
},
Expand All @@ -111,6 +116,6 @@
"log": true,
"skipIfAlreadyDeployed": true
},
"address": "0x2883CC3FAE0B81e938d05428ffC9750Dac7Bb806"
"address": "0x28f1c2A2C09205C124Acf307459b7B67b468886b"
}
}
26 changes: 26 additions & 0 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,32 @@ const config: HardhatUserConfig = {
},
},
},
etherscan: {
apiKey: {
snowtrace: 'snowtrace',
snowtraceFuji: 'snowtraceFuji',
},
customChains: [
{
network: 'snowtrace',
chainId: 43114,
urls: {
apiURL:
'https://api.routescan.io/v2/network/mainnet/evm/43114/etherscan',
browserURL: 'https://snowtrace.dev/',
},
},
{
network: 'snowtraceFuji',
chainId: 43113,
urls: {
apiURL:
'https://api.routescan.io/v2/network/testnet/evm/43113/etherscan',
browserURL: 'https://testnet.snowtrace.io/',
},
},
],
},
}

export default config
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"@nomicfoundation/hardhat-toolbox": "3.0.0",
"@nomicfoundation/hardhat-verify": "^1.0.3",
"@nomiclabs/hardhat-solhint": "3.0.1",
"@safe-global/protocol-kit": "^4.0.2",
"@typechain/ethers-v6": "^0.4.0",
"@typechain/hardhat": "8.0.0",
"@types/chai": "4.3.5",
Expand Down
2 changes: 1 addition & 1 deletion scripts/deploy/deployDiamond.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const defaultArgs: DiamondInit.ArgsStruct = {
stratosphere: addresses.stratosphere[CHAIN_ID],
xVAPE: addresses.xVAPE[CHAIN_ID],
passport: addresses.passportPool[CHAIN_ID],
replenishmentPool: addresses.replenishmentPool[CHAIN_ID],
replenishmentPool: addresses.vpndReplenishmentPool[CHAIN_ID],
labsMultisig: addresses.teamMultisig[CHAIN_ID],
burnWallet: BURN_WALLET,
}
Expand Down
31 changes: 0 additions & 31 deletions scripts/deploy/gelato-resolver.ts

This file was deleted.

54 changes: 0 additions & 54 deletions scripts/deploy/release.ts

This file was deleted.

1 change: 0 additions & 1 deletion scripts/upgradeDiamond.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { network } from 'hardhat'
import LiquidMiningDiamond from '../deployments/LiquidMiningDiamond.json'
import { deployContract } from '../utils/deployContract'
import { addOrReplaceFacets } from '../utils/diamond'
import { defaultArgs } from './deploy/deployDiamond'
import getFacets from '../utils/getFacets'

async function main() {
Expand Down
Loading

0 comments on commit d8fb6db

Please sign in to comment.