Skip to content

Commit

Permalink
Merge pull request #102 from ronin-chain/merge/merge/deploy/v0.8.1-ma…
Browse files Browse the repository at this point in the history
…innet

chore(`mainnet`): merge from `merge/deploy/v0.8.1-mainnet`
  • Loading branch information
TuDo1403 authored Jun 26, 2024
2 parents 1f10bf0 + ed463dc commit a188a76
Show file tree
Hide file tree
Showing 326 changed files with 23,881 additions and 11,716 deletions.
13 changes: 13 additions & 0 deletions .gas-snapshot
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
LibSortValidatorsByBeaconTest:testConcreteGas_ZeroRV_sortValidatorsByBeacon() (gas: 767210)
LibSortValidatorsByBeaconTest:testConcreteGas_ZeroRV_sortValidatorsByBeaconOld() (gas: 720784)
LibSortValidatorsByBeaconTest:testConcreteGas_ZeroSV_sortValidatorsByBeacon() (gas: 1741436)
LibSortValidatorsByBeaconTest:testConcreteGas_ZeroSV_sortValidatorsByBeaconOld() (gas: 56882990)
LibSortValidatorsByBeaconTest:testConcrete_shouldReplaceHoldSet_whenRequestAgain(uint256) (runs: 261, μ: 297300, ~: 297308)
LibSortValidatorsByBeaconTest:testConcrete_sortValidatorsByBeacon() (gas: 4372966)
LibSortValidatorsByBeaconTest:testConcrete_sortValidatorsByBeaconOld() (gas: 10112328)
LibSortValidatorsByBeaconTest:testFuzzGas_pickValidatorSet(uint256,uint256,uint256) (runs: 261, μ: 176127, ~: 192507)
LibSortValidatorsByBeaconTest:testFuzzGas_pickValidatorSetOld(uint256,uint256) (runs: 261, μ: 17358, ~: 16911)
LibSortValidatorsByBeaconTest:testFuzzGas_sortValidatorsByBeacon(uint256,uint256,uint256) (runs: 261, μ: 1631525, ~: 1734527)
LibSortValidatorsByBeaconTest:testFuzzGas_sortValidatorsByBeaconAndPickValidatorSetOld_ForAllEpochs(uint256,uint256,uint256) (runs: 261, μ: 37507449, ~: 40482178)
LibSortValidatorsByBeaconTest:testFuzzGas_sortValidatorsByBeaconAndPickValidatorSet_ForAllEpochs(uint256,uint256,uint256) (runs: 261, μ: 28011534, ~: 30701818)
LibSortValidatorsByBeaconTest:testFuzzGas_sortValidatorsByBeaconOld(uint256,uint256,uint256) (runs: 261, μ: 36989267, ~: 40030722)
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,10 @@ out

