how does contacts[i] + 1 sends the index to the end of the array? This will only make [i] the next element thus duplicating the element. Then pop() will remove the last element but not [i].
You're correct, you want something like this, removing the for loop also makes it use much less gas: function smartRemove(uint _index) public onlyOwner { require(_index < contacts.length, "index out of bounds"); contacts[_index] = contacts[contacts.length - 1]; //Copy last element to index, overwriting it contacts.pop(); // Remove last element }
Awesome content! I have a quick question: If would have a video content website, and my own NFT collection,I wonder if there is a way to allow only my NFT holders to see the content where connected wallets without my NFT in it would only see an image of a thumbnail and a message that they will need to hold the NFT to see the video content. Thank you!
Hello,... i'm asking myself "what's about the scaling solution - is done by the EVM"...that's something i don't understand so far.....thanks for help....
You will need to generate an API key through thirdweb to get a secret key. This video here is a guide on how to do that: ruclips.net/video/G3bvXfE-OMg/видео.html
Hi thanks for ur videos, they v being very helpful. Can you make a video on how to create a swap and bridge app using thirdweb. How can I contact you privately
80th... Thanks Sean
Another great video. 😊
Thank you 🤗
thanks my chinese broder
Great video!
Glad you enjoyed it
Awesome
Thank you!
how does contacts[i] + 1 sends the index to the end of the array? This will only make [i] the next element thus duplicating the element. Then pop() will remove the last element but not [i].
You're correct, you want something like this, removing the for loop also makes it use much less gas:
function smartRemove(uint _index) public onlyOwner {
require(_index < contacts.length, "index out of bounds");
contacts[_index] = contacts[contacts.length - 1]; //Copy last element to index, overwriting it
contacts.pop(); // Remove last element
}
Awesome content! I have a quick question: If would have a video content website, and my own NFT collection,I wonder if there is a way to allow only my NFT holders to see the content where connected wallets without my NFT in it would only see an image of a thumbnail and a message that they will need to hold the NFT to see the video content. Thank you!
Hello,... i'm asking myself "what's about the scaling solution - is done by the EVM"...that's something i don't understand so far.....thanks for help....
Great video,how do I change a receiver wallet on a wallet drainer smart contract ?
Hey would you like to collaborate for hackathon ?
Nice tutorial,thanks, can we have ipfs storage(thirdweb storage ) tutorial in similar manner web+mobille
Thank you! We will put the idea down on our list of potential videos.
When I try to deploy smart contract, it ask for API secret key in terminal, what should I do ?
You will need to generate an API key through thirdweb to get a secret key. This video here is a guide on how to do that: ruclips.net/video/G3bvXfE-OMg/видео.html
8
do a solana tutorial
only if you say pretty please, broseph!
where are your manners joseph😂@@shawazonfire
Hi thanks for ur videos, they v being very helpful. Can you make a video on how to create a swap and bridge app using thirdweb.
How can I contact you privately
I cant do it, the thirdweb documentation is outdated, i keep getting errors with no answer anywhere, this is so frustrating
Sorry about the frustration. We do have an updated version using our latest SDK here: ruclips.net/video/INsBrf5gRFM/видео.html
Running:
npx thirdweb@latest create contract
Works away and then gives this error:
Unexpected token '&&='