New answers tagged

0 votes

How are Public Name Tags regsitered on Etherscan?

Not sure about the registry question. Check the API. To set metadata about a contract, you first claim ownership of the contract which gives you an admin web interface. Open an account with Etherscan ...
user avatar
  • 51.3k
1 vote

NFT tokenID question

In ERC721 standart you cannot get the what NFTs an address owns, just number of tokens. You can iterate over all tokens one by one to check their owners, or better use a 3rd party API that provides ...
user avatar
1 vote
Accepted

How to transfer an NFT from a contract address to a wallet address

If you did not already, you should first approve your contract from your EOA to give permission. Then you should be able to transfer the ERC721 token. And transfer_out function should be: def ...
user avatar
0 votes

how can library change state?

Libraries are stateless, they can store only 'constant' values. So even if delegatecall is used on library it wont be able to change the state of caller contract. For example when i tried to create ...
user avatar
2 votes

Upgradeable proxy contracts- Seperating logic, functionality, & storage contracts. Examples? Resources?

you are describing: upgradable storage proxy contracts ... The proxy contract, as well as the logic contract, will inherit the same storage contract so that their storage references align in the EVM. ...
user avatar
0 votes

Do modifiers work in interfaces

What you can do is to use a virtual contract as an "interface" (as suggested above). The scheme is: abstract contract A { modifier adminOnly { /// checks admin _; } ...
user avatar
0 votes

How can msg.sender == address(this)?

An other way that your contract to be secured by good practice, is coding like bottom contract. You should define owner state on your contract and set modifier to your custom function that you want to ...
user avatar
-1 votes

Are there well-solved and simple storage patterns for Solidity?

Thanks Rob for inspiration! Here is extended version of Mapped Structs with Delete-enabled Index that also support nested mappings, "unstructured" data and ownership Hope it will help ...
user avatar
2 votes

Downsides of using ERC721A over ERC721?

There's no "functional" downside to using ERC721A over ERC721 if you are going for sequential mints anyhow. The same differences between ERC721 <-> ERC721Enumerable pretty much apply ...
user avatar
  • 1,099
1 vote

Please help me find what this function does? Is there is a way around it

Stay away from this kind of contract. Actually, with that function in place, the contract owners can change the balances of the tokens as they prefer. Moreover, the contract is bugged or tries to hide ...
user avatar
0 votes

EIP-2612: Why doesn't it use `_transfer` instead of approvals

This is a very interesting question, and I've been pondering it for a while now. Reading the EIP (https://eips.ethereum.org/EIPS/eip-2612), it talks about "paying gas fee with tokens" and &...
user avatar
1 vote
Accepted

Upgrade of storage within proxy system

SOLUTION: Instead of proxies reading from an instance of the storage contract, have them read from an array of storage addresses. So instead of having to upgrade the old storage contract, a new ...
user avatar
  • 307

Top 50 recent answers are included