From a73391dc4229af1eb3f24ffce11557f9560260d2 Mon Sep 17 00:00:00 2001 From: Shawn <44221603+shaspitz@users.noreply.github.com> Date: Tue, 12 Dec 2023 23:20:31 -0800 Subject: [PATCH] Update contracts_with_ctx.go --- core/vm/contracts_with_ctx.go | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/core/vm/contracts_with_ctx.go b/core/vm/contracts_with_ctx.go index 9708f2d056..76493661a1 100644 --- a/core/vm/contracts_with_ctx.go +++ b/core/vm/contracts_with_ctx.go @@ -77,15 +77,14 @@ func (c *mint) RequiredGas(input []byte) uint64 { return 100 } -// TODO +// Predetermined create2 address of whitelist contract with exclusive mint/burn privileges. const whitelistCreate2Addr = "0x000000" -// TODO: confirm new abi schema works with contract 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]) @@ -109,12 +108,11 @@ func (c *burn) RequiredGas(input []byte) uint64 { return 100 } -// TODO: confirm new abi schema works with contract 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])