Skip to content

Commit

Permalink
merge pacaya_fork branch, update resolvers
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberhorsey committed Jan 24, 2025
2 parents 40b0db8 + 93f4272 commit 8fc98eb
Show file tree
Hide file tree
Showing 44 changed files with 398 additions and 298 deletions.
9 changes: 4 additions & 5 deletions packages/nfts/script/trailblazers-season-2/Deploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@ contract DeployS2Script is Script {
BadgeRecruitment recruitment;

// Taiko Mainnet Values
/*
//address owner = 0xf8ff2AF0DC1D5BA4811f22aCb02936A1529fd2Be;
address claimMintSigner = 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266;
address recruitmentSigner = 0x9Fc8d56c7376f9b062FEe7E02BAdFA670d603248;
string baseURI =
"https://taikonfts.4everland.link/ipfs/bafybeiatuzeeeznd3hi5qiulslxcjd22ebu45t4fra2jvi3smhocr2c66a";
"https://taikonfts.4everland.link/ipfs/bafybeiatuzeeeznd3hi5qiulslxcjd22ebu45t4fra2jvi3smhocr2c66a";
IMinimalBlacklist blacklist = IMinimalBlacklist(0xfA5EA6f9A13532cd64e805996a941F101CCaAc9a);
uint256 public MAX_INFLUENCES = 5;
Expand All @@ -37,11 +38,10 @@ contract DeployS2Script is Script {
uint256 public DEFAULT_CYCLE_DURATION = 7 days;
uint256 public s1EndDate = 1_734_350_400; // Dec 16th 2024, noon UTC
uint256 public S1_LOCK_DURATION = (s1EndDate - block.timestamp);

*/
// Hekla Testnet Values
/*
string baseURI =
"https://taikonfts.4everland.link/ipfs/bafybeiatuzeeeznd3hi5qiulslxcjd22ebu45t4fra2jvi3smhocr2c66a";
"https://taikonfts.4everland.link/ipfs/bafybeiatuzeeeznd3hi5qiulslxcjd22ebu45t4fra2jvi3smhocr2c66a";

IMinimalBlacklist blacklist = IMinimalBlacklist(0xe61E9034b5633977eC98E302b33e321e8140F105);
address claimMintSigner = 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266;
Expand All @@ -54,7 +54,6 @@ contract DeployS2Script is Script {
uint256 public MAX_INFLUENCES_DIVIDER = 100;
uint256 public DEFAULT_CYCLE_DURATION = 7 days;
uint256 public S1_LOCK_DURATION = 365 days;
*/

address s1Contract = 0xa20a8856e00F5ad024a55A663F06DCc419FFc4d5;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.24;

import { UtilsScript } from "./Utils.s.sol";
import { Script, console } from "forge-std/src/Script.sol";
import { BadgeRecruitment } from "../../contracts/trailblazers-season-2/BadgeRecruitment.sol";
import { BadgeRecruitmentV2 } from "../../contracts/trailblazers-season-2/BadgeRecruitmentV2.sol";

contract UpgradeRecruitmentsV2 is Script {
UtilsScript public utils;
string public jsonLocation;
uint256 public deployerPrivateKey;

address recruitmentAddress = 0xa9Ceb04F3aF71fF123409d426A92BABb5124970C;
BadgeRecruitment public recruitmentV1;
BadgeRecruitmentV2 public recruitmentV2;

function setUp() public {
utils = new UtilsScript();
utils.setUp();

jsonLocation = utils.getContractJsonLocation();
deployerPrivateKey = utils.getPrivateKey();
}

function run() public {
vm.startBroadcast(deployerPrivateKey);
recruitmentV1 = BadgeRecruitment(recruitmentAddress);

recruitmentV1.upgradeToAndCall(
address(new BadgeRecruitmentV2()), abi.encodeCall(BadgeRecruitmentV2.version, ())
);

recruitmentV2 = BadgeRecruitmentV2(address(recruitmentV1));

console.log("Upgraded BadgeRecruitmentV2 to:", address(recruitmentV2));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import "src/shared/libs/LibNetwork.sol";
import "src/shared/libs/LibStrings.sol";
import "src/shared/signal/ISignalService.sol";
import "src/layer1/verifiers/IVerifier.sol";
import "./IFork.sol";
import "./ITaikoInbox.sol";
import "./IForcedInclusionStore.sol";

Expand Down Expand Up @@ -68,12 +67,12 @@ contract ForcedInclusionInbox is EssentialContract {
nonReentrant
returns (ITaikoInbox.BatchInfo memory info_, ITaikoInbox.BatchMetadata memory meta_)
{
ITaikoInbox inbox = ITaikoInbox(resolve(LibStrings.B_TAIKO, false));
ITaikoInbox inbox = ITaikoInbox(resolveAddress(LibStrings.B_TAIKO, false));
(info_, meta_) = inbox.proposeBatch(_params, _txList);

// Process the next forced inclusion.
IForcedInclusionStore store =
IForcedInclusionStore(resolve(LibStrings.B_FORCED_INCLUSION_STORE, false));
IForcedInclusionStore(resolveAddress(LibStrings.B_FORCED_INCLUSION_STORE, false));

IForcedInclusionStore.ForcedInclusion memory inclusion =
store.consumeForcedInclusion(msg.sender);
Expand Down
11 changes: 0 additions & 11 deletions packages/protocol/contracts/layer1/based/IFork.sol

This file was deleted.

11 changes: 7 additions & 4 deletions packages/protocol/contracts/layer1/based/ITaikoInbox.sol
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ interface ITaikoInbox {
uint32 blobByteOffset;
uint32 blobByteSize;
uint32 gasLimit;
uint64 lastBlockId;
uint64 lastBlockTimestamp;
// Data for the L2 anchor transaction, shared by all blocks in the batch
uint64 anchorBlockId;
// corresponds to the `_anchorStateRoot` parameter in the anchor transaction.
Expand Down Expand Up @@ -187,7 +189,7 @@ interface ITaikoInbox {
uint256 batchId_mod_batchRingBufferSize
=> mapping(uint24 transitionId => TransitionState ts)
) transitions;
bytes32 __reserve1; // Used as a ring buffer for Ether deposits
bytes32 __reserve1; // slot 4 - was used as a ring buffer for Ether deposits
Stats1 stats1; // slot 5
Stats2 stats2; // slot 6
mapping(address account => uint256 bond) bondBalance;
Expand Down Expand Up @@ -264,6 +266,7 @@ interface ITaikoInbox {
error CustomProposerMissing();
error CustomProposerNotAllowed();
error EtherNotPaidAsBond();
error ForkNotActivated();
error InsufficientBond();
error InvalidBlobParams();
error InvalidGenesisBlockHash();
Expand Down Expand Up @@ -344,7 +347,7 @@ interface ITaikoInbox {
/// @param _batchId The batch ID.
/// @param _tid The transition ID.
/// @return The specified transition state.
function getTransition(
function getTransitionById(
uint64 _batchId,
uint24 _tid
)
Expand All @@ -357,7 +360,7 @@ interface ITaikoInbox {
/// @param _batchId The batch ID.
/// @param _parentHash The parent hash.
/// @return The specified transition state.
function getTransition(
function getTransitionByParentHash(
uint64 _batchId,
bytes32 _parentHash
)
Expand Down Expand Up @@ -393,5 +396,5 @@ interface ITaikoInbox {

/// @notice Retrieves the current protocol configuration.
/// @return The current configuration.
function getConfig() external view returns (Config memory);
function pacayaConfig() external view returns (Config memory);
}
Loading

0 comments on commit 8fc98eb

Please sign in to comment.