Category "smartcontracts"

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

How to transfer a NFT from one account to another using ERC721?

I'm writing an NFT smart contract using the OpenZeppelin ERC721Full contract. I'm able to mint NFTs, but I want to have a button that enables them to be bought.

Truffle compile

I get this Truffle error when I compile. I have tried adding payable to the addresses but it won't work. This is the error: TypeError: Member "transfer" not fo

not found utils/context.sol when i import from openzepplin

i have copied a contract from openzappline. but when i compile it on remix it gives me the error....that utils/context.sol is not found. here is the import prag

Hardhat – What are the strange calls to my smart contract?

I am using Hardhat hackathon boilerplate and calling my smart contract's (address 1c0, addresses shortened for clarity) function MyContract#addProduct from the

How to test smart contract with cross-contract invoke using truffle?

I have two contract, I write in in one file, named Sum.sol. The sum contract invoke Add contract. I just want to test cross-contract invoking. If I didn't put t

Why do openSea fetching data from IPFS all of a sudden?

This the validation json I got for my nft toke 34 HTTP 200 OK Allow: GET, OPTIONS Content-Type: application/json Vary: Accept { "valid": true, "token_u

How to identify Who holds an NFT for how long?

I am developing an NFT collection using ERC721 token. But I would like to know how a particular nft is held by a particular customer? I am sensing there are two

create two nft collections from one smart contract (erc1155) in OpenSea

I want to list two collections on Opensea but instead of creating two smart contracts for that, I want to create only one (to save gas fees of uploading a contr

Why my ERC721 contract in Opensea can't work normally (Without any code of openzeppelin github)

I want to know how OpenSea system read contract and call functions. So, I try to write a ERC721 contract without import any other code. // SPDX-License-Identifi

How to add royalty fee to NFT collection

I am currently learning about NFTs and I reached the point where I deployed the contract and I can mint and everything going well. The only missing part is roya

PHP web3 ERC20 token function call

I have a Smart Contract that represent ERC20 token. I already deployed the smart contract on Binance Testnet using HardHat. I have a deployed Smart Contract add