Skip to content

Commit

Permalink
Merge pull request #11 from halo3mic/dencun_update
Browse files Browse the repository at this point in the history
Dencun update
  • Loading branch information
halo3mic authored Feb 25, 2024
2 parents 6eee5b2 + 5a4ac3a commit b69ab63
Show file tree
Hide file tree
Showing 12 changed files with 172 additions and 16 deletions.
5 changes: 5 additions & 0 deletions abi/contracts/blockad/BlockAdV1.sol/BlockAdAuctionV1.json
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,11 @@
"name": "extra",
"type": "bytes"
},
{
"internalType": "bytes32",
"name": "parentBeaconBlockRoot",
"type": "bytes32"
},
{
"internalType": "bool",
"name": "fillPending",
Expand Down
5 changes: 5 additions & 0 deletions abi/contracts/blockad/BlockAdV2.sol/BlockAdAuctionV2.json
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,11 @@
"name": "extra",
"type": "bytes"
},
{
"internalType": "bytes32",
"name": "parentBeaconBlockRoot",
"type": "bytes32"
},
{
"internalType": "bool",
"name": "fillPending",
Expand Down
20 changes: 20 additions & 0 deletions abi/contracts/blockad/lib/Builder.sol/Builder.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,11 @@
"name": "extra",
"type": "bytes"
},
{
"internalType": "bytes32",
"name": "parentBeaconBlockRoot",
"type": "bytes32"
},
{
"internalType": "bool",
"name": "fillPending",
Expand Down Expand Up @@ -313,6 +318,11 @@
"name": "extra",
"type": "bytes"
},
{
"internalType": "bytes32",
"name": "parentBeaconBlockRoot",
"type": "bytes32"
},
{
"internalType": "bool",
"name": "fillPending",
Expand Down Expand Up @@ -411,6 +421,11 @@
"name": "extra",
"type": "bytes"
},
{
"internalType": "bytes32",
"name": "parentBeaconBlockRoot",
"type": "bytes32"
},
{
"internalType": "bool",
"name": "fillPending",
Expand Down Expand Up @@ -509,6 +524,11 @@
"name": "extra",
"type": "bytes"
},
{
"internalType": "bytes32",
"name": "parentBeaconBlockRoot",
"type": "bytes32"
},
{
"internalType": "bool",
"name": "fillPending",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@
"name": "extra",
"type": "bytes"
},
{
"internalType": "bytes32",
"name": "parentBeaconBlockRoot",
"type": "bytes32"
},
{
"internalType": "bool",
"name": "fillPending",
Expand Down Expand Up @@ -249,6 +254,11 @@
"name": "extra",
"type": "bytes"
},
{
"internalType": "bytes32",
"name": "parentBeaconBlockRoot",
"type": "bytes32"
},
{
"internalType": "bool",
"name": "fillPending",
Expand Down Expand Up @@ -347,6 +357,11 @@
"name": "extra",
"type": "bytes"
},
{
"internalType": "bytes32",
"name": "parentBeaconBlockRoot",
"type": "bytes32"
},
{
"internalType": "bool",
"name": "fillPending",
Expand Down Expand Up @@ -445,6 +460,11 @@
"name": "extra",
"type": "bytes"
},
{
"internalType": "bytes32",
"name": "parentBeaconBlockRoot",
"type": "bytes32"
},
{
"internalType": "bool",
"name": "fillPending",
Expand Down
20 changes: 20 additions & 0 deletions abi/contracts/standard_peekers/bids.sol/EthBlockContract.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,11 @@
"name": "extra",
"type": "bytes"
},
{
"internalType": "bytes32",
"name": "parentBeaconBlockRoot",
"type": "bytes32"
},
{
"internalType": "bool",
"name": "fillPending",
Expand Down Expand Up @@ -238,6 +243,11 @@
"name": "extra",
"type": "bytes"
},
{
"internalType": "bytes32",
"name": "parentBeaconBlockRoot",
"type": "bytes32"
},
{
"internalType": "bool",
"name": "fillPending",
Expand Down Expand Up @@ -336,6 +346,11 @@
"name": "extra",
"type": "bytes"
},
{
"internalType": "bytes32",
"name": "parentBeaconBlockRoot",
"type": "bytes32"
},
{
"internalType": "bool",
"name": "fillPending",
Expand Down Expand Up @@ -434,6 +449,11 @@
"name": "extra",
"type": "bytes"
},
{
"internalType": "bytes32",
"name": "parentBeaconBlockRoot",
"type": "bytes32"
},
{
"internalType": "bool",
"name": "fillPending",
Expand Down
7 changes: 7 additions & 0 deletions abi/solady/src/utils/JSONParserLib.sol/JSONParserLib.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[
{
"inputs": [],
"name": "ParsingFailed",
"type": "error"
}
]
12 changes: 12 additions & 0 deletions abi/solady/src/utils/LibString.sol/LibString.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[
{
"inputs": [],
"name": "HexLengthInsufficient",
"type": "error"
},
{
"inputs": [],
"name": "TooBigForSmallString",
"type": "error"
}
]
1 change: 1 addition & 0 deletions contracts/libraries/Suave.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ library Suave {
bytes32 random;
Withdrawal[] withdrawals;
bytes extra;
bytes32 parentBeaconBlockRoot;
bool fillPending;
}

Expand Down
31 changes: 18 additions & 13 deletions deployments/rigil/BlockAdAuctionV2.json

Large diffs are not rendered by default.

56 changes: 56 additions & 0 deletions deployments/rigil/solcInputs/2c77e4990a5e02143cdaa02b8820ef1d.json

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions tasks/build-blocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ function makeCalldata(
iface?: ethers.utils.Interface,
method?: string
) {
const fillPending = true
const fillPending = false
const blockArgs = [
bbArgs.slot,
bbArgs.proposerPubkey,
Expand All @@ -171,6 +171,7 @@ function makeCalldata(
bbArgs.random,
bbArgs.withdrawals.map(w => [ w.index, w.validator, w.address, w.amount ]),
ethers.constants.HashZero,
bbArgs.parentBeaconBlockRoot,
fillPending,
]
if (!method)
Expand All @@ -190,6 +191,7 @@ export interface BuildBlockArgs {
gasLimit: number;
random: string;
withdrawals: Withdrawal[];
parentBeaconBlockRoot: string;
}

interface Withdrawal {
Expand Down Expand Up @@ -217,6 +219,7 @@ export function makeBuildBlockArgs(beacon: BeaconEventData, validator: Validator
feeRecipient: validator.feeRecipient,
gasLimit: validator.gasLimit,
proposerPubkey: validator.pubkey,
parentBeaconBlockRoot: beacon.payload_attributes.parent_beacon_block_root,
}

}
Expand All @@ -229,7 +232,7 @@ export interface ITaskConfig {
relayUrl: string,
beaconUrl: string,
buildOpts?: IBuildOptions,
resubmit: boolean,
resubmit?: boolean,
}

async function getConfig(hre: HRE, taskArgs: any): Promise<ITaskConfig> {
Expand Down
4 changes: 3 additions & 1 deletion tasks/utils/beacon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export interface PayloadAttributes {
prev_randao: string;
suggested_fee_recipient: string;
withdrawals: Withdrawal[];
parent_beacon_block_root: string;
}

export interface BeaconEventData {
Expand Down Expand Up @@ -95,7 +96,8 @@ export class BeaconPAListener {
validator_index: Number(w.validator_index),
address: w.address,
amount: Number(w.amount)
}))
})),
parent_beacon_block_root: parsed.data.payload_attributes.parent_beacon_block_root
}
}
}
Expand Down

0 comments on commit b69ab63

Please sign in to comment.