Hot answers tagged

2

https://staging.aave.com/#/faucet. You just connect with your Metamask wallet on Kovan testnet and select USD Coin. You will be prompted to accept the metamask transaction and after you will receive 10000 USDC tokens. You just add the address you provided here to Metamask to see your tokens and you're all set.


1

I would say it's not a good arch design. you cannot control how long would transaction stay in mempool. It could be seconds, hours, days. if user has a pending transaction, it cannot create a new one. It's because of nonce, which has to be uninterruptedly incremental. For it to keep using your on-chain service, it would have to cancel the pending ...


1

you should use owner() instead of owner, the error is you are comparing an address with a function type with the == operator. owner is the function name function owner() public view virtual returns (address) { return _owner; } and you need to invoke it like this owner() to get the address. _owner is a private and used in the abstract code.


1

Etherscan hardcoded the CryptoPunks contact to show up that way. Basically Etherscan is programmed this way: If contract is CryptoPunks handleCryptoPunksSpecially() Else If contract is CryptoKities handleCryptoKittiesSpecially() Else If contract follows ERC721() handleGenericERC721() Else itIsNotAnERC721() And this is precisely why we need standards,...


1

you just own or transfer to someone else wallet or use the contracts to sell your integer which represents the cryptopunk number on the "marketplace". they released the whole image hash of all cryptopunks in the blockhain. But it's a proof concept, not an nft. Now, if you have this whole image it's not that hard to "extract" the related ...


1

I am not totally sure I understand your question, and what you can and can not change, and what is the difference between snaToken and myToken. You are checking the balance of snaToken but then sending myToken - what exactly is happening there? But anyway, do you know of the allowance mechanism? (functions .approve and .transferFrom) You can use it to do ...


1

you should use tx.origin instead ofmsg.sender, If there are multiple function invocations on multiple contracts, tx.origin will always refer to the account that started the transaction irrespective of the stack of contracts invoked. However, msg.sender will refer to the one that called the contract, could be a smart contract address.


1

Your call is sending devAddress to the setRoyalties method which expects in its place address payable _royaltiesReceipientAddress. Since its expecting a paybale address on the function you have to convert it before it goes to the method, you can do so by casting it as payable while calling the function: setRoyalties(_tokenIdTracker.current(),payable(...


1

It's totally possible. If you are the NFT owner (ContractA would return your address for call ownerOf and your NFT id) you could simply call safeTransferFrom (where from address would be yours). If you are not the owner, you need to be approved to transfer the NFT first by the owner. Or if you just need to enable ContractB to move the NFT, you can simply ...


1

I am afraid not. I assume you sent tokens to the "Contract address?" It will never be possible to take/recover tokens from an address if you don't have a private key to the said address. That is how blockchain architecture works at its core. That said, maybe the contract you sent your tokens to was supposed to exchange your tokens for some other ...


1

There's an infinite number of ways in which an ERC-20/ BEP-20 contract can be implemented. In your case, the token contract has two modifiers set on the transfer function: function transfer(address to, uint256 value) external override validRecipient(to) initialDistributionLock returns (bool) { _transferFrom(msg.sender, to, value); ...


1

Nothing. That's one of the reasons why services such as IPFS are preferred. With IPFS you can't change the contents while keeping the same URL.


1

N_COINS is the number of coins in the pool, for e.g. in 3pool (DAI/USDC/USDT) N_COINS = 3. _amounts is an array representing the amounts with liquidity you are providing, for e.g. in 3pool [10, 15, 20] means you are providing 10 DAI, 15 USDC, 20 USDT. _min_mint_amount is the minimal curve liquidity token for the pool you are willing to receive


1

You can have a receive function and has a require statement that makes the tx revert if msg.value > someAmount. More info in the solidity docs.


Only top voted, non community-wiki answers of a minimum length are eligible