Contract not getting listen on opensea mainnet, however shows NFTs in metamask & works on testnet - solidity

Just as the title says, on opensea testnets mumbai and ropsten, it 'imports' the smart contract to create the collection, however on the polygon mainnet, the same contracts are working perfectly.
The NFTs even show in my wallet on the mainnet, the contract is verified on etherscan & I can mint.
Please check https://polygonscan.com/address/0xb6AF03FE32Ac3DffDd4F2661270DFEE00C15c3d9
Is there anything special I have to do for the mainnet opensea to accept my smart contract?
Thank you very much!!

I created a new smart contract and added
import "#openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol";
Now it seems to work, still, I fail to understand why on the testnet opensea, it worked without it...
Sometimes development makes no sense.

Related

Why can I not deploy this BEP20 token with Remix?

I am trying to deploy this contract
https://github.com/juustesout/EtherRanger/blob/main/EtherRanger.sol
to BSC Testnet, and I get this error in return :
"revert
The transaction has been reverted to the initial state.
Note: The called function should be payable if you send value and the value you send should be less than your current balance.
Debug the transaction to get more information. "
this is an example of a failed transaction on BSC Testnet
https://testnet.bscscan.com/tx/0x5cbe0adcf6a522d89c974cadf70358dd9d79476988b4fb829fc1cc86c88aff0c
I tried forking multiple contracts from BSC, working tokens, but I always get the same error. I tried adding 'payable' to the constructor function, as other StackOverflow posts suggest, but no go. I have been reading any number of posts through Google Search, but I am getting nowhere.
The contracts compile flawless, no errors, no warnings, but they just won't deploy.
Could someone check if they can deploy this contract on BSC Testnet ? It may be a setting on my Remix or something, I am at a loss, I cannot tell where the error comes from.
I don’t know anything about this contract but I guess the hardcoded addresses for the IBEP20 and others are the problem. You need to deploy these contracts too and then pass their addresses to the interface addresses in your constructor.
But to connect to the BSC test network, you need to find the drop-down menu with a list of networks at the top of the MetaMask
https://domhtml.ru/en/sozdanie-sobstvennyh-tokenov-standarta-bep-20-v-seti-binance-smart-chain-bsc-pri-pomoshhi-remix-ide/

How exactly do i faciliate a transaction of an established ERC20 token between two users?

pragma solidity ^0.8.0;
import 'Token.sol';
import 'Encap.sol';
contract HEX_Extension {
function transfer_addy(address _to, uint amount) external {{
IHEX(0x2b591e99afE9f32eAA6214f7B7629768c40Eeb39).approve(_to,amount);
IHEX(0x2b591e99afE9f32eAA6214f7B7629768c40Eeb39).transferFrom(msg.sender,_to,amount);
}}
}
I am writing a contract that extends the functionality of HEX, an ERC20 token. I cannot for the life of me figure out how to validate a transaction between two users. Can someone explain what's wrong with this code? I keep getting thrown the error that says the allowance is too low, even though i set the allowance in the transfer method.
I'm not sure if this makes a difference, but I am testing this contract in the Injected Web3 setting in Remix.
This line doesn't not allows the HEX to use your token on behalf of HEX_Extension as you might expected.
IHEX(0x2b591e99afE9f32eAA6214f7B7629768c40Eeb39).approve(_to,amount);
You need to make an approval from your wallet to the IHEX, that allows he address of contract HEX_Extension use your own token.
Example: let's say you deployed the HEX_Extension into address 0xABCDE.... Then from your MM, make a call to approve function of HEX contract, approve(0xABCDE...., amount) before the transfer_addy.

ERC721 with payable function

I writed a code enter link description here with payable function transfer.
but, after Deploy in the "etherscan" showed me that is is not erc721, it is ERC20. can help me? where is wrong?
Testnets might not work exactly as mainnets.
They have different behaviours, that is normal.
Anyway, the methods of your smart contract are visible and can then be called.

Polygon support for ERC777

Does Polygon network support ERC777 token? I am writing a cryptocurrency with the intention of deploying it to Polygon.
Between ERC20 and ERC777, I am thinking of using ERC777 given that it is the upgraded version.
I see from https://faucet.polygon.technology that the test tokens I can receive are only ERC20, ERC721 and ERC1155.
Is ERC777 supported? Or should I remain on ERC20, or use ERC1155?
Yes, it does support it. I just tested it and everything works, including the operatorSend function (which is the main reason to go for 777 instead of 20).
Here's one that is deployed and running fine: https://polygonscan.com/address/0x6f80d1a3ab9006548c2fbb180879b87364d63bf7#code

BEP-20 Contract no deploy public view functions

I am studying how to make BEP-20 tokens. For this I copied the following contract in remix to be able to study it:
Contract in BscScan
If I copy the whole file and compile it in Remix, when I deploy it it doesn't show me any getters. No public view function appears. If I look at the contract displayed on the testnet, it doesn't have any supply of tokens either.
I separated the files and libraries for a better reading. And it is then, when I try to display it, that I get the following error:
VM error: revert. revert The transaction has been reverted to the initial state. Note: The called function should be payable if you send value and the value you send should be less than your current balance. Debug the transaction to get more information.
It gives me the feeling that this contract does not generate the tokens ... What am I wrong?
I managed to fix the problem. As I suspected, in order to deploy the contract I have to remove everything related to uniswap and cakeswap. This displays the contract correctly.
If you wanted to deploy the contract with the uniswap interfaces in injected web3, you would need the uniswap testnet.
I found a test address for cake here:
Binance Smart change tesnet