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

fix(protocol): rename treasure to treasury #13780

Merged
merged 4 commits into from
May 18, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion packages/eventindexer/contracts/taikol1/TaikoL1.go

Large diffs are not rendered by default.

1,034 changes: 517 additions & 517 deletions packages/fork-diff/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/protocol/contracts/L1/TaikoData.sol
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ library TaikoData {
uint32 gasLimit;
address beneficiary;
uint8 cacheTxListInfo;
address treasure;
address treasury;
TaikoData.EthDeposit[] depositsProcessed;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/protocol/contracts/L1/libs/LibProposing.sol
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ library LibProposing {
meta.txListByteEnd = input.txListByteEnd;
meta.gasLimit = input.gasLimit;
meta.beneficiary = input.beneficiary;
meta.treasure = resolver.resolve(config.chainId, "treasure", false);
meta.treasury = resolver.resolve(config.chainId, "treasury", false);
meta.cacheTxListInfo = cacheTxListInfo;

(meta.depositsRoot, meta.depositsProcessed) =
Expand Down
2 changes: 1 addition & 1 deletion packages/protocol/contracts/L1/libs/LibUtils.sol
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ library LibUtils {
| (uint256(meta.gasLimit) << 176) | (uint256(uint160(meta.beneficiary)) << 16)
| (uint256(meta.cacheTxListInfo) << 8);

inputs[6] = (uint256(uint160(meta.treasure)) << 96);
inputs[6] = (uint256(uint160(meta.treasury)) << 96);

// Ignoring `meta.depositsProcessed` as `meta.depositsRoot`
// is a hash of it.
Expand Down
2 changes: 1 addition & 1 deletion packages/protocol/contracts/L2/TaikoL2.sol
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ contract TaikoL2 is EssentialContract, TaikoL2Signer, ICrossChainSync {
);
}

// On L2, basefee is not burnt, but sent to a treasure instead.
// On L2, basefee is not burnt, but sent to a treasury instead.
// The circuits will need to verify the basefee recipient is the designated
// address.
if (block.basefee != basefee) {
Expand Down
2 changes: 1 addition & 1 deletion packages/protocol/docs/L2EIP1559.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## The overall design

The EIP-1559 base fee per gas (basefee) on Taiko L2 is calculated by Taiko L1 protocol contracts and injected into the block's metadata. The Taiko client should skip calculating the basefee value, and stop burning the basefee, and send it to a named address ("treasure") specified in Taiko L1 protocol contracts, which will be verified by Taiko ZKP.
The EIP-1559 base fee per gas (basefee) on Taiko L2 is calculated by Taiko L1 protocol contracts and injected into the block's metadata. The Taiko client should skip calculating the basefee value, and stop burning the basefee, and send it to a named address ("treasury") specified in Taiko L1 protocol contracts, which will be verified by Taiko ZKP.

## Basefee Calculation

Expand Down
6 changes: 3 additions & 3 deletions packages/protocol/script/DeployOnL1.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ contract DeployOnL1 is Script {

address public sharedSignalService = vm.envAddress("SHARED_SIGNAL_SERVICE");

address public treasure = vm.envAddress("TREASURE");
address public treasury = vm.envAddress("TREASURE");
dantaik marked this conversation as resolved.
Show resolved Hide resolved

address public taikoTokenPremintRecipient = vm.envAddress("TAIKO_TOKEN_PREMINT_RECIPIENT");

Expand All @@ -61,7 +61,7 @@ contract DeployOnL1 is Script {
require(owner != address(0), "owner is zero");
require(taikoL2Address != address(0), "taikoL2Address is zero");
require(l2SignalService != address(0), "l2SignalService is zero");
require(treasure != address(0), "treasure is zero");
require(treasury != address(0), "treasury is zero");
require(taikoTokenPremintRecipient != address(0), "taikoTokenPremintRecipient is zero");
require(taikoTokenPremintAmount < type(uint64).max, "premint too large");

Expand All @@ -82,7 +82,7 @@ contract DeployOnL1 is Script {
setAddress(l2ChainId, "signal_service", l2SignalService);
setAddress("oracle_prover", oracleProver);
setAddress("system_prover", systemProver);
setAddress(l2ChainId, "treasure", treasure);
setAddress(l2ChainId, "treasury", treasury);

// TaikoToken
TaikoToken taikoToken = new ProxiedTaikoToken();
Expand Down
4 changes: 2 additions & 2 deletions packages/protocol/test/GasComparison.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ contract FooBar {
l1Height: 1,
l1Hash: bytes32(uint256(1)),
beneficiary: address(this),
treasure: address(this),
treasury: address(this),
txListHash: bytes32(uint256(1)),
txListByteStart: 0,
txListByteEnd: 1000,
Expand All @@ -96,7 +96,7 @@ contract FooBar {
l1Height: 1,
l1Hash: bytes32(uint256(1)),
beneficiary: address(this),
treasure: address(this),
treasury: address(this),
txListHash: bytes32(uint256(1)),
txListByteStart: 0,
txListByteEnd: 1000,
Expand Down
4 changes: 2 additions & 2 deletions packages/protocol/test/TaikoL1TestBase.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ abstract contract TaikoL1TestBase is Test {

registerAddress("signal_service", address(ss));
registerAddress("ether_vault", address(L1EthVault));
registerL2Address("treasure", L2Treasure);
registerL2Address("treasury", L2Treasure);
registerL2Address("taiko", address(TaikoL2));
registerL2Address("signal_service", address(L2SS));
registerL2Address("taiko_l2", address(TaikoL2));
Expand Down Expand Up @@ -130,7 +130,7 @@ abstract contract TaikoL1TestBase is Test {
meta.txListByteEnd = txListSize;
meta.gasLimit = gasLimit;
meta.beneficiary = proposer;
meta.treasure = L2Treasure;
meta.treasury = L2Treasure;

vm.prank(proposer, proposer);
meta = L1.proposeBlock(abi.encode(input), txList);
Expand Down
4 changes: 2 additions & 2 deletions packages/relayer/TaikoL1.json
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@
},
{
"internalType": "address",
"name": "treasure",
"name": "treasury",
"type": "address"
},
{
Expand Down Expand Up @@ -1008,7 +1008,7 @@
},
{
"internalType": "address",
"name": "treasure",
"name": "treasury",
"type": "address"
},
{
Expand Down
2 changes: 1 addition & 1 deletion packages/relayer/contracts/taikol1/TaikoL1.go

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions packages/status-page/src/constants/abi/TaikoL1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ export default [
},
{
internalType: "address",
name: "treasure",
name: "treasury",
type: "address",
},
{
Expand Down Expand Up @@ -907,7 +907,7 @@ export default [
},
{
internalType: "address",
name: "treasure",
name: "treasury",
type: "address",
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ struct BlockMetadata {
uint32 gasLimit;
address beneficiary;
uint8 cacheTxListInfo;
address treasure;
address treasury;
struct TaikoData.EthDeposit[] depositsProcessed;
}
```
Expand Down