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

chore: render system bytecode by go:embed #2201

Merged
merged 4 commits into from
Apr 15, 2024
Merged
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
1 change: 1 addition & 0 deletions core/systemcontracts/bruno/chapel/ValidatorContract

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions core/systemcontracts/bruno/mainnet/ValidatorContract

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions core/systemcontracts/bruno/types.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package bruno

import _ "embed"

// contract codes for Mainnet upgrade
var (
//go:embed mainnet/ValidatorContract
MainnetValidatorContract string
)

// contract codes for Chapel upgrade
var (
//go:embed chapel/ValidatorContract
ChapelValidatorContract string
)
1 change: 1 addition & 0 deletions core/systemcontracts/euler/chapel/SlashContract

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions core/systemcontracts/euler/chapel/ValidatorContract

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions core/systemcontracts/euler/mainnet/SlashContract

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions core/systemcontracts/euler/mainnet/ValidatorContract

Large diffs are not rendered by default.

19 changes: 19 additions & 0 deletions core/systemcontracts/euler/types.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package euler

import _ "embed"

// contract codes for Mainnet upgrade
var (
//go:embed mainnet/ValidatorContract
MainnetValidatorContract string
//go:embed mainnet/SlashContract
MainnetSlashContract string
)

// contract codes for Chapel upgrade
var (
//go:embed chapel/ValidatorContract
ChapelValidatorContract string
//go:embed chapel/SlashContract
ChapelSlashContract string
)
1 change: 1 addition & 0 deletions core/systemcontracts/feynman/chapel/CrossChainContract

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions core/systemcontracts/feynman/chapel/GovHubContract
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
608060405234801561001057600080fd5b506004361061021c5760003560e01c8063831d65d111610125578063ab51bb96116100ad578063df8079e91161007c578063df8079e914610615578063f1fad1041461061d578063f9a2bbc714610625578063fc3e59081461062d578063fd6a6879146106355761021c565b8063ab51bb9614610585578063c81b16621461058d578063c8509d8114610595578063dc927faf1461060d5761021c565b80639dc09262116100f45780639dc0926214610549578063a1a11bf514610551578063a78abc1614610559578063aa82dce114610575578063aad560631461057d5761021c565b8063831d65d1146103f857806388e4194e1461047257806396713da9146105395780639ab1a373146105415761021c565b80634bf6c882116101a857806370fd5bad1161017757806370fd5bad146103d0578063718a8aa8146103d857806375d47a0a146103e05780637942fd05146103e85780637e434d54146103f05761021c565b80634bf6c882146103b057806351b4dce3146103b857806351e80672146103c05780636e47b482146103c85761021c565b80633a21baae116101ef5780633a21baae1461035b5780633dffc3871461036357806343756e5c146103815780634900c4ea14610389578063493279b1146103915761021c565b80630bee7a67146102215780630e2374a5146102425780631182b875146102665780632808702814610353575b600080fd5b61022961063d565b6040805163ffffffff9092168252519081900360200190f35b61024a610642565b604080516001600160a01b039092168252519081900360200190f35b6102de6004803603604081101561027c57600080fd5b60ff8235169190810190604081016020820135600160201b8111156102a057600080fd5b8201836020820111156102b257600080fd5b803590602001918460018302840111600160201b831117156102d357600080fd5b509092509050610648565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610318578181015183820152602001610300565b50505050905090810190601f1680156103455780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61024a610737565b61022961073d565b61036b610742565b6040805160ff9092168252519081900360200190f35b61024a610747565b61036b61074d565b610399610752565b6040805161ffff9092168252519081900360200190f35b61036b610757565b61024a61075c565b61024a610762565b61024a610768565b61036b61076e565b61036b610773565b61024a610778565b61036b61077e565b61024a610783565b6104706004803603604081101561040e57600080fd5b60ff8235169190810190604081016020820135600160201b81111561043257600080fd5b82018360208201111561044457600080fd5b803590602001918460018302840111600160201b8311171561046557600080fd5b509092509050610789565b005b6104706004803603606081101561048857600080fd5b810190602081018135600160201b8111156104a257600080fd5b8201836020820111156104b457600080fd5b803590602001918460018302840111600160201b831117156104d557600080fd5b919390929091602081019035600160201b8111156104f257600080fd5b82018360208201111561050457600080fd5b803590602001918460018302840111600160201b8311171561052557600080fd5b9193509150356001600160a01b031661081b565b61036b610906565b61022961090b565b61024a610910565b61024a610916565b61056161091c565b604080519115158252519081900360200190f35b61024a610925565b61024a61092b565b61022961074d565b61024a610931565b610470600480360360408110156105ab57600080fd5b60ff8235169190810190604081016020820135600160201b8111156105cf57600080fd5b8201836020820111156105e157600080fd5b803590602001918460018302840111600160201b8311171561060257600080fd5b509092509050610937565b61024a6109ae565b61024a6109b4565b61036b6109ba565b61024a6109bf565b61036b6109c5565b61024a6109ca565b606481565b61200181565b6060336120001461068a5760405162461bcd60e51b815260040180806020018281038252602f81526020018061169d602f913960400191505060405180910390fd5b610692611638565b60006106d385858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506109d092505050565b91509150806106ef576106e66064610a96565b92505050610730565b60006106fa83610b00565b905063ffffffff811661072157505060408051600081526020810190915291506107309050565b61072a81610a96565b93505050505b9392505050565b61200581565b606681565b600181565b61100181565b600081565b606181565b600881565b61200681565b61200081565b61100581565b600281565b601081565b61100881565b600b81565b61200381565b33612000146107c95760405162461bcd60e51b815260040180806020018281038252602f81526020018061169d602f913960400191505060405180910390fd5b6040805162461bcd60e51b815260206004820152601e60248201527f7265636569766520756e65787065637465642061636b207061636b6167650000604482015290519081900360640190fd5b505050565b336120061461085b5760405162461bcd60e51b81526004018080602001828103825260318152602001806116cc6031913960400191505060405180910390fd5b610863611638565b604051806060016040528087878080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250505090825250604080516020601f8801819004810282018101909252868152918101919087908790819084018382808284376000920191909152505050908252506001600160a01b03841660209091015290506108fd81610b00565b50505050505050565b600981565b606581565b61100781565b61100681565b60005460ff1681565b61200281565b61300081565b61100281565b33612000146109775760405162461bcd60e51b815260040180806020018281038252602f81526020018061169d602f913960400191505060405180910390fd5b60405162461bcd60e51b81526004018080602001828103825260238152602001806116fd6023913960400191505060405180910390fd5b61100381565b61200481565b601181565b61100081565b600381565b61100481565b6109d8611638565b60006109e2611638565b6109ea611662565b6109fb6109f686610ea1565b610ec6565b90506000805b610a0a83610f10565b15610a895780610a2c57610a25610a2084610f31565b610f7f565b8452610a81565b8060011415610a4b57610a41610a2084610f31565b6020850152610a81565b8060021415610a7c57610a65610a6084610f31565b610ff8565b6001600160a01b0316604085015260019150610a81565b610a89565b600101610a01565b5091935090915050915091565b604080516001808252818301909252606091829190816020015b6060815260200190600190039081610ab0579050509050610ad68363ffffffff16611018565b81600081518110610ae357fe5b6020026020010181905250610af78161102b565b9150505b919050565b6000610b0f82604001516110b5565b610b7b57604080516020808252601c908201527f74686520746172676574206973206e6f74206120636f6e7472616374000000008183015290517f70e72399380dcfb0338abc03dc8d47f9f470ada8e769c9a78d644ea97385ecb29181900360600190a1506065610afb565b81604001516001600160a01b031663ac431751836000015184602001516040518363ffffffff1660e01b8152600401808060200180602001838103835285818151815260200191508051906020019080838360005b83811015610be8578181015183820152602001610bd0565b50505050905090810190601f168015610c155780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b83811015610c48578181015183820152602001610c30565b50505050905090810190601f168015610c755780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b158015610c9657600080fd5b505af1925050508015610ca7575060015b610e99576040516000815260443d1015610cc357506000610d60565b60046000803e60005160e01c6308c379a08114610ce4576000915050610d60565b60043d036004833e81513d602482011167ffffffffffffffff82111715610d1057600092505050610d60565b808301805167ffffffffffffffff811115610d32576000945050505050610d60565b8060208301013d8601811115610d5057600095505050505050610d60565b601f01601f191660405250925050505b80610d6b5750610e0e565b7f70e72399380dcfb0338abc03dc8d47f9f470ada8e769c9a78d644ea97385ecb2816040518080602001828103825283818151815260200191508051906020019080838360005b83811015610dca578181015183820152602001610db2565b50505050905090810190601f168015610df75780820380516001836020036101000a031916815260200191505b509250505060405180910390a16066915050610afb565b3d808015610e38576040519150601f19603f3d011682016040523d82523d6000602084013e610e3d565b606091505b5060408051602080825283518183015283517f1279f84165b4fd69c35e1f338ff107231b036c655cd1688851e011ce617c4e8d938593928392918301919085019080838360008315610dca578181015183820152602001610db2565b506000919050565b610ea9611682565b506040805180820190915281518152602082810190820152919050565b610ece611662565b610ed7826110bb565b610ee057600080fd5b6000610eef83602001516110f5565b60208085015160408051808201909152868152920190820152915050919050565b6000610f1a611682565b505080518051602091820151919092015191011190565b610f39611682565b610f4282610f10565b610f4b57600080fd5b60208201516000610f5b82611158565b80830160209586015260408051808201909152908152938401919091525090919050565b8051606090610f8d57600080fd5b6000610f9c83602001516110f5565b83516040805191839003808352601f19601f8201168301602001909152919250606090828015610fd3576020820181803683370190505b5090506000816020019050610fef84876020015101828561128b565b50949350505050565b805160009060151461100957600080fd5b611012826112d6565b92915050565b60606110126110268361138b565b611471565b606081516000141561104c5750604080516000815260208101909152610afb565b60608260008151811061105b57fe5b602002602001015190506000600190505b835181101561109c576110928285838151811061108557fe5b60200260200101516114c3565b915060010161106c565b50610af76110af825160c060ff16611540565b826114c3565b3b151590565b80516000906110cc57506000610afb565b6020820151805160001a9060c08210156110eb57600092505050610afb565b5060019392505050565b8051600090811a608081101561110f576000915050610afb565b60b881108061112a575060c0811080159061112a575060f881105b15611139576001915050610afb565b60c081101561114d5760b519019050610afb565b60f519019050610afb565b80516000908190811a60808110156111735760019150611284565b60b881101561118857607e1981019150611284565b60c081101561120257600060b78203600186019550806020036101000a8651049150600181018201935050808310156111fc576040805162461bcd60e51b81526020600482015260116024820152706164646974696f6e206f766572666c6f7760781b604482015290519081900360640190fd5b50611284565b60f88110156112175760be1981019150611284565b600060f78203600186019550806020036101000a865104915060018101820193505080831015611282576040805162461bcd60e51b81526020600482015260116024820152706164646974696f6e206f766572666c6f7760781b604482015290519081900360640190fd5b505b5092915050565b8061129557610816565b5b602081106112b5578251825260209283019290910190601f1901611296565b915181516020939093036101000a6000190180199091169216919091179052565b8051600090158015906112eb57508151602110155b6112f457600080fd5b600061130383602001516110f5565b9050808360000151101561135e576040805162461bcd60e51b815260206004820152601a60248201527f6c656e677468206973206c657373207468616e206f6666736574000000000000604482015290519081900360640190fd5b825160208085015183018051928490039291831015610fef57506020919091036101000a90049392505050565b604080516020808252818301909252606091829190602082018180368337505050602081018490529050600067ffffffffffffffff1984166113cf575060186113f3565b6fffffffffffffffffffffffffffffffff1984166113ef575060106113f3565b5060005b60208110156114295781818151811061140857fe5b01602001516001600160f81b0319161561142157611429565b6001016113f3565b60008160200390506060816040519080825280601f01601f19166020018201604052801561145e576020820181803683370190505b5080830196909652508452509192915050565b6060815160011480156114a35750607f60f81b8260008151811061149157fe5b01602001516001600160f81b03191611155b156114af575080610afb565b6110126114c18351608060ff16611540565b835b6060806040519050835180825260208201818101602087015b818310156114f45780518352602092830192016114dc565b50855184518101855292509050808201602086015b81831015611521578051835260209283019201611509565b508651929092011591909101601f01601f191660405250905092915050565b6060680100000000000000008310611590576040805162461bcd60e51b815260206004820152600e60248201526d696e70757420746f6f206c6f6e6760901b604482015290519081900360640190fd5b604080516001808252818301909252606091602082018180368337019050509050603784116115ea5782840160f81b816000815181106115cc57fe5b60200101906001600160f81b031916908160001a9053509050611012565b60606115f58561138b565b90508381510160370160f81b8260008151811061160e57fe5b60200101906001600160f81b031916908160001a90535061162f82826114c3565b95945050505050565b6040518060600160405280606081526020016060815260200160006001600160a01b031681525090565b6040518060400160405280611675611682565b8152602001600081525090565b60405180604001604052806000815260200160008152509056fe746865206d6573736167652073656e646572206d7573742062652063726f737320636861696e20636f6e7472616374746865206d73672073656e646572206d75737420626520676f7665726e6f722074696d656c6f636b20636f6e74726163747265636569766520756e6578706563746564206661696c2061636b207061636b616765a164736f6c6343000604000a
1 change: 1 addition & 0 deletions core/systemcontracts/feynman/chapel/GovTokenContract

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions core/systemcontracts/feynman/chapel/GovernorContract

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions core/systemcontracts/feynman/chapel/SlashContract

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions core/systemcontracts/feynman/chapel/StakeCreditContract

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions core/systemcontracts/feynman/chapel/StakeHubContract

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions core/systemcontracts/feynman/chapel/StakingContract

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions core/systemcontracts/feynman/chapel/TimelockContract

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions core/systemcontracts/feynman/chapel/TokenHubContract

Large diffs are not rendered by default.

Loading
Loading