Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [allowance]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
30 views

Returned error: gas required exceeds allowance (448144)

Here is my code, would you please verify what causes the problem for deployment on Remix (only on the eth mainnet)? Returned error: gas required exceeds allowance (448144) // SPDX-License-Identifier: ...
Morty's user avatar
  • 3
0 votes
1 answer
84 views

Transfer 2 or more ERC20 Tokens + ETH at one address

I have a problem. I wrote a smart contract to send multiple tokens and ETH on my local node. Added the Token Approval function. However, approve does not work, no matter how I try to rewrite the ...
Pavel Konchych's user avatar
0 votes
1 answer
164 views

Set ERC20 token allowance for Smart Wallet Account

I am trying to set USDT(ERC20) token allowance for SWA (smart wallet account) so that the account can interact with an external contract and send USDT to the contract. I am using Alchemy SDK to create ...
Kogelet's user avatar
  • 176
3 votes
1 answer
77 views

Is it possible to allow a third-party relayer to spend ETH on your behalf?

With the ERC-20 standard, it is possible to approve a third-party relayer to spend the tokens on your behalf. This can be done by calling the approve function and providing a high allowance value, ...
Paul Razvan Berg's user avatar
0 votes
0 answers
33 views

Cannot import correctly uniswap's permit2

Hello i am trying to import the permit2 following the official uniswap's guide but i cannot manage to import it correctly since it lacks of the structs and more things even if i don't get any error ...
user19288852's user avatar
0 votes
1 answer
39 views

Alert after spending approval

This is a simple dAPP i am running via metamask. I have tried many things. window.alert(`Connected Successfully`); I have tried to add this window.alert to my code but it wont do much. async function ...
Jim Mike's user avatar
0 votes
2 answers
39 views

transferFrom exceeds allowance though it's approved

I think I do everything correctly but... I get the transfer amount exceeds allowance error..... yes I could just use transfer() and that's it, but... should the transferFrom() also work? I don't get ...
Eugene1111's user avatar
0 votes
1 answer
335 views

How to give allowance to a contract and send erc20 between accounts

I wrote the following contract: // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; contract enviaToken { address public ...
CaioBonani's user avatar
0 votes
1 answer
75 views

insufficient allowance Error .. ERC20

// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import &...
kaay's user avatar
  • 7
0 votes
1 answer
70 views

Token allowance of router address

Pretty much every coin with taxes has an allowance function to give the router allowance over max uint to be able to sell the tokens. However, I always see the allowance given to 'router', which ...
Andy's user avatar
  • 185
1 vote
0 answers
134 views

0x API buy USDC with ETH works, buy ETH with USDC fails

have been building a little front end app to execute trades back and forth between ETH and USDC, partly to learn and partly to build a tool I want to exist. I have all the quotes and stuff working OK, ...
user2863033's user avatar
1 vote
4 answers
983 views

Allowing contract to take ERC20 tokens from msg.sender

I'm kind of new to Solidity and struggling with allowances and approvals. I want my smart contract to be allowed to take ERC20 tokens (LINK in this case) from the msg.sender. I'm using Remix on Goerli,...
TRS's user avatar
  • 131
0 votes
1 answer
36 views

Allowance failed when attempting to transfer LINK tokens

I'm creating a smart contract where users can create NFT raffles. I will be using Chainlink VRF for getting provably fair results. For this, the user who creates the raffle needs to supply the ...
TRS's user avatar
  • 131
1 vote
1 answer
48 views

Disabling allowance for Coins and NFTs?

Allowance phishing attacks are on the rise, and the number of use cases for allowance for erc20 and NFTs seems to be limited. Is there any problem with disabling allowance, perhaps with a new ...
rook's user avatar
  • 141
0 votes
1 answer
131 views

"insuffiecient allowance" running my unit test

I'm developing in remix a lottery SC. I have a problem when I run buyTicket() function. On remix I fix it giving approve to SC address from erc20 function, but I don't know how to do it when I run my ...
Federico's user avatar
0 votes
1 answer
390 views

build an abstract contract for user to claim erc20 tokens, encountered " insufficient allowance" error

My goal is to build an abstract contract and send a specific erc20 token into it so that others can claim the erc20token with merkletree validations. However I am having problem approving the contract ...
Poutine's user avatar
  • 17
