3

Your assumptions are correct, it needs to be public but modifiers can help in this case. ChainlinkClient has recordchainlinkfulfillment modifier for fulfillment callbacks. This modifier specifies that only the original oracle that was called may call this function, the oracle defined when you send the request. Reference: chainlink docs


2

Here are the key topics and keywords to search for: Generally: "Whitelist" the tokens you DO accept. Use the "approve and transferFrom" pattern. Decide if your token list will be static or changeable and consider the "Ownable" pattern to control access to the maintenance function if the latter. Otherwise, consider populating ...


2

You can have multiple functions with the same name, as long as their signature is not the same. The parameters are also part of the signature, so the function signature of those two functions is different. So the functions do not get mixed up in any way. Whenever you call a contract function, you have to provide the parameters as well. The executed function ...


1

For instance: 1️⃣is has three characters: The digit one: 1, variation selector, a Combining Enclosing Keycap. It does have 3 characters, but they take 7 bytes. But in Solidity, 1️⃣ is counted as 7. You are treating the text as bytes, so it's correctly returning 7. One option would be to count the number of bytes - instead of characters - in JS on your ...


1

It always depends on your needs. The biggest difference is that you can't iterate over a mapping. So if you store two entries (key => value) in a mapping, there is no way to get the values without knowing the keys. In your example, it also depends on your needs. If you only want to access the answers based on known key (so for example a function which ...


1

By default, a contract without a payable function can't receive Ether. However, there are some exceptions, or tricks, on how it's possible: https://ethereum.stackexchange.com/a/63988/31933 But for normal usage, you need a receive payable (https://docs.soliditylang.org/en/v0.8.0/contracts.html#receive-ether-function) function in the contract. So the minimum ...


1

You can do this: constructor() { foo(); } function foo() public { ... but you cannot do this: constructor() { this.foo(); // external call to non-existant function } function foo() external { foo() is indeed available as an external function from functions but the constructor doesn't "write" the code until the end, so foo() does not exist ...


1

I'm not sure why it's written that way in the docs. If you have the contract source code (as is the case here), you can freely create new instances of it. It's just a matter of whether you want to do that (or whether you should do that). My guess is that the doc is trying to say that "don't accidentally create a new instance of it when you just wanted ...


1

Yes, it is possible as you have the functions _mint() & _setTokenURI(). Following is a simple example, which is intended to do the same: Solidity // contracts/GameItem.sol // SPDX-License-Identifier: MIT pragma solidity <0.8.0; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Counters.sol&...


1

When you hit "Compile ww1.sol", the remix will compile all contracts inside that solidity file. After compiling the ww1.sol, If you change Context (Context.sol) to NiftToken (ww1.sol) (NOTE: don't click compile again after changing to NiftToken) and then click on compilation details then you will see the ABI of NiftToken Example: For Q2, You don't ...


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