mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-30 00:23:46 +00:00
whitelist filtering
This commit is contained in:
parent
a73391dc42
commit
80679748c9
1 changed files with 8 additions and 7 deletions
|
|
@ -78,13 +78,14 @@ func (c *mint) RequiredGas(input []byte) uint64 {
|
|||
}
|
||||
|
||||
// Predetermined create2 address of whitelist contract with exclusive mint/burn privileges.
|
||||
const whitelistCreate2Addr = "0x000000"
|
||||
// See: https://github.com/primevprotocol/contracts/blob/ecfd53d43770201da9c7a697be1fb03e5e554e4e/scripts/DeployScripts.s.sol
|
||||
const whitelistCreate2Addr = "0xe57ee51bcb0914EC666703F923e0433d8c4d70b1"
|
||||
|
||||
func (c *mint) Run(input []byte, ctx *precompileContext) ([]byte, error) {
|
||||
|
||||
// if ctx.caller != common.HexToAddress(whitelistCreate2Addr) {
|
||||
// return nil, fmt.Errorf("Error parsing transfer: caller not whitelisted")
|
||||
// }
|
||||
if ctx.caller != common.HexToAddress(whitelistCreate2Addr) {
|
||||
return nil, fmt.Errorf("Error parsing transfer: caller not whitelisted")
|
||||
}
|
||||
|
||||
mintTo := common.BytesToAddress(input[0:32])
|
||||
|
||||
|
|
@ -110,9 +111,9 @@ func (c *burn) RequiredGas(input []byte) uint64 {
|
|||
|
||||
func (c *burn) Run(input []byte, ctx *precompileContext) ([]byte, error) {
|
||||
|
||||
// if ctx.caller != common.HexToAddress(whitelistCreate2Addr) {
|
||||
// return nil, fmt.Errorf("Error parsing transfer: caller not whitelisted")
|
||||
// }
|
||||
if ctx.caller != common.HexToAddress(whitelistCreate2Addr) {
|
||||
return nil, fmt.Errorf("Error parsing transfer: caller not whitelisted")
|
||||
}
|
||||
|
||||
burnFrom := common.BytesToAddress(input[0:32])
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue