Skip to content

Commit

Permalink
Deploy Proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
Corantin committed Jul 31, 2023
1 parent feba0e7 commit 2f1cd4b
Show file tree
Hide file tree
Showing 28 changed files with 4,792 additions and 4,069 deletions.
153 changes: 153 additions & 0 deletions packages/hardhat/.openzeppelin/goerli.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
{
"manifestVersion": "3.2",
"admin": {
"address": "0xa7F867D22420faB2D684351b9C95f7128e138d52",
"txHash": "0x8be132f70dd70e5c0968f5a6b417f87bc75c3c0754ba876faab1b18f64d25456"
},
"proxies": [
{
"address": "0x6bc0CD1e98B66b5644f0720f7dF7786746628C5d",
"txHash": "0x41ea17ea8558f65e3628d0f46dac6bb0a4018588e9a942fca53dcdfedc42c7a9",
"kind": "transparent"
},
{
"address": "0xBd66CcFceAE3836885F74295C922Da2d8cdD7940",
"txHash": "0x0686abbde2960577f4df420458f582e26cefbbaf60f1225522736cf7ad9566f9",
"kind": "transparent"
},
{
"address": "0x3E4E6Ea969722382f76858D2eF0cf89E45a848e1",
"txHash": "0x36291cd05033fcbeab07ec5e3abbfa84036bd2a1eeace0980a332b989e933c4a",
"kind": "transparent"
},
{
"address": "0xbfFEce7c884a488921F52Fb4dd0b0c61B77C9104",
"txHash": "0x79ea242422293cb66ecc3f08d3f929760ba90dbb1c272a3eacd9bb4c74a337c3",
"kind": "transparent"
}
],
"impls": {
"32a98c90f0fb31631d3da5e565a60b3bcf5d152d3dc81b21ecd5cc0c8c42df91": {
"address": "0xF2574ba0570E38edf3917eB7f7f1314d40609612",
"txHash": "0xed9e2a5d5913c781f2d16c62217339c4ffe12156c04a1676819e15e855142bab",
"layout": {
"solcVersion": "0.8.2",
"storage": [
{
"label": "_initialized",
"offset": 0,
"slot": "0",
"type": "t_uint8",
"contract": "Initializable",
"src": "@openzeppelin\\contracts-upgradeable\\proxy\\utils\\Initializable.sol:63",
"retypedFrom": "bool"
},
{
"label": "_initializing",
"offset": 1,
"slot": "0",
"type": "t_bool",
"contract": "Initializable",
"src": "@openzeppelin\\contracts-upgradeable\\proxy\\utils\\Initializable.sol:68"
},
{
"label": "__gap",
"offset": 0,
"slot": "1",
"type": "t_array(t_uint256)50_storage",
"contract": "ContextUpgradeable",
"src": "@openzeppelin\\contracts-upgradeable\\utils\\ContextUpgradeable.sol:36"
},
{
"label": "_owner",
"offset": 0,
"slot": "51",
"type": "t_address",
"contract": "OwnableUpgradeable",
"src": "@openzeppelin\\contracts-upgradeable\\access\\OwnableUpgradeable.sol:22"
},
{
"label": "__gap",
"offset": 0,
"slot": "52",
"type": "t_array(t_uint256)49_storage",
"contract": "OwnableUpgradeable",
"src": "@openzeppelin\\contracts-upgradeable\\access\\OwnableUpgradeable.sol:94"
},
{
"label": "aragonGovernAddress",
"offset": 0,
"slot": "101",
"type": "t_address",
"contract": "QuestFactory",
"src": "contracts\\QuestFactory.sol:15"
},
{
"label": "createDeposit",
"offset": 0,
"slot": "102",
"type": "t_struct(Deposit)3257_storage",
"contract": "QuestFactory",
"src": "contracts\\QuestFactory.sol:16"
},
{
"label": "playDeposit",
"offset": 0,
"slot": "104",
"type": "t_struct(Deposit)3257_storage",
"contract": "QuestFactory",
"src": "contracts\\QuestFactory.sol:17"
}
],
"types": {
"t_address": {
"label": "address",
"numberOfBytes": "20"
},
"t_array(t_uint256)49_storage": {
"label": "uint256[49]",
"numberOfBytes": "1568"
},
"t_array(t_uint256)50_storage": {
"label": "uint256[50]",
"numberOfBytes": "1600"
},
"t_bool": {
"label": "bool",
"numberOfBytes": "1"
},
"t_contract(IERC20Upgradeable)378": {
"label": "contract IERC20Upgradeable",
"numberOfBytes": "20"
},
"t_struct(Deposit)3257_storage": {
"label": "struct Models.Deposit",
"members": [
{
"label": "token",
"type": "t_contract(IERC20Upgradeable)378",
"offset": 0,
"slot": "0"
},
{
"label": "amount",
"type": "t_uint256",
"offset": 0,
"slot": "1"
}
],
"numberOfBytes": "64"
},
"t_uint256": {
"label": "uint256",
"numberOfBytes": "32"
},
"t_uint8": {
"label": "uint8",
"numberOfBytes": "1"
}
}
}
}
}
}
144 changes: 82 additions & 62 deletions packages/hardhat/default-config.json
Original file line number Diff line number Diff line change
@@ -1,68 +1,88 @@
{
"GovernQueueFactory": {
"xdai": "0xA6591419f78C044979bf63Aa81edD5e100C0E957",
"goerli": "0xEA6015008c7926E84C76b70344EbD31a48A6fd2c"
},
"GovernFactory": {
"xdai": "0x8De393cd9F84D7989A1164191a1f6CDd5D2a7F9B",
"goerli": "0xd0A50194CeFf1A33E2a831F80EBfa2b11aC44B78"
},
"CreateQuestDeposit": {
"xdai": {
"token": "0x71850b7E9Ee3f13Ab46d67167341E4bDc905Eef9",
"amount": 2
"GovernQueueFactory": {
"xdai": "0xA6591419f78C044979bf63Aa81edD5e100C0E957",
"goerli": "0xEA6015008c7926E84C76b70344EbD31a48A6fd2c"
},
"goerli": {
"token": "0x2d467a24095B262787f58ce97d9B130ce7232B57",
"amount": 0.01
}
},
"PlayQuestDeposit": {
"xdai": {
"token": "0x71850b7E9Ee3f13Ab46d67167341E4bDc905Eef9",
"amount": 0.5
"GovernFactory": {
"xdai": "0x8De393cd9F84D7989A1164191a1f6CDd5D2a7F9B",
"goerli": "0xd0A50194CeFf1A33E2a831F80EBfa2b11aC44B78"
},
"goerli": {
"token": "0x2d467a24095B262787f58ce97d9B130ce7232B57",
"amount": 0.01
}
},
"ScheduleDeposit": {
"xdai": {
"token": "0x71850b7E9Ee3f13Ab46d67167341E4bDc905Eef9",
"amount": 0.5
"CreateQuestDeposit": {
"xdai": {
"token": "0x71850b7E9Ee3f13Ab46d67167341E4bDc905Eef9",
"amount": 2
},
"goerli": {
"token": "0x2d467a24095B262787f58ce97d9B130ce7232B57",
"amount": 0.01
},
"localhost": {
"token": "0x0000000000000000000000000000000000000000",
"amount": 0
}
},
"goerli": {
"token": "0x2d467a24095B262787f58ce97d9B130ce7232B57",
"amount": 0.01
}
},
"ChallengeDeposit": {
"xdai": {
"token": "0x71850b7E9Ee3f13Ab46d67167341E4bDc905Eef9",
"amount": 0.3
"PlayQuestDeposit": {
"xdai": {
"token": "0x71850b7E9Ee3f13Ab46d67167341E4bDc905Eef9",
"amount": 0.5
},
"goerli": {
"token": "0x2d467a24095B262787f58ce97d9B130ce7232B57",
"amount": 0.01
},
"localhost": {
"token": "0x0000000000000000000000000000000000000000",
"amount": 0
}
},
"goerli": {
"token": "0x2d467a24095B262787f58ce97d9B130ce7232B57",
"amount": 0.01
}
},
"ChallengeFee": {
"goerli": {
"token": "0x2d467a24095B262787f58ce97d9B130ce7232B57",
"amount": 0.05
"ScheduleDeposit": {
"xdai": {
"token": "0x71850b7E9Ee3f13Ab46d67167341E4bDc905Eef9",
"amount": 0.5
},
"goerli": {
"token": "0x2d467a24095B262787f58ce97d9B130ce7232B57",
"amount": 0.01
},
"localhost": {
"token": "0x0000000000000000000000000000000000000000",
"amount": 0
}
},
"ChallengeDeposit": {
"xdai": {
"token": "0x71850b7E9Ee3f13Ab46d67167341E4bDc905Eef9",
"amount": 0.3
},
"goerli": {
"token": "0x2d467a24095B262787f58ce97d9B130ce7232B57",
"amount": 0.01
},
"localhost": {
"token": "0x0000000000000000000000000000000000000000",
"amount": 0
}
},
"ChallengeFee": {
"goerli": {
"token": "0x2d467a24095B262787f58ce97d9B130ce7232B57",
"amount": 0.05
},
"localhost": {
"token": "0x0000000000000000000000000000000000000000",
"amount": 0
}
},
"RootOwner": {
"xdai": "0x7375Ed576952BD6CeD060EeE2Db763130eA13bA0",
"goerli": "0x7375Ed576952BD6CeD060EeE2Db763130eA13bA0"
},
"ClaimDelay": {
"xdai": 604800,
"goerli": 300
},
"CelesteResolver": {
"xdai": "0x44E4fCFed14E1285c9e0F6eae77D5fDd0F196f85",
"goerli": "0xCDD144eac3dD79667a1cAADFDc4Edaa75D0Eb81f"
}
},
"RootOwner": {
"xdai": "0x7375Ed576952BD6CeD060EeE2Db763130eA13bA0",
"goerli": "0x7375Ed576952BD6CeD060EeE2Db763130eA13bA0"
},
"ClaimDelay": {
"xdai": 604800,
"goerli": 300
},
"CelesteResolver": {
"xdai": "0x44E4fCFed14E1285c9e0F6eae77D5fDd0F196f85",
"goerli": "0xCDD144eac3dD79667a1cAADFDc4Edaa75D0Eb81f"
}
}
}
19 changes: 12 additions & 7 deletions packages/hardhat/deploy/deploy-quest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,13 @@ export default async ({
deployments,
network,
run,
ethers,
}: HardhatRuntimeEnvironment) => {
const { deploy } = deployments;
const { deployer } = await getNamedAccounts();
const constructorArguments = [
"ASDF",
"0x00",
"0xdf456B614fE9FF1C7c0B380330Da29C96d40FB02",
1700122574,
"0x6e7c3BC98bee14302AA2A98B4c5C86b13eB4b6Cd",
"0xdf456B614fE9FF1C7c0B380330Da29C96d40FB02",
{
token: "0x6e7c3BC98bee14302AA2A98B4c5C86b13eB4b6Cd",
amount: "100000000000000000",
Expand All @@ -25,14 +22,22 @@ export default async ({
token: "0x6e7c3BC98bee14302AA2A98B4c5C86b13eB4b6Cd",
amount: "100000000000000000",
},
"0xdf456B614fE9FF1C7c0B380330Da29C96d40FB02",
0,
{
questCreator: "0xdf456B614fE9FF1C7c0B380330Da29C96d40FB02",
maxPlayers: 0,
rewardToken: "0xdf456B614fE9FF1C7c0B380330Da29C96d40FB02",
expireTime: 1700122574,
aragonGovernAddress: "0x6e7c3BC98bee14302AA2A98B4c5C86b13eB4b6Cd",
fundsRecoveryAddress: "0xdf456B614fE9FF1C7c0B380330Da29C96d40FB02",
isWhiteList: false,
},
];
const balance = await ethers.provider.getBalance(deployer);
const deployResult = await deploy("Quest", {
from: deployer,
args: constructorArguments,
log: true,
// gasLimit: 4000000,
// gasLimit: 30000000,
});

console.log({ constructorArguments });
Expand Down
Loading

0 comments on commit 2f1cd4b

Please sign in to comment.