bsc/core/systemcontracts/pascal/chapel/StakeCreditContract
Ethan 8c1acb0b22
feat: add pascal hardfork (#2692)
* feat: add pascal hardfork
* config: fix default value for PascalTime and add OverridePascal (#2693)
* chores: rename some contract name
* feat: update bytecode on dev env
2024-09-23 16:17:06 +08:00

1 line
17 KiB
Plaintext

6080604052600436106101d15760003560e01c8063647df759116100f7578063a9059cbb11610095578063c2cde2b211610064578063c2cde2b21461063c578063d241c1ea1461065c578063dd62ed3e1461069e578063f399e22e146106be57600080fd5b8063a9059cbb146105af578063a9664feb146105cf578063aa1966cd146105ef578063aad3ec961461061c57600080fd5b806391faf0b4116100d157806391faf0b41461053a57806395d89b411461055a578063a457c2d71461056f578063a5d059ca1461058f57600080fd5b8063647df759146104b75780636bbf2249146104d757806370a082311461050457600080fd5b80632f2d448a1161016f57806345bc4d101161013e57806345bc4d101461044f5780634d99dd161461046f5780635c19a95c1461048f5780635e607d76146104a257600080fd5b80632f2d448a146103bb578063313ce567146103db57806339509351146103f75780633a5381b51461041757600080fd5b8063095ea7b3116101ab578063095ea7b31461034057806315d1f8981461037057806318160ddd1461038657806323b872dd1461039b57600080fd5b8063038c0023146102cb57806306fdde03146102fe5780630913db471461032057600080fd5b366102c657336120021461020157604051630f22c43960e41b815261200260048201526024015b60405180910390fd5b60006120026001600160a01b0316631fa8882b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610243573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102679190611d9e565b6102719042611dcd565b6098546000828152609d6020908152604080832093909355609c9052908120805492935034929091906102a5908490611def565b9250508190555034609860008282546102be9190611def565b925050819055005b600080fd5b3480156102d757600080fd5b506102eb6102e6366004611e1a565b6106d1565b6040519081526020015b60405180910390f35b34801561030a57600080fd5b50610313610701565b6040516102f59190611e3e565b34801561032c57600080fd5b506102eb61033b366004611e1a565b610793565b34801561034c57600080fd5b5061036061035b366004611e8c565b6107b5565b60405190151581526020016102f5565b34801561037c57600080fd5b506102eb60985481565b34801561039257600080fd5b506067546102eb565b3480156103a757600080fd5b506103606103b6366004611eb8565b6107cd565b3480156103c757600080fd5b506102eb6103d6366004611e1a565b6107f1565b3480156103e757600080fd5b50604051601281526020016102f5565b34801561040357600080fd5b50610360610412366004611e8c565b6108b6565b34801561042357600080fd5b50609754610437906001600160a01b031681565b6040516001600160a01b0390911681526020016102f5565b34801561045b57600080fd5b506102eb61046a366004611ef9565b6108d8565b34801561047b57600080fd5b506102eb61048a366004611e8c565b6109cb565b6102eb61049d366004611e1a565b610be2565b6104b56104b0366004611f12565b610c58565b005b3480156104c357600080fd5b506102eb6104d2366004611ef9565b610dcb565b3480156104e357600080fd5b506102eb6104f2366004611ef9565b609d6020526000908152604090205481565b34801561051057600080fd5b506102eb61051f366004611e1a565b6001600160a01b031660009081526065602052604090205490565b34801561054657600080fd5b506102eb610555366004611ef9565b610e0a565b34801561056657600080fd5b50610313610e45565b34801561057b57600080fd5b5061036061058a366004611e8c565b610e54565b34801561059b57600080fd5b506102eb6105aa366004611e8c565b610ecf565b3480156105bb57600080fd5b506103606105ca366004611e8c565b610fd0565b3480156105db57600080fd5b506102eb6105ea366004611e8c565b610fde565b3480156105fb57600080fd5b506102eb61060a366004611ef9565b609c6020526000908152604090205481565b34801561062857600080fd5b506102eb610637366004611e8c565b611107565b34801561064857600080fd5b506102eb610657366004611e1a565b6113aa565b34801561066857600080fd5b5061067c610677366004611e8c565b6113c8565b60408051825181526020808401519082015291810151908201526060016102f5565b3480156106aa57600080fd5b506102eb6106b9366004611f3c565b61144b565b6104b56106cc366004611f75565b611476565b6001600160a01b0381166000908152609a6020526040812054600f81810b600160801b909204900b035b92915050565b60606068805461071090611ffa565b80601f016020809104026020016040519081016040528092919081815260200182805461073c90611ffa565b80156107895780601f1061075e57610100808354040283529160200191610789565b820191906000526020600020905b81548152906001019060200180831161076c57829003601f168201915b5050505050905090565b6001600160a01b0381166000908152606560205260408120546106fb90610e0a565b6000336107c381858561162c565b5060019392505050565b6000336107db858285611645565b6107e68585856116b9565b506001949350505050565b6001600160a01b0381166000908152609a6020526040812054600f81810b600160801b909204900b0381805b828110156108ae576001600160a01b0385166000908152609a6020526040812061084790836116d2565b6000818152609960209081526040918290208251606081018452815481526001820154928101929092526002015491810182905291925042106108945761088d8461202e565b935061089b565b50506108ae565b5050806108a79061202e565b905061081d565b509392505050565b6000336107c38185856108c9838361144b565b6108d39190611def565b61162c565b6000336120021461090057604051630f22c43960e41b815261200260048201526024016101f8565b6097546001600160a01b03166000908152606560205260408120549061092584610dcb565b90508181116109345780610936565b815b609754909150600090610952906001600160a01b031683611743565b6040519091506000906110029083908381818185875af1925050503d8060008114610999576040519150601f19603f3d011682016040523d82523d6000602084013e61099e565b606091505b50509050806109c0576040516312171d8360e31b815260040160405180910390fd5b50925050505b919050565b600033612002146109f357604051630f22c43960e41b815261200260048201526024016101f8565b81600003610a1457604051639811e0c760e01b815260040160405180910390fd5b6001600160a01b038316600090815260656020526040902054821115610a4d57604051631e9acf1760e31b815260040160405180910390fd5b610a578383611743565b905060006120026001600160a01b031663fc0c5ff16040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610abf9190611d9e565b610ac99042611def565b6040805160608101825285815260208101859052908101829052909150600085610af281611778565b60405160609290921b6bffffffffffffffffffffffff19166020830152603482015260540160408051601f1981840301815291815281516020928301206000818152609990935291205490915015610b5d5760405163b19e911560e01b815260040160405180910390fd5b600081815260996020908152604080832085518155828601516001820155818601516002909101556001600160a01b0389168352609a9091529020610bd990828154600160801b90819004600f0b6000818152600180860160205260409091209390935583546001600160801b03908116939091011602179055565b50505092915050565b60003361200214610c0a57604051630f22c43960e41b815261200260048201526024016101f8565b34600003610c2b57604051631f2a200560e01b815260040160405180910390fd5b610c3582346117a0565b9050806000036109c657604051639811e0c760e01b815260040160405180910390fd5b3361200214610c7e57604051630f22c43960e41b815261200260048201526024016101f8565b346000612710610c9867ffffffffffffffff851684612047565b610ca29190611dcd565b90506000610cb0828461205e565b905060006120026001600160a01b0316631fa8882b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cf4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d189190611d9e565b610d229042611dcd565b6098546000828152609d6020908152604080832093909355609c905290812080549293508492909190610d56908490611def565b925050819055508160986000828254610d6f9190611def565b9091555050609754610d8a906001600160a01b0316846117a0565b5060408051838152602081018590527ffb0e1482d62102ab9594f69d4c6d693749e3e2bf1c21af272f5456b2d5a4f6b5910160405180910390a15050505050565b6000609854600003610df0576040516307b76ce760e51b815260040160405180910390fd5b609854606754610e009084612047565b6106fb9190611dcd565b6000610e1560675490565b600003610e3557604051632fe8dae960e01b815260040160405180910390fd5b606754609854610e009084612047565b60606069805461071090611ffa565b60003381610e62828661144b565b905083811015610ec25760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016101f8565b6107e6828686840361162c565b60003361200214610ef757604051630f22c43960e41b815261200260048201526024016101f8565b81600003610f1857604051639811e0c760e01b815260040160405180910390fd5b6001600160a01b038316600090815260656020526040902054821115610f5157604051631e9acf1760e31b815260040160405180910390fd5b610f5b8383611743565b6040519091506000906120029083908381818185875af1925050503d8060008114610fa2576040519150601f19603f3d011682016040523d82523d6000602084013e610fa7565b606091505b5050905080610fc9576040516312171d8360e31b815260040160405180910390fd5b5092915050565b6000336107c38185856116b9565b6001600160a01b0382166000908152609a6020526040812054600f81810b600160801b909204900b03600003611016575060006106fb565b81158061104a57506001600160a01b0383166000908152609a6020526040902054600f81810b600160801b909204900b0382115b611054578161107e565b6001600160a01b0383166000908152609a6020526040902054600f81810b600160801b909204900b035b91506000805b838110156108ae576001600160a01b0385166000908152609a602052604081206110ae90836116d2565b600081815260996020908152604091829020825160608101845281548152600182015492810183905260029091015492810192909252919250906110f29085611def565b93505050806111009061202e565b9050611084565b6000336120021461112f57604051630f22c43960e41b815261200260048201526024016101f8565b6111376117c9565b6001600160a01b0383166000908152609a6020526040902054600f81810b600160801b909204900b036000036111805760405163ad41893760e01b815260040160405180910390fd5b8115806111b457506001600160a01b0383166000908152609a6020526040902054600f81810b600160801b909204900b0382115b6111be57816111e8565b6001600160a01b0383166000908152609a6020526040902054600f81810b600160801b909204900b035b915060005b821561129e576001600160a01b0384166000908152609a6020526040812061121490611822565b6000818152609960209081526040918290208251606081018452815481526001820154928101929092526002015491810182905291925042101561125957505061129e565b6001600160a01b0386166000908152609a6020526040902061127a90611876565b50602081015161128a9084611def565b925061129585612071565b945050506111ed565b806000036112bf576040516303cd8e0960e21b815260040160405180910390fd5b60006120026001600160a01b031663e8f67c3b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611301573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113259190611d9e565b90506000856001600160a01b03168284604051600060405180830381858888f193505050503d8060008114611376576040519150601f19603f3d011682016040523d82523d6000602084013e61137b565b606091505b505090508061139d576040516312171d8360e31b815260040160405180910390fd5b50506001805590506106fb565b6001600160a01b0381166000908152609b60205260408120546106fb565b6113ec60405180606001604052806000815260200160008152602001600081525090565b6001600160a01b0383166000908152609a6020526040812061140e90846116d2565b6000908152609960209081526040918290208251606081018452815481526001820154928101929092526002015491810191909152949350505050565b6001600160a01b03918216600090815260666020908152604080832093909416825291909152205490565b600054610100900460ff16158080156114965750600054600160ff909116105b806114b05750303b1580156114b0575060005460ff166001145b6115135760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016101f8565b6000805460ff191660011790558015611536576000805461ff0019166101001790555b336120021461155c57604051630f22c43960e41b815261200260048201526024016101f8565b60008383604051602001611571929190612088565b6040516020818303038152906040529050600084846040516020016115979291906120b8565b60405160208183030381529060405290506115b282826118fb565b6115ba611940565b609780546001600160a01b0319166001600160a01b0388161790556115de34611967565b50508015611626576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b604051632028747160e01b815260040160405180910390fd5b6000611651848461144b565b9050600019811461162657818110156116ac5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016101f8565b611626848484840361162c565b604051638cd22d1960e01b815260040160405180910390fd5b6000806116f56116e184611ad7565b85546116f09190600f0b6120d6565b611b45565b8454909150600160801b9004600f90810b9082900b1261172857604051632d0483c560e21b815260040160405180910390fd5b600f0b60009081526001939093016020525050604090205490565b600061174e82610e0a565b905061175a8383611ba9565b806098600082825461176c919061205e565b90915550909392505050565b6001600160a01b0381166000908152609b602052604090208054600181018255905b50919050565b60006117ab82610dcb565b90506117b78382611cdd565b816098600082825461176c9190611def565b60026001540361181b5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016101f8565b6002600155565b600061183d8254600f81810b600160801b909204900b131590565b1561185b57604051631ed9509560e11b815260040160405180910390fd5b508054600f0b60009081526001909101602052604090205490565b60006118918254600f81810b600160801b909204900b131590565b156118af57604051631ed9509560e11b815260040160405180910390fd5b508054600f0b6000818152600180840160205260408220805492905583546fffffffffffffffffffffffffffffffff191692016001600160801b03169190911790915590565b60018055565b600054610100900460ff166119225760405162461bcd60e51b81526004016101f8906120fe565b606861192e83826121ad565b50606961193b82826121ad565b505050565b600054610100900460ff166118f55760405162461bcd60e51b81526004016101f8906120fe565b600054610100900460ff1661198e5760405162461bcd60e51b81526004016101f8906120fe565b60006120026001600160a01b0316638a4d3fa86040518163ffffffff1660e01b8152600401602060405180830381865afa1580156119d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119f49190611d9e565b90508082111580611a0e57506097546001600160a01b0316155b80611a1a575060675415155b15611a3857604051632163e6b960e21b815260040160405180910390fd5b60006120026001600160a01b0316634e6fd6c46040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a7a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a9e919061226d565b9050611aaa8183611cdd565b6000611ab6838561205e565b609754909150611acf906001600160a01b031682611cdd565b505050609855565b60006001600160ff1b03821115611b415760405162461bcd60e51b815260206004820152602860248201527f53616665436173743a2076616c756520646f65736e27742066697420696e2061604482015267371034b73a191a9b60c11b60648201526084016101f8565b5090565b80600f81900b81146109c65760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20316044820152663238206269747360c81b60648201526084016101f8565b6001600160a01b038216611c095760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016101f8565b6001600160a01b03821660009081526065602052604090205481811015611c7d5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016101f8565b6001600160a01b03831660008181526065602090815260408083208686039055606780548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b6001600160a01b038216611d335760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016101f8565b8060676000828254611d459190611def565b90915550506001600160a01b0382166000818152606560209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b600060208284031215611db057600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b600082611dea57634e487b7160e01b600052601260045260246000fd5b500490565b808201808211156106fb576106fb611db7565b6001600160a01b0381168114611e1757600080fd5b50565b600060208284031215611e2c57600080fd5b8135611e3781611e02565b9392505050565b600060208083528351808285015260005b81811015611e6b57858101830151858201604001528201611e4f565b506000604082860101526040601f19601f8301168501019250505092915050565b60008060408385031215611e9f57600080fd5b8235611eaa81611e02565b946020939093013593505050565b600080600060608486031215611ecd57600080fd5b8335611ed881611e02565b92506020840135611ee881611e02565b929592945050506040919091013590565b600060208284031215611f0b57600080fd5b5035919050565b600060208284031215611f2457600080fd5b813567ffffffffffffffff81168114611e3757600080fd5b60008060408385031215611f4f57600080fd5b8235611f5a81611e02565b91506020830135611f6a81611e02565b809150509250929050565b600080600060408486031215611f8a57600080fd5b8335611f9581611e02565b9250602084013567ffffffffffffffff80821115611fb257600080fd5b818601915086601f830112611fc657600080fd5b813581811115611fd557600080fd5b876020828501011115611fe757600080fd5b6020830194508093505050509250925092565b600181811c9082168061200e57607f821691505b60208210810361179a57634e487b7160e01b600052602260045260246000fd5b60006001820161204057612040611db7565b5060010190565b80820281158282048414176106fb576106fb611db7565b818103818111156106fb576106fb611db7565b60008161208057612080611db7565b506000190190565b65029ba30b5b2960d51b815281836006830137660810dc99591a5d60ca1b91016006810191909152600d01919050565b611cdd60f21b81528183600283013760009101600201908152919050565b80820182811260008312801582168215821617156120f6576120f6611db7565b505092915050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b634e487b7160e01b600052604160045260246000fd5b601f82111561193b57600081815260208120601f850160051c810160208610156121865750805b601f850160051c820191505b818110156121a557828155600101612192565b505050505050565b815167ffffffffffffffff8111156121c7576121c7612149565b6121db816121d58454611ffa565b8461215f565b602080601f83116001811461221057600084156121f85750858301515b600019600386901b1c1916600185901b1785556121a5565b600085815260208120601f198616915b8281101561223f57888601518255948401946001909101908401612220565b508582101561225d5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60006020828403121561227f57600080fd5b8151611e3781611e0256fea164736f6c6343000811000a