5 votes
1 answer
3k views

Difference between Approve() and IncreaseAllowance() in ERC20 contract

Over the last few days, I have been looking up the best and clear explanation of the differences between Approve() and increaseAllowance() of the ERC20 contract. Still, I couldn't come up with a ...
Sina Rahimi's user avatar
2 votes
3 answers
13k views

Error ERC20: insufficient allowance

i intend to use my erc20 token for doing some payment for minting nft. but when i call testPay function always got ERC20: insufficient allowance error. already looking for answer but can't find one. ...
satrio galih's user avatar
1 vote
0 answers
203 views

How does Sushi deal with limit orders? (Conceptually)

On Sushi.com it is possible to set limit orders. From their documentation: When the user creates a limit order for a purchase or a sale on SushiSwap, the order is sent to an AWS server[...] And in ...
Alvin Sartor's user avatar
0 votes
1 answer
227 views

Infinite Allowance for token inside smart contract?

I want contract2 to be able to transfer the tokens from contract1. So i set allowance to -1 If i understand correctly it's not "infinite", but it's the highest possible number in EVM. My ...
smenir443's user avatar
  • 125
1 vote
1 answer
740 views

How to call .increaseAllowance() from another token

I'm deploying a contract that is the owner of a token. In that contract i want to say that the token increaseAllowance to msg.sender and the amount that msg.send have putted in arguments of the ...
The Chimpy Dev's user avatar
1 vote
0 answers
95 views

How do I approve a smart contract to spend my ERC20 tokens? [duplicate]

My first time here, please forgive me for any mistakes. I made a custom ERC20 token using Openzeppelin ERC20PresetFixedSupply. I want to use that in my contract. I was using this code to test how ...
Kushagra Jain's user avatar
1 vote
1 answer
882 views

Allowance = Unlimited. What could happen?

Allowance = Unlimited. What can happen? Hi, let‘s say I approve via MetaMask that another address can spend an unlimited amount of ETH on my address. What can happen? Can this address spend all my ETH ...
ptrckolous's user avatar
0 votes
1 answer
157 views

Token allowance and locking compromised address

So i heard about token allowance checker https://tac.dappstar.io/. It allows you set allowance for tokens. Is there a possible way to set the allowance so that your account wouldnt receive ethereum, ...
Stephen Robb's user avatar
0 votes
0 answers
176 views

Why is the allowance 10**8 inside the test but equal to zero in the smart contract?

I'm running this test: def test_mint(prf, exValue, web3): wBtcAddress = "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599" ABI = [{"constant":True,"inputs":[],"...
donnoh's user avatar
  • 123
0 votes
1 answer
413 views

How can I get a list of token spending allowance for a wallet address?

Let's say I am an end-user who has been testing dapps here and there and I've approved multiple tokens spending for my wallet for different dapps. Is there an easy way for me to get the list of which ...
Kev's user avatar
  • 101
0 votes
1 answer
138 views

Why Transfer function doesn't check for allowance comparing to TransferFrom?

Why Transfer function doesn't check for allowance comparing to TransferFrom? Do I need to call increaseAllowance each time before calling TransferFrom? Ex implementation of Transfer without allowance ...
Dmitry Dyachkov's user avatar
0 votes
1 answer
270 views

Why is my Crowdsale Contract not letting me buy?

Good day, I have designed a mintable token that has a max supply, I now want to sell that token in a Crowdsale. I created the crowdsale contract, set the token address, transffered the funds... but ...
AvocadoChocolate's user avatar
1 vote
1 answer
1k views

Usecase for approve and allowance functions of ERC20 token

Could you please enlighten me on how approve and allowance functions work using a usecase? I dont understand the underlying operations of these functions. Especially, when a token owner delegates the ...
Muni V K's user avatar
0 votes
1 answer
213 views

Is there an indexed database for ERC20 allowances?

For instance, I'd like to make the following query: Return all the addresses that have approved spender x on a particular token It seems that I can only query for a specific (address, spender) ...
Parker Applebye's user avatar
1 vote
1 answer
67 views

Do dapps(contract) check allowance of buyer when he calls buy function?

When a buyer calls a buy function on dapp contract, some dapps check the buyer's allowance before transfer tokens(erc20). Is it usual?
lagoiz's user avatar
  • 147