Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[evm] feat: base sepolia spoke deploy #240

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"transactions": [
{
"hash": "0x77068a365be38cec67b2ad6f22cd6934515a8e062493cf84fbb71f633090140c",
"transactionType": "CALL",
"contractName": null,
"contractAddress": "0x12fb7f85dea3a3f83018e4a647dc8b0456df9b39",
"function": "mint(address,uint256)",
"arguments": [
"0xf87C6e6C67279B5c5D61797d2700bA8a1b4cd556",
"10000000000000000000000000"
],
"transaction": {
"from": "0x9836c4edd97fec117bfb5a33ab46ef8dd965ad1c",
"to": "0x12fb7f85dea3a3f83018e4a647dc8b0456df9b39",
"gas": "0x27bd8",
"value": "0x0",
"input": "0x40c10f19000000000000000000000000f87c6e6c67279b5c5d61797d2700ba8a1b4cd556000000000000000000000000000000000000000000084595161401484a000000",
"nonce": "0xb",
"chainId": "0x14a34"
},
"additionalContracts": [],
"isFixedGasLimit": false
}
],
"receipts": [
{
"status": "0x1",
"cumulativeGasUsed": "0x42d477",
"logs": [
{
"address": "0x12fb7f85dea3a3f83018e4a647dc8b0456df9b39",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x000000000000000000000000f87c6e6c67279b5c5d61797d2700ba8a1b4cd556"
],
"data": "0x000000000000000000000000000000000000000000084595161401484a000000",
"blockHash": "0x3e7ab14b25ffd4b554b597c8e0b5c28aab75631eeabacfbe9b052dfe4365e19f",
"blockNumber": "0x14c2225",
"transactionHash": "0x77068a365be38cec67b2ad6f22cd6934515a8e062493cf84fbb71f633090140c",
"transactionIndex": "0x20",
"logIndex": "0x5a",
"removed": false
}
],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000008000000000000000000000000000000000000000000000000020000000000000000000800000000000000000000000010000002000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000002000000000000000100000000000000000000000000000000000020000000008000000000000000000000000000000000000000000000000000000000",
"type": "0x2",
"transactionHash": "0x77068a365be38cec67b2ad6f22cd6934515a8e062493cf84fbb71f633090140c",
"transactionIndex": "0x20",
"blockHash": "0x3e7ab14b25ffd4b554b597c8e0b5c28aab75631eeabacfbe9b052dfe4365e19f",
"blockNumber": "0x14c2225",
"gasUsed": "0x1cc58",
"effectiveGasPrice": "0xece77",
"from": "0x9836c4edd97fec117bfb5a33ab46ef8dd965ad1c",
"to": "0x12fb7f85dea3a3f83018e4a647dc8b0456df9b39",
"contractAddress": null,
"l1BaseFeeScalar": "0x44d",
"l1BlobBaseFee": "0x1",
"l1BlobBaseFeeScalar": "0xa118b",
"l1Fee": "0xf8a32cd9",
"l1GasPrice": "0x8d249792",
"l1GasUsed": "0x640"
}
],
"libraries": [],
"pending": [],
"returns": {},
"timestamp": 1739301675,
"chain": 84532,
"commit": "52a21908"
}
72 changes: 72 additions & 0 deletions evm/broadcast/MintVotingTokenBaseSepolia.sol/84532/run-latest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"transactions": [
{
"hash": "0x77068a365be38cec67b2ad6f22cd6934515a8e062493cf84fbb71f633090140c",
"transactionType": "CALL",
"contractName": null,
"contractAddress": "0x12fb7f85dea3a3f83018e4a647dc8b0456df9b39",
"function": "mint(address,uint256)",
"arguments": [
"0xf87C6e6C67279B5c5D61797d2700bA8a1b4cd556",
"10000000000000000000000000"
],
"transaction": {
"from": "0x9836c4edd97fec117bfb5a33ab46ef8dd965ad1c",
"to": "0x12fb7f85dea3a3f83018e4a647dc8b0456df9b39",
"gas": "0x27bd8",
"value": "0x0",
"input": "0x40c10f19000000000000000000000000f87c6e6c67279b5c5d61797d2700ba8a1b4cd556000000000000000000000000000000000000000000084595161401484a000000",
"nonce": "0xb",
"chainId": "0x14a34"
},
"additionalContracts": [],
"isFixedGasLimit": false
}
],
"receipts": [
{
"status": "0x1",
"cumulativeGasUsed": "0x42d477",
"logs": [
{
"address": "0x12fb7f85dea3a3f83018e4a647dc8b0456df9b39",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x000000000000000000000000f87c6e6c67279b5c5d61797d2700ba8a1b4cd556"
],
"data": "0x000000000000000000000000000000000000000000084595161401484a000000",
"blockHash": "0x3e7ab14b25ffd4b554b597c8e0b5c28aab75631eeabacfbe9b052dfe4365e19f",
"blockNumber": "0x14c2225",
"transactionHash": "0x77068a365be38cec67b2ad6f22cd6934515a8e062493cf84fbb71f633090140c",
"transactionIndex": "0x20",
"logIndex": "0x5a",
"removed": false
}
],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000008000000000000000000000000000000000000000000000000020000000000000000000800000000000000000000000010000002000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000002000000000000000100000000000000000000000000000000000020000000008000000000000000000000000000000000000000000000000000000000",
"type": "0x2",
"transactionHash": "0x77068a365be38cec67b2ad6f22cd6934515a8e062493cf84fbb71f633090140c",
"transactionIndex": "0x20",
"blockHash": "0x3e7ab14b25ffd4b554b597c8e0b5c28aab75631eeabacfbe9b052dfe4365e19f",
"blockNumber": "0x14c2225",
"gasUsed": "0x1cc58",
"effectiveGasPrice": "0xece77",
"from": "0x9836c4edd97fec117bfb5a33ab46ef8dd965ad1c",
"to": "0x12fb7f85dea3a3f83018e4a647dc8b0456df9b39",
"contractAddress": null,
"l1BaseFeeScalar": "0x44d",
"l1BlobBaseFee": "0x1",
"l1BlobBaseFeeScalar": "0xa118b",
"l1Fee": "0xf8a32cd9",
"l1GasPrice": "0x8d249792",
"l1GasUsed": "0x640"
}
],
"libraries": [],
"pending": [],
"returns": {},
"timestamp": 1739301675,
"chain": 84532,
"commit": "52a21908"
}
18 changes: 18 additions & 0 deletions evm/script/DeploySpokeContractsBaseSepolia.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// SPDX-License-Identifier: Apache 2
pragma solidity ^0.8.23;