dry-run/
script/data/*
*.env
*.env
logs/temp.log
deployments/**/exported_address
config/config.json
config/config.yaml
dependencies
deployments/ronin-mainnet-shadow
25 changes: 8 additions & 17 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,21 +1,12 @@
[submodule "lib/forge-std"]
path = lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "lib/prb-test"]
branch = release-v0
path = lib/prb-test
url = https://github.com/PaulRBerg/prb-test
[submodule "lib/prb-math"]
path = lib/prb-math
url = https://github.com/PaulRBerg/prb-math
branch = release-v4
[submodule "lib/contract-libs"]
path = lib/contract-libs
url = https://github.com/axieinfinity/contract-libs
[submodule "lib/openzeppelin-contracts"]
path = lib/openzeppelin-contracts
url = https://github.com/OpenZeppelin/openzeppelin-contracts
[submodule "lib/foundry-deployment-kit"]
path = lib/foundry-deployment-kit
url = https://github.com/axieinfinity/foundry-deployment-kit
branch = v0.2.0
[submodule "lib/safe-smart-account"]
path = lib/safe-smart-account
url = https://github.com/safe-global/safe-smart-account
branch = v1.4.1
[submodule "lib/chainlink"]
path = lib/chainlink
url = https://github.com/smartcontractkit/chainlink
branch = v1.6.0
32 changes: 21 additions & 11 deletions .husky/storage-logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,41 @@ fs.readFile(fileIn, 'utf8', (err, data) => {

try {
const jsonData = JSON.parse(data);
if (typeof jsonData.storageLayout == 'undefined' || jsonData.ast.absolutePath == 'undefined') {
return;
}

if (jsonData.storageLayout.storage.length == 0) {
return;
}
if (typeof jsonData.storageLayout == 'undefined') return;
if (jsonData.storageLayout.storage.length == 0) return;

const hasAst = typeof jsonData.ast != 'undefined';

let storageLayout;
if (hasAst) {
const absolutePath = jsonData.ast.absolutePath;
if (typeof absolutePath == 'undefined') return;
if (!absolutePath.startsWith('src')) return;

// Skip generating storage layout for files locate in the directory "src"
if (!jsonData.ast.absolutePath.startsWith('src')) {
return;
storageLayout = jsonData.storageLayout.storage;
} else {
// filter only contracts in src/*
storageLayout = jsonData.storageLayout.storage.filter(({ contract }) =>
contract.startsWith('src')
);
}

const outputData = jsonData.storageLayout.storage
const outputData = storageLayout
.map(({ contract, label, offset, slot, type: typeId }) => {
const typeObj = jsonData.storageLayout.types[typeId];
const typeLabel = typeObj.label;
const numberOfBytes = typeObj.numberOfBytes;
return `${contract}:${label} (storage_slot: ${slot}) (offset: ${offset}) (type: ${typeLabel}) (numberOfBytes: ${numberOfBytes})`;
})
.join('\n');

if (outputData == '') return;

if (!fileOut) {
console.log(outputData);
} else {
fs.writeFile(fileOut, outputData, 'utf-8', err => {
fs.writeFile(fileOut, outputData, 'utf-8', (err) => {
if (err) {
console.error('Error writing file:', err);
return;
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VERSION=v0.8.1 - SHA: 2cb7ce9a8a36239b54d2b54b18a5a62b36b4c885
Binary file added bin/ronin-random-beacon
Binary file not shown.
2 changes: 1 addition & 1 deletion broadcast.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
source lib/foundry-deployment-kit/broadcast.sh
source dependencies/@fdk-0.3.0-beta/broadcast.sh

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,40 @@
{
"transactions": [
{
"hash": "0x22d6c004229c1b6f60779986dfa6c9afdd74accd670e2c13bdac3827c99e4628",
"transactionType": "CALL",
"contractName": null,
"contractAddress": "0x70fD02049333337A534a9383149C9a99DDF65495",
"function": "proposeProposalForCurrentNetwork(uint256,address[],uint256[],bytes[],uint256[],uint8)",
"arguments": [
"1719896988",
"[0xA30B2932CD8b8A89E34551Cdfa13810af38dA576, 0x6F45C1f8d84849D497C6C0Ac4c3842DC82f49894, 0x840EBf1CA767CB690029E91856A357a43B85d035, 0x98D0230884448B3E2f09a177433D60fb1E19C090, 0x617c5d73662282EA7FfD231E020eCa6D2B0D552f, 0xEBFFF2b32fA0dF9C5C8C5d5AAa7e8b51d5207bA3, 0x545edb750eB8769C868429BE9586F5857A768758, 0xC768423A2AE2B5024cB58F3d6449A8f5DB6D8816, 0x617c5d73662282EA7FfD231E020eCa6D2B0D552f]",
"[0, 0, 0, 0, 0, 0, 0, 0, 0]",
"[0x4f1ef286000000000000000000000000a5ac7555d34cb77585dab49ad6ae12827298fed0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000243101cfcb000000000000000000000000545edb750eb8769c868429be9586f5857a76875800000000000000000000000000000000000000000000000000000000, 0x3659cfe60000000000000000000000003e07aeeef99a1f6ebc9b236b8b0051ac18560a48, 0x3659cfe6000000000000000000000000f2686639c1c8d291059eb19ab3c5e75683e50ad2, 0x3659cfe600000000000000000000000083246543dfc871f078ed7cffca97095db85da08d, 0x4f1ef2860000000000000000000000001c327065568622bec442272c6d8c822575208ddc00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000024c4d66de8000000000000000000000000ae4788294759c1ea2d095766cc902786ba2280dc00000000000000000000000000000000000000000000000000000000, 0x4f1ef286000000000000000000000000d503747234cd3179508831de24be8990f50ebfc80000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000006403933804000000000000000000000000ae4788294759c1ea2d095766cc902786ba2280dc00000000000000000000000000000000000000000000003635c9adc5dea000000000000000000000000000000000000000000000000000000000000000004dc400000000000000000000000000000000000000000000000000000000, 0x3659cfe6000000000000000000000000b7161757c02a6f71361c38f7022876105b266fdc, 0x3659cfe6000000000000000000000000b63cc4b6a8ad9690d7d50bbd937622932ca2e779, 0x4bb5274a000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000244f2a693f000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000]",
"[1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000]",
"0"
],
"transaction": {
"type": "0x00",
"from": "0xe880802580a1fbdef67ace39d1b21c5b2c74f059",
"to": "0x70fd02049333337a534a9383149c9a99ddf65495",
"gas": "0x87f2a",
"value": "0x0",
"data": "0x663ac0110000000000000000000000000000000000000000000000000000000066838b9c00000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000003400000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009000000000000000000000000a30b2932cd8b8a89e34551cdfa13810af38da5760000000000000000000000006f45c1f8d84849d497c6c0ac4c3842dc82f49894000000000000000000000000840ebf1ca767cb690029e91856a357a43b85d03500000000000000000000000098d0230884448b3e2f09a177433d60fb1e19c090000000000000000000000000617c5d73662282ea7ffd231e020eca6d2b0d552f000000000000000000000000ebfff2b32fa0df9c5c8c5d5aaa7e8b51d5207ba3000000000000000000000000545edb750eb8769c868429be9586f5857a768758000000000000000000000000c768423a2ae2b5024cb58f3d6449a8f5db6d8816000000000000000000000000617c5d73662282ea7ffd231e020eca6d2b0d552f0000000000000000000000000000000000000000000000000000000000000009000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000900000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000002c0000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000520000000000000000000000000000000000000000000000000000000000000058000000000000000000000000000000000000000000000000000000000000005e000000000000000000000000000000000000000000000000000000000000000a44f1ef286000000000000000000000000a5ac7555d34cb77585dab49ad6ae12827298fed0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000243101cfcb000000000000000000000000545edb750eb8769c868429be9586f5857a768758000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe60000000000000000000000003e07aeeef99a1f6ebc9b236b8b0051ac18560a480000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe6000000000000000000000000f2686639c1c8d291059eb19ab3c5e75683e50ad20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe600000000000000000000000083246543dfc871f078ed7cffca97095db85da08d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44f1ef2860000000000000000000000001c327065568622bec442272c6d8c822575208ddc00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000024c4d66de8000000000000000000000000ae4788294759c1ea2d095766cc902786ba2280dc000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e44f1ef286000000000000000000000000d503747234cd3179508831de24be8990f50ebfc80000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000006403933804000000000000000000000000ae4788294759c1ea2d095766cc902786ba2280dc00000000000000000000000000000000000000000000003635c9adc5dea000000000000000000000000000000000000000000000000000000000000000004dc4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe6000000000000000000000000b7161757c02a6f71361c38f7022876105b266fdc0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe6000000000000000000000000b63cc4b6a8ad9690d7d50bbd937622932ca2e7790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000844bb5274a000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000244f2a693f00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000900000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f4240",
"nonce": "0x2c"
},
"additionalContracts": [],
"isFixedGasLimit": false
}
],
"receipts": [],
"libraries": [],
"pending": [
"0x22d6c004229c1b6f60779986dfa6c9afdd74accd670e2c13bdac3827c99e4628"
],
"returns": {},
"timestamp": 1718695763,
"chain": 2020,
"multi": false,
"commit": "f79c192"
}
Loading

0 comments on commit a188a76

Please sign in to comment.