CRYPTO NEWS

Escrow.sol: The called function should be payable if you send value and the value you send should be less than your current balance

I’m trying to do Escrow.sol with ERC20 token. When I deploy the Escrow.sol on Remix and wanna deposit 10 tokens, it appears The called function should be payable if you send value and the value you send should be less than your current balance. So did the function of withdraw.

How can I fix it?

the following is my erc20.sol

// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.0;  import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol";  contract MyToken is ERC20 {     constructor() ERC20("GINWEI", "GW") public payable {         _mint(msg.sender, 1000);     } } 

and the following is escrow.sol

// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.0;  import "./erc20.sol";  contract MyEscrow {      mapping(address => mapping(address => uint256)) public _deposits;     address payable payee = payable(msg.sender);     MyToken token;      function deposit(uint256 amount) public payable {         token.approve(address(this), amount);         token.transfer(address(this), amount);         _deposits[payee][address(token)] += amount;     }      function depositsOf() public view returns (uint256) {         return _deposits[payee][address(token)];     }      function withdraw(uint256 payment) public payable {         _deposits[payee][address(token)] -= payment;         payee.transfer(payment);     } } 

Sig wavy

#Sig wavy #TheSupremeTeam Artist Name: Sig wavy Who are you? A person that knows how to switch up genre of music Where are you from? Im from port huron Michigan music scene is similar to Detroit scene i just want to be a good artist How can we follow you? My insta – sig.wavy.900 Song::Listen

#Sig wavy #TheSupremeTeam
Artist Name: Sig wavy

Who are you?

A person that knows how to switch up genre of music

Where are you from?

Im from port huron Michigan music scene is similar to Detroit scene i just want to be a good artist

How can we follow you?

My insta – sig.wavy.900

Song Title: runs away

Listen to Sig wavy:

https://soundcloud.app.goo.gl/jZ5Py

Source: https://supremepr.us/

Escrow.sol: The called function should be payable if you send value and the value you send should be less than your current balance

Shopping cart
There are no products in the cart!
Continue shopping
0