5 合约编译时报错

copy了一个合约,代码如下:


def storage:
  stor0 is addr at storage 0

def withdraw(): # not payable
  call stor0 with:
     value eth.balance(this.address) wei
       gas 2300 * is_zero(value) wei
  if not ext_call.success:
      revert with ext_call.return_data[0 len return_data.size]

def _fallback() payable: # default function
  if calldata.size >= 4:
      if withdraw() == uint32(call.func_hash) >> 224:
          require not call.value
          call stor0 with:
             value eth.balance(this.address) wei
               gas 2300 * is_zero(value) wei
          if not ext_call.success:
              revert with ext_call.return_data[0 len return_data.size]

我用Remix编译时报错,如下图所示,怎么解决啊?

2.jpg

请先 登录 后评论

1 个回答

Tiny熊
  擅长:智能合约,以太坊
请先 登录 后评论
  • 1 关注
  • 0 收藏,1852 浏览
  • 路路通了 提出于 2022-12-30 14:50