Skip to content

Commit

Permalink
deploy sendtagcheckout to base sepolia (#619)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xBigBoss authored Jul 24, 2024
1 parent b7dd9ed commit e1744fc
Show file tree
Hide file tree
Showing 8 changed files with 157 additions and 57 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
{
"transactions": [
{
"hash": "0xaa39d3d40a0ffa9138ea1ee3dd524c318320ba575415bdecaa252c1ca7787e7e",
"transactionType": "CREATE2",
"contractName": "SendtagCheckout",
"contractAddress": "0x0bd9297334a23de53b865c503ee874d923892cca",
"function": null,
"arguments": [
"0x269cD0a2afd1BAbdA7A74ab1dC853869a37aa4a7",
"0x036CbD53842c5426634e7929541eC2318f3dCF7e",
"0xfB00d9CDA6DaD99994849d7C66Fa2631f280F64f"
],
"transaction": {
"from": "0xfb00d9cda6dad99994849d7c66fa2631f280f64f",
"to": "0x4e59b44847b379578588920ca78fbf26c0b4956c",
"gas": "0xfee84",
"value": "0x0",
"input": "0x000000000000000000000000000000000000000000000000000000000000000060c060405234801561001057600080fd5b50604051610de3380380610de383398101604081905261002f916101ef565b806001600160a01b03811661005f57604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b61006881610187565b506001600160a01b0383166100bf5760405162461bcd60e51b815260206004820152601d60248201527f496e76616c69642053656e64204d756c746973696720616464726573730000006044820152606401610056565b6001600160a01b0382166101155760405162461bcd60e51b815260206004820152601560248201527f496e76616c696420746f6b656e206164647265737300000000000000000000006044820152606401610056565b6001600160a01b03808316608052831660a0526000805460ff60a01b1916600160a01b908117918290556040517f1caf761158ed03726081542723d54a061f9d0ccb46171af1a220d059a66c71539261017792900460ff161515815260200190565b60405180910390a150505061023c565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811681146101ec57600080fd5b50565b60008060006060848603121561020457600080fd5b835161020f816101d7565b6020850151909350610220816101d7565b6040850151909250610231816101d7565b809150509250925092565b60805160a051610b6761027c6000396000818160d201526104ec01526000818161018a01528181610387015281816104a001526104cb0152610b676000f3fe608060405234801561001057600080fd5b50600436106100be5760003560e01c80639e281a9811610076578063f2fde38b1161005b578063f2fde38b14610172578063fc0c546a14610185578063fcfff16f146101ac57600080fd5b80639e281a9814610157578063e086e5ec1461016a57600080fd5b8063715018a6116100a7578063715018a61461011e5780637a53a6db146101265780638da5cb5b1461013957600080fd5b806340a3d246146100c35780634783c35b146100cd575b600080fd5b6100cb6101e1565b005b6100f47f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6100cb61027b565b6100cb610134366004610a25565b61028f565b60005473ffffffffffffffffffffffffffffffffffffffff166100f4565b6100cb610165366004610a5d565b610577565b6100cb61058e565b6100cb610180366004610a89565b6105c5565b6100f47f000000000000000000000000000000000000000000000000000000000000000081565b6000546101d19074010000000000000000000000000000000000000000900460ff1681565b6040519015158152602001610115565b6101e9610626565b6000805460ff7401000000000000000000000000000000000000000080830482161581027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff90931692909217928390556040517f1caf761158ed03726081542723d54a061f9d0ccb46171af1a220d059a66c7153936102719390049091161515815260200190565b60405180910390a1565b610283610626565b61028d6000610679565b565b60005474010000000000000000000000000000000000000000900460ff16610318576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f436c6f736564000000000000000000000000000000000000000000000000000060448201526064015b60405180910390fd5b60008311610382576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f496e76616c696420616d6f756e74000000000000000000000000000000000000604482015260640161030f565b6103ae7f00000000000000000000000000000000000000000000000000000000000000003330866106ee565b80156104c65773ffffffffffffffffffffffffffffffffffffffff8216610431576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f496e76616c696420726566657272657220616464726573730000000000000000604482015260640161030f565b8281111561049b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f496e76616c696420726566657272657220726577617264000000000000000000604482015260640161030f565b6104c67f0000000000000000000000000000000000000000000000000000000000000000838361077d565b61051a7f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006105158487610aa6565b61077d565b6040805184815273ffffffffffffffffffffffffffffffffffffffff8416602082015290810182905233907f7e13a4603bf96047c8756065bf8f579579952471ddeaf284bcd8f26996cddcda9060600160405180910390a2505050565b61057f610626565b61058a82338361077d565b5050565b610596610626565b60405133904780156108fc02916000818181858888f193505050501580156105c2573d6000803e3d6000fd5b50565b6105cd610626565b73ffffffffffffffffffffffffffffffffffffffff811661061d576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526000600482015260240161030f565b6105c281610679565b60005473ffffffffffffffffffffffffffffffffffffffff16331461028d576040517f118cdaa700000000000000000000000000000000000000000000000000000000815233600482015260240161030f565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60405173ffffffffffffffffffffffffffffffffffffffff84811660248301528381166044830152606482018390526107779186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506107c0565b50505050565b60405173ffffffffffffffffffffffffffffffffffffffff8381166024830152604482018390526107bb91859182169063a9059cbb90606401610730565b505050565b60006107e273ffffffffffffffffffffffffffffffffffffffff841683610856565b905080516000141580156108075750808060200190518101906108059190610ae0565b155b156107bb576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8416600482015260240161030f565b60606108648383600061086d565b90505b92915050565b6060814710156108ab576040517fcd78605900000000000000000000000000000000000000000000000000000000815230600482015260240161030f565b6000808573ffffffffffffffffffffffffffffffffffffffff1684866040516108d49190610b02565b60006040518083038185875af1925050503d8060008114610911576040519150601f19603f3d011682016040523d82523d6000602084013e610916565b606091505b5091509150610926868383610932565b925050505b9392505050565b60608261094757610942826109c1565b61092b565b815115801561096b575073ffffffffffffffffffffffffffffffffffffffff84163b155b156109ba576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8516600482015260240161030f565b508061092b565b8051156109d15780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff811681146105c257600080fd5b600080600060608486031215610a3a57600080fd5b833592506020840135610a4c81610a03565b929592945050506040919091013590565b60008060408385031215610a7057600080fd5b8235610a7b81610a03565b946020939093013593505050565b600060208284031215610a9b57600080fd5b813561092b81610a03565b81810381811115610867577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600060208284031215610af257600080fd5b8151801515811461092b57600080fd5b6000825160005b81811015610b235760208186018101518583015201610b09565b50600092019182525091905056fea2646970667358221220c49fb97760f31bcc44d9cc2d48216fcf02ee27f249a11e15b9854d10ea58342264736f6c63430008170033000000000000000000000000269cd0a2afd1babda7a74ab1dc853869a37aa4a7000000000000000000000000036cbd53842c5426634e7929541ec2318f3dcf7e000000000000000000000000fb00d9cda6dad99994849d7c66fa2631f280f64f",
"nonce": "0x3d",
"chainId": "0x14a34"
},
"additionalContracts": [],
"isFixedGasLimit": false
}
],
"receipts": [
{
"status": "0x1",
"cumulativeGasUsed": "0x24bcaa",
"logs": [
{
"address": "0x0bd9297334a23de53b865c503ee874d923892cca",
"topics": [
"0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x000000000000000000000000fb00d9cda6dad99994849d7c66fa2631f280f64f"
],
"data": "0x",
"blockHash": "0xe3f9e7176ab4ea4c93f71f3cf79280467043273807cbe07c7d47a446237d09d1",
"blockNumber": "0xc6ca92",
"transactionHash": "0xaa39d3d40a0ffa9138ea1ee3dd524c318320ba575415bdecaa252c1ca7787e7e",
"transactionIndex": "0x5",
"logIndex": "0x2d",
"removed": false
},
{
"address": "0x0bd9297334a23de53b865c503ee874d923892cca",
"topics": [
"0x1caf761158ed03726081542723d54a061f9d0ccb46171af1a220d059a66c7153"
],
"data": "0x0000000000000000000000000000000000000000000000000000000000000001",
"blockHash": "0xe3f9e7176ab4ea4c93f71f3cf79280467043273807cbe07c7d47a446237d09d1",
"blockNumber": "0xc6ca92",
"transactionHash": "0xaa39d3d40a0ffa9138ea1ee3dd524c318320ba575415bdecaa252c1ca7787e7e",
"transactionIndex": "0x5",
"logIndex": "0x2e",
"removed": false
}
],
"logsBloom": "0x00000000000000000000000000000000000000000000000000800000080000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000002000200001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004400060000000000000000000000000000000000000000000400000000000000020000000000000000000000000000000000000000000000000000000000000000000",
"type": "0x2",
"transactionHash": "0xaa39d3d40a0ffa9138ea1ee3dd524c318320ba575415bdecaa252c1ca7787e7e",
"transactionIndex": "0x5",
"blockHash": "0xe3f9e7176ab4ea4c93f71f3cf79280467043273807cbe07c7d47a446237d09d1",
"blockNumber": "0xc6ca92",
"gasUsed": "0xae5a1",
"effectiveGasPrice": "0xe843c098",
"from": "0xfb00d9cda6dad99994849d7c66fa2631f280f64f",
"to": "0x4e59b44847b379578588920ca78fbf26c0b4956c",
"contractAddress": "0x0bd9297334a23de53b865c503ee874d923892cca",
"l1BaseFeeScalar": "0x44d",
"l1BlobBaseFee": "0x71129411d08",
"l1BlobBaseFeeScalar": "0xa118b",
"l1Fee": "0x218b06e15659bb",
"l1GasPrice": "0x8b3b01278",
"l1GasUsed": "0x7313"
}
],
"libraries": [],
"pending": [],
"returns": {
"0": {
"internal_type": "contract SendtagCheckout",
"value": "0x0bD9297334a23De53b865c503Ee874d923892ccA"
}
},
"timestamp": 1721824282,
"chain": 84532,
"commit": "b7dd9ed6"
}
8 changes: 5 additions & 3 deletions packages/contracts/script/DeploySendtagCheckout.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,16 @@ contract DeploySendtagCheckoutScript is Script, Helper {
function run() external returns (SendtagCheckout) {
address multisig = vm.envAddress("MULTISIG");
IERC20 token = IERC20(vm.envAddress("TOKEN"));
address owner = vm.envAddress("OWNER");
require(multisig != address(0), "MULTISIG not set");
require(token != IERC20(address(0)), "TOKEN not set");
return this.deploy(multisig, token);
require(owner != address(0), "OWNER not set");
return this.deploy(multisig, token, owner);
}

function deploy(address multisig, IERC20 token) external returns (SendtagCheckout) {
function deploy(address multisig, IERC20 token, address owner) external returns (SendtagCheckout) {
vm.startBroadcast();
SendtagCheckout sendtagCheckout = new SendtagCheckout{salt: 0}(multisig, token);
SendtagCheckout sendtagCheckout = new SendtagCheckout{salt: 0}(multisig, token, owner);
vm.stopBroadcast();
return sendtagCheckout;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/contracts/src/SendtagCheckout.sol
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ contract SendtagCheckout is Ownable {
/// @notice The event emitted when the contract is toggled.
event Toggled(bool open);

constructor(address _sendRevenuesMultisig, IERC20 _token) Ownable(msg.sender) {
constructor(address _sendRevenuesMultisig, IERC20 _token, address _owner) Ownable(_owner) {
require(_sendRevenuesMultisig != address(0), "Invalid Send Multisig address");
require(address(_token) != address(0), "Invalid token address");
token = _token;
Expand Down
3 changes: 3 additions & 0 deletions packages/contracts/test/DeploySendtagCheckout.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,13 @@ contract DeploySendtagCheckoutTest is Test, Helper {
DeploySendtagCheckoutScript script = new DeploySendtagCheckoutScript();
address multisig = address(SEND_REVENUE_SAFE);
address token = address(0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913);
address owner = address(0xB055);
vm.setEnv("MULTISIG", vm.toString(SEND_REVENUE_SAFE));
vm.setEnv("TOKEN", vm.toString(token));
vm.setEnv("OWNER", vm.toString(owner));
SendtagCheckout sc = script.run();
assertEq(sc.multisig(), multisig);
assertEq(address(sc.token()), token);
assertEq(sc.owner(), owner);
}
}
2 changes: 1 addition & 1 deletion packages/contracts/test/SendtagCheckout.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ contract SendtagCheckoutTest is Test {
multisig = address(0x1337);
owner = address(0xB055);
vm.startPrank(owner);
checkout = new SendtagCheckout(multisig, token);
checkout = new SendtagCheckout(multisig, token, owner);
vm.stopPrank();
}

Expand Down
3 changes: 2 additions & 1 deletion packages/shovel/etc/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,8 @@
"column": "log_addr",
"filter_op": "contains",
"filter_arg": [
"0xfC1e51BBae1C1Ee9e6Cc629ea0023329EA5023a6"
"0x0bD9297334a23De53b865c503Ee874d923892ccA",
"0x3936f906910C0f74b6d1536614068368B94CDa85"
]
}
],
Expand Down
3 changes: 2 additions & 1 deletion packages/shovel/test/__snapshots__/index.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,8 @@ exports[`shovel config 1`] = `
{
"column": "log_addr",
"filter_arg": [
"0xfC1e51BBae1C1Ee9e6Cc629ea0023329EA5023a6",
"0x0bD9297334a23De53b865c503Ee874d923892ccA",
"0x3936f906910C0f74b6d1536614068368B94CDa85",
],
"filter_op": "contains",
"name": "log_addr",
Expand Down
Loading

0 comments on commit e1744fc

Please sign in to comment.