import {DeploySpokeContractsBaseImpl} from "script/DeploySpokeContractsBaseImpl.sol";

contract DeploySpokeContractsBaseSepolia is DeploySpokeContractsBaseImpl {
function _getDeploymentConfiguration() internal pure override returns (DeploymentConfiguration memory) {
return DeploymentConfiguration({
wormholeCore: 0x79A1027a6A159502049F10906D333EC57E95F083, // Base Sepolia Wormhole Core
hubChainId: 10_002, // Sepolia hub chain ID
hubProposalMetadata: 0x1A3E5624769C3Dc9106347A239523e4A08d85C38,
votingToken: 0x12Fb7f85dea3A3F83018E4A647dC8B0456dF9B39,
voteWeightWindow: 10 minutes,
hubDispatcher: bytes32(uint256(uint160(0x27E445Be20889F0e6DDD30372842E6c183D3648B))),
spokeChainId: 10_004 // Base Sepolia Wormhole chain ID
});
}
}
19 changes: 19 additions & 0 deletions evm/script/DeployVotingTokenBaseSepolia.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// SPDX-License-Identifier: Apache 2
pragma solidity ^0.8.23;

import {Script} from "forge-std/Script.sol";
import {ERC20VotesFake} from "test/fakes/ERC20VotesFake.sol";

contract DeployVotingTokenBaseSepolia is Script {
function run() public returns (address) {
uint256 deployerPrivateKey = vm.envUint("DEPLOYER_PRIVATE_KEY");

vm.startBroadcast(deployerPrivateKey);

ERC20VotesFake token = new ERC20VotesFake();

vm.stopBroadcast();

return address(token);
}
}
19 changes: 19 additions & 0 deletions evm/script/MintVotingTokenBaseSepolia.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// SPDX-License-Identifier: Apache 2
pragma solidity ^0.8.23;

import {Script} from "forge-std/Script.sol";
import {ERC20Mock} from "@openzeppelin/contracts/mocks/token/ERC20Mock.sol";

contract MintVotingTokenBaseSepolia is Script {
function run(address recipient) public {
uint256 deployerPrivateKey = vm.envUint("DEPLOYER_PRIVATE_KEY");
address token = 0x12Fb7f85dea3A3F83018E4A647dC8B0456dF9B39;
uint208 amount = uint208(10_000_000 * 10 ** 18); // 10M tokens

vm.startBroadcast(deployerPrivateKey);

ERC20Mock(token).mint(recipient, amount);

vm.stopBroadcast();
}
}