3
votes
Curve Voting Escrow Explanations
Just an update to Liron's answer, the whitepaper is now moved to https://github.com/curvefi/curve-dao-contracts/blob/master/doc/README.md
2
votes
How to build an escrow contract that accepts ERC20 tokens like usdt, usdc etc not only ether
Yes, it is possible to implement the ability to receive ERC20 tokens in an escrow contract. Here is an example of how this could be done:
Import the ERC20 contract:
import "https://github.com/...
1
vote
Accepted
Curve Voting Escrow Explanations
The Curve DAO whitepaper was very helpful for me for understanding the code, I really recommend starting with it:
https://curve.fi/files/CurveDAO.pdf
Specifically this part:
1
vote
How to build an escrow contract that accepts ERC20 tokens like usdt, usdc etc not only ether
I am trying to implement a similar function. Try this. I am not sure if it'll work but give it a try.
pragma solidity ^0.8.0;
interface IERC20 {
function transferFrom(address _from, address _to, ...
1
vote
how can i check hashcode and th amount
The first thing that you are doing in the transferto function is:
balances[trx_hash] = amount;
But then, you do this check:
require(balances[trx_hash] == 0, "Unique hash conflict, hash is ...
1
vote
Escrow.sol: The called function should be payable if you send value and the value you send should be less than your current balance
Your MyEscrow smart contract have any issues, let me explain them:
When you declare this statement MyToken token; like storage variable, you must instantiate it with the erc20's smart contact address ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
escrow × 11solidity × 7
remix × 5
erc-20 × 2
defi × 2
curve × 2
contract-development × 1
transactions × 1
tokens × 1
ether × 1
ethereum-wallet-dapp × 1
nft × 1
payable × 1
bytecode × 1
smart-contract-wallets × 1
transfer × 1
polygon × 1
voting × 1
cross-chain × 1
smart-lock × 1