-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
1,049 additions
and
49 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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { network, viem } from "hardhat"; | ||
import { deployHatsHatCreatorModule } from "../../helpers/deploy/Hats"; | ||
|
||
const upgrade = async () => { | ||
const module = await deployHatsHatCreatorModule( | ||
"0x0000000000000000000000000000000000000001", | ||
); | ||
|
||
const bigBang = await viem.getContractAt( | ||
"BigBang", | ||
"0x3E70d10aCdcC14B6C31DA26DcC195a6EDf1C2c16", | ||
); | ||
|
||
await bigBang.write.setHatsHatCreatorModuleImpl([ | ||
module.HatsHatCreatorModule.address, | ||
]); | ||
|
||
console.log( | ||
"HatsHatCreatorModule module:\n", | ||
`npx hardhat verify ${module.HatsHatCreatorModule.address} "0.0.0" 0x0000000000000000000000000000000000000001 --network ${network.name}\n`, | ||
); | ||
}; | ||
|
||
upgrade(); |
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,24 @@ | ||
import { network, viem } from "hardhat"; | ||
import { deployHatsTimeFrameModule } from "../../helpers/deploy/Hats"; | ||
|
||
const upgrade = async () => { | ||
const module = await deployHatsTimeFrameModule( | ||
"0x0000000000000000000000000000000000000001", | ||
); | ||
|
||
const bigBang = await viem.getContractAt( | ||
"BigBang", | ||
"0x3E70d10aCdcC14B6C31DA26DcC195a6EDf1C2c16", | ||
); | ||
|
||
await bigBang.write.setHatsTimeFrameModuleImpl([ | ||
module.HatsTimeFrameModule.address, | ||
]); | ||
|
||
console.log( | ||
"HatsTimeframeModule module:\n", | ||
`npx hardhat verify ${module.HatsTimeFrameModule.address} "0.0.0" 0x0000000000000000000000000000000000000001 --network ${network.name}\n`, | ||
); | ||
}; | ||
|
||
upgrade(); |
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,332 @@ | ||
export const HATS_HAT_CREATOR_MODULE_ABI = [ | ||
{ | ||
inputs: [ | ||
{ | ||
internalType: "string", | ||
name: "_version", | ||
type: "string", | ||
}, | ||
{ | ||
internalType: "address", | ||
name: "_tmpOwner", | ||
type: "address", | ||
}, | ||
], | ||
stateMutability: "nonpayable", | ||
type: "constructor", | ||
}, | ||
{ | ||
inputs: [], | ||
name: "InvalidInitialization", | ||
type: "error", | ||
}, | ||
{ | ||
inputs: [], | ||
name: "NotInitializing", | ||
type: "error", | ||
}, | ||
{ | ||
inputs: [ | ||
{ | ||
internalType: "address", | ||
name: "owner", | ||
type: "address", | ||
}, | ||
], | ||
name: "OwnableInvalidOwner", | ||
type: "error", | ||
}, | ||
{ | ||
inputs: [ | ||
{ | ||
internalType: "address", | ||
name: "account", | ||
type: "address", | ||
}, | ||
], | ||
name: "OwnableUnauthorizedAccount", | ||
type: "error", | ||
}, | ||
{ | ||
anonymous: false, | ||
inputs: [ | ||
{ | ||
indexed: true, | ||
internalType: "address", | ||
name: "authority", | ||
type: "address", | ||
}, | ||
], | ||
name: "CreateHatAuthorityGranted", | ||
type: "event", | ||
}, | ||
{ | ||
anonymous: false, | ||
inputs: [ | ||
{ | ||
indexed: true, | ||
internalType: "address", | ||
name: "authority", | ||
type: "address", | ||
}, | ||
], | ||
name: "CreateHatAuthorityRevoked", | ||
type: "event", | ||
}, | ||
{ | ||
anonymous: false, | ||
inputs: [ | ||
{ | ||
indexed: false, | ||
internalType: "uint64", | ||
name: "version", | ||
type: "uint64", | ||
}, | ||
], | ||
name: "Initialized", | ||
type: "event", | ||
}, | ||
{ | ||
anonymous: false, | ||
inputs: [ | ||
{ | ||
indexed: true, | ||
internalType: "address", | ||
name: "previousOwner", | ||
type: "address", | ||
}, | ||
{ | ||
indexed: true, | ||
internalType: "address", | ||
name: "newOwner", | ||
type: "address", | ||
}, | ||
], | ||
name: "OwnershipTransferred", | ||
type: "event", | ||
}, | ||
{ | ||
inputs: [], | ||
name: "HATS", | ||
outputs: [ | ||
{ | ||
internalType: "contract IHats", | ||
name: "", | ||
type: "address", | ||
}, | ||
], | ||
stateMutability: "pure", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [], | ||
name: "IMPLEMENTATION", | ||
outputs: [ | ||
{ | ||
internalType: "address", | ||
name: "", | ||
type: "address", | ||
}, | ||
], | ||
stateMutability: "pure", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [ | ||
{ | ||
internalType: "uint256", | ||
name: "_admin", | ||
type: "uint256", | ||
}, | ||
{ | ||
internalType: "string", | ||
name: "_details", | ||
type: "string", | ||
}, | ||
{ | ||
internalType: "uint32", | ||
name: "_maxSupply", | ||
type: "uint32", | ||
}, | ||
{ | ||
internalType: "address", | ||
name: "_eligibility", | ||
type: "address", | ||
}, | ||
{ | ||
internalType: "address", | ||
name: "_toggle", | ||
type: "address", | ||
}, | ||
{ | ||
internalType: "bool", | ||
name: "_mutable", | ||
type: "bool", | ||
}, | ||
{ | ||
internalType: "string", | ||
name: "_imageURI", | ||
type: "string", | ||
}, | ||
], | ||
name: "createHat", | ||
outputs: [ | ||
{ | ||
internalType: "uint256", | ||
name: "", | ||
type: "uint256", | ||
}, | ||
], | ||
stateMutability: "nonpayable", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [ | ||
{ | ||
internalType: "address", | ||
name: "", | ||
type: "address", | ||
}, | ||
], | ||
name: "createHatAuthorities", | ||
outputs: [ | ||
{ | ||
internalType: "bool", | ||
name: "", | ||
type: "bool", | ||
}, | ||
], | ||
stateMutability: "view", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [ | ||
{ | ||
internalType: "address", | ||
name: "authority", | ||
type: "address", | ||
}, | ||
], | ||
name: "grantCreateHatAuthority", | ||
outputs: [], | ||
stateMutability: "nonpayable", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [ | ||
{ | ||
internalType: "address", | ||
name: "authority", | ||
type: "address", | ||
}, | ||
], | ||
name: "hasCreateHatAuthority", | ||
outputs: [ | ||
{ | ||
internalType: "bool", | ||
name: "", | ||
type: "bool", | ||
}, | ||
], | ||
stateMutability: "view", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [], | ||
name: "hatId", | ||
outputs: [ | ||
{ | ||
internalType: "uint256", | ||
name: "", | ||
type: "uint256", | ||
}, | ||
], | ||
stateMutability: "pure", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [], | ||
name: "owner", | ||
outputs: [ | ||
{ | ||
internalType: "address", | ||
name: "", | ||
type: "address", | ||
}, | ||
], | ||
stateMutability: "view", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [], | ||
name: "renounceOwnership", | ||
outputs: [], | ||
stateMutability: "nonpayable", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [ | ||
{ | ||
internalType: "address", | ||
name: "authority", | ||
type: "address", | ||
}, | ||
], | ||
name: "revokeCreateHatAuthority", | ||
outputs: [], | ||
stateMutability: "nonpayable", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [ | ||
{ | ||
internalType: "bytes", | ||
name: "_initData", | ||
type: "bytes", | ||
}, | ||
], | ||
name: "setUp", | ||
outputs: [], | ||
stateMutability: "nonpayable", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [ | ||
{ | ||
internalType: "address", | ||
name: "newOwner", | ||
type: "address", | ||
}, | ||
], | ||
name: "transferOwnership", | ||
outputs: [], | ||
stateMutability: "nonpayable", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [], | ||
name: "version", | ||
outputs: [ | ||
{ | ||
internalType: "string", | ||
name: "", | ||
type: "string", | ||
}, | ||
], | ||
stateMutability: "view", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [], | ||
name: "version_", | ||
outputs: [ | ||
{ | ||
internalType: "string", | ||
name: "", | ||
type: "string", | ||
}, | ||
], | ||
stateMutability: "view", | ||
type: "function", | ||
}, | ||
] as const; |
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.