Category "smartcontracts"

BSC Testnet: Truffle Migrate ETIMEDOUT

I need to deploy my smart contract to BSC Testnet I always got this : Error: PollingBlockTracker - encountered an error while attempting to update latest block:

Is Runtime::generate_uuid() safe in Scrypto?

I want to make a game in a Scrypto blueprint where users can play with their Gumball NFTs. My blueprint has a pub fn attack(&self, my_gumball: Proof, other_

How can we generate random values in Scrypto?

How can we generate random numbers in Scrypto if floating point libraries are not allowed be used? I want to be able to generate unique IDs for NFTs.

Standard Common Practice Method in Solidity to perfrom any type of division?

I am trying to do the following calculation with solidity: 3,000 / 45,000,000 = 0.000067 with the following method: // SPDX-License-Identifier: MIT pragma solid

How can I implement a lazy-minting smart contract that doesn't actually mint NFTs?

This is my first experience writing a smart contract, so I am still trying to navigate how this all works. I have a smart contract on the Rinkeby test network t

WalletConnect & web3js - how to forget previously set wallet?

I'm writig a dApp using web3Modal and web3js libraries. I have an issue regarding the WalletConnect provider. Upon choosing to connect using WalletConnect, the

ValidationError on smart contract function call for no apparent reason(web3py)?

I am trying to call Uniswap's Router's function swapExactTokensForETHSupportingFeeOnTransferTokens(). When I enter the values manually on etherscan, it goes thr

is two different ERC721 contract can mint same NFT

I'm learning blockchain development recently and I'm implementing ERC721 contract to mint NFT and store the mapping of ownership. What if I deploy a second cont

difference between interface and abstract contract in solidity

I am learning solidity and got to know that interface and abstract are both classes that may contain unused functions. My doubt is: What is the difference betwe

How to get the price of BSC token directly the token pool contract in web3.py

I'm trying to get the price of some BSC token directly from the contract. Doing some searches, I found a mix of ideas with the snippet below. I'm sure the code

Solidity - Solidity code to Input JSON Description

I want to compile my ethereum HelloWorld.sol smart contract. In all the tutorials is that you do it like this: var solc = require('solc'); var compiledContract

Eth, how to call a deposit function from a smart contract

I am working on a project where I need to send ether from an user to a smart contract and from the smart contract to the user. The smart contract is code in Sol

How to find out if an Ethereum address is a contract?

An address in Solidity can be an account or a contract (or other things, such as a transaction). When I have a variable x, holding an address, how can I test if

Timed Advertisements Solidity Contract

Basically, I'm trying to make the smart contract be able to take exactly 0.05 eth ONLY when the cooldown timer is set to 0. The Dapp I'm creating is a first com

Transaction reverted: function selector was not recognized and there's no fallback function

I am interacting with my own smart contract. It's a very simple one. // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract ERC20 { string public n

Error with <string>.append() in ton-solidity: Different number of components on the left hand side (1) than on the right hand side (0)

My code for concatenating 2 strings is pretty simple: string baseUrl = "http://localhost:8080/"; string url = baseUrl.append(url_secret); But I have got an err

Everscale tonos-cli. Can't deploy a contract. Error: failed to create inbound message: Encode deploy message failed: Wrong parameters count

I can't deploy compiled free ton solidity smartcontract through tonos-cli. > tonos-cli deploy Hello.tvc tonos-cli.conf.json Config: /ton/solidity_deploy/hel

Everscale-Solidity. How to get hash from data encoded into cell? tvm.hash analogue?

Free TON Solidity. How to get hash from data encoded into cell? tvm.hash() analogue?

Everscale Solidity error by timeout: code: 3025 Contract execution was terminated with error

Free TON Solidity code or execution error. Can't understand my mistake, I already compact the code to the minimum: cat ./SimpleStorage.sol pragma solidity >=

Incorrect result of sha256 of a string in a Everscale Solidity smart contract

I would like to compute the sha256 of a string in a Free TON-Solidity contract, I do it by storing the string in a TvmBuilder and then passing it as a TvmSlice