etherscan | A thin , lightweight promise wrapper for the api | REST library
kandi X-RAY | etherscan Summary
kandi X-RAY | etherscan Summary
A thin, lightweight promise wrapper for the api.etherscan.io/apis service, exposing a common endpoint for use in JavaScript applications.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of etherscan
etherscan Key Features
etherscan Examples and Code Snippets
Community Discussions
Trending Discussions on etherscan
QUESTION
Can someone help me investigate why my Chainlink requests aren't getting fulfilled. They get fulfilled in my tests (see hardhat test etherscan events(https://kovan.etherscan.io/address/0x8Ae71A5a6c73dc87e0B9Da426c1b3B145a6F0d12#events). But they don't get fulfilled when I make them from my react app (see react app contract's etherscan events https://kovan.etherscan.io/address/0x6da2256a13fd36a884eb14185e756e89ffa695f8#events).
Same contracts (different addresses), same function call.
Updates:
Here's the code I use to call them in my tests
...ANSWER
Answered 2021-Jun-16 at 00:09Remove your agreement vars in MinimalClone.sol
, and either have the user input them as args in your init()
method or hardcode them into the request like this:
QUESTION
In ERC20 interface, there are 2 events to be implemented.
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
What if we actually implement transfer and approve functions but never emit the events. Will transaction still appear on bscscan or etherscan, or will it be a quiet transaction that only transactor knows?
...ANSWER
Answered 2021-Jun-05 at 09:39BscScan and EtherScan use the Transfer()
event to update their statistics of token holders and to display amount of tokens transfered in the transaction detail page.
If you don't emit the event, it
- wouldn't display the "Tokens Transferred" field in the transaction detail page
- wouldn't update the token balance of the sender and receiver on Etherscan (e.g. on their address detail page)
But the contract would still transfer the tokens, and Etherscan would still show the transaction detail page (just without the tokens data).
QUESTION
I have created a ERC-721 contract deployed on ropston network. Using contract I'm creating NFT's and its totally working fine.
Now for the transfer part I need to get tokenID of any NFT and transfer to to other address but I'm not able get the tokenID whenever I fetch transaction details from etherscan or using web3.
I want to store the tokenID in DB so it can be utilized while transferring to other address.
I have encircled the exact tokenID required in above image.
Im using following code :
...ANSWER
Answered 2021-Jun-02 at 13:36Your mintNFT()
function doesn't emit any event containing the newItemId
.
solidity is using the standard definition of transfer
There's no "standard definition", the ERC-721 standard only defines an interface and few other rules - and the actual implementation (of the interface) is on each developer. However I'm assuming that by the "standard definition" you mean the OpenZeppelin implementation, which is a widely used implementation of the ERC-721 standard and is used by many people who start coding in Solidity.
You can see in the linked implementation, that the OZ _mint()
function emits the Transfer()
event, where the 3rd argument is the minted token ID.
So executing your mintNFT()
function effectively emits the Transfer()
event that contains the newly minted token ID as a value of the 3rd parameter.
After you've executed the mintNFT()
contract function from your JS code, it returns a PromiEvent
object, that you can use to catch its receipt
event.
The receipt contains the emited logs, where you can find the Transfer()
log as well.
QUESTION
I'm currently building a ERC721 compliant contract and have published the contract here: https://ropsten.etherscan.io/address/0xa513bc0a0d3af384fefcd8bbc1cc0c9763307c39 - I'm now attempting to verify and publish the contract source code
The start of my file looks like so:
...ANSWER
Answered 2021-May-28 at 15:51Simply put I had to go down a rabbit hole to work this out as I'm pretty new to Solidity.
I had to do the following;
- Learn and use https://www.trufflesuite.com/ to setup a project and put my contract there (Using Ganache helped a lot with testing for anyone new to Solidity too)
- Use HD Wallet provider package and follow tutorial here to get it on ropsten Etherscan https://medium.com/coinmonks/5-minute-guide-to-deploying-smart-contracts-with-truffle-and-ropsten-b3e30d5ee1e
- Finally, use truffle-plugin-verify https://github.com/rkalis/truffle-plugin-verify to verify the contract on Etherscan
All in all, I am pretty sure there is no way within the Etherscan web app to verify a contract that contains an imported file.
The final product is here if anyone is interested in seeing how I structured it all https://github.com/lukecurtis93/viper-nft (it's just a CryptoKitties clone I found online as a base and updated it all)
QUESTION
Does anyone know how to obtain the list of transactions from a contract' address I have tried the etherscan.io API https://etherscan.io/apis#contracts
I have followed the instructions to receive a response with a list of all transaction for a contract's address : with the following url = https://api.etherscan.io/api?module=account&action=txlist&address=&startblock=0&endblock=99999999&sort=asc&apikey=
Below, my http request to the Etherscan API =
...ANSWER
Answered 2021-May-21 at 13:40Goerli Etherscan has a different API host.
You need to use https://api-goerli.etherscan.io/
instead of https://api.etherscan.io/
QUESTION
The contract which I compile in Remix and depoly on Ropsten.
...ANSWER
Answered 2021-May-17 at 08:52The Remix bytecode export contains the bytecode
variable definition and assembly
block without the constructor
being executed - just the actual definitions compiled to bytecode.
Constructor usually returns the contract instance (including its parent contracts and imported libraries). But in this case, the assembly
block forces the EVM to not return the contract instance, but to return the value of the bytecode
variable from the constructor.
Then the deployment process continues as usual - the EVM stores the constructor return value (usually the contract instance, now the bytecode
) into the contract storage.
QUESTION
My problem with this powershell script is that I want to get table content from number 3 table:
Number 3 table has a different URL ending than the first two and problem with my script is that, no matter what I do, I can't get information from the third one. I have tried by ID name and all that but nothing seems to work. If I change the URL it will still get info From the first and second, and if I let it run so that maybe it can pull something from third one but it always stops at the end of a second one. For the ending line I only want to communicate with the third table. I want something like this↓
...ANSWER
Answered 2021-May-14 at 10:40i have looked at the html page and you have an iframe for this table and the id of this iframe is tokenpageiframe
QUESTION
I'm using Chainlink VRF to get a random number, however, I keep getting
...ANSWER
Answered 2021-May-03 at 21:35The Chainlink VRF has gas limits on callback. Reference the documentation to see exactly how much for each network.
QUESTION
I have a question about ERC20 token contracts in general:
Apparently after verifying on Etherscan, all token contracts become visible to the public.
- Isn't that a security risk ?
- What if we do not verify our contract ?
- Can some of these contracts (that are verified and visible) on the Etherscan be used again for new coins, or are they copyright protected ?
Thank you in advance!
...ANSWER
Answered 2021-Apr-24 at 08:26Apparently after verifying on Etherscan, all token contracts become visible to the public.
Their bytecode is already public when they're deployed. You're just making the source code public too.
Isn't that a security risk ?
Only if your contract contains a security flaw.
But if your contract does contain a security flaw, it's a security risk to deploy it even without publishing the source code. There are ways to "decompile" the bytecode to some pseudocode or even Solidity to some extent, so anyone can see the logic of your contract even if the source code is not published.
What if we do not verify our contract ?
It's a fully functional contract, just without verified source code.
Can some of these contracts (that are verified and visible) on the Etherscan be used again for new coins, or are they copyright protected ?
It depends on the license under which the authors created it. It's possible to bypass the license - so if someone publishes the contract under "Do not copy" license, someone is still able to copy... But that's a legal topic, not programming.
QUESTION
I am following along the documentation here: https://docs.alchemyapi.io/alchemy/tutorials/how-to-create-an-nft/how-to-mint-a-nft. And have a smart contract of form:
...ANSWER
Answered 2021-Apr-16 at 08:51OpenZeppelin's Ownable.sol defines the default owner
value as the contract deployer. You can later change it by calling transferOwnership()
or renounce the owner (i.e. set to 0x0
) by calling renounceOwnership()
.
The onlyOwner
modifier reverts the transaction if it's not sent by the current owner
. (see the code)
So you need to call the mintNFT()
function from the same address that deployed the contract, because that's the current owner
. Or you can change the owner
first by calling transferOwnership()
(from the current owner
address).
Removing the onlyOwner
modifier from the mintNFT()
function would allow anyone to call the function.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install etherscan
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page