Category "smartcontracts"

How to use TransparentUpgradeableProxy as Transparent Proxy

I'm Solidity Newbie. I'm learning how to implement Transparent Proxy using Openzeppelin's TransparentUpgradeableProxy contract, but am having some problems. Ste

Verify and Publish Contract on Etherscan with Imported OpenZeppelin file

I'm currently building a ERC721 compliant contract and have published the contract here: https://ropsten.etherscan.io/address/0xa513bc0a0d3af384fefcd8bbc1cc0c97

Solidity bug hunting

I've got a piece of code below that attempts to implement a two-player game (with a wager on the line) of Tic-Tac-Toe, also known as Noughts and Crosses. It is

Uncaught ReferenceError: TodoList is not defined at evalmachine.<anonymous>:1:7

I've been following a tutorial for the past couple of days and I keep getting this error. todoList = await TodoList.deployed() My contract is migrated to the

Import web3 not found... in solana web3.js

I npm installed everything, yet only web3 is not working? Is this a bug or is there an alternative to this solution? import React,{useEffect, useState}from 're

use TransferFrom in solidity smartcontract ( ERC-20 )

I Need to Write a Smart Contract, In This Smart Contract User Can Send Token to Each Account in ERC-20 Network. sender :0x5C2879Ec550e2F65D557b540B7DEAB3A6d478d

How should I handle smart contract structure change in NEAR protocol?

Suppose I have a contract ... pub struct Contract { collection_a: Vector<String>, } After I deploy this version, when I change the data structure of my

Is there a way to fetch transactions history on a specific contract using chainlink?

Here is my use case I have a smart contract that emit an event . I am new to chainlink , so my question if someone know how I can track that event history with

Can I subscribe event fire from smart contract's events with NodeJS?

I just wrote smart contract function with fire event like this. And create my node.js application with following code. const express = require('express') cons

Member "team1Score" not found or not visible after argument-dependent lookup in type (contract Game) - Solidity

I'm on a course and have run into a problem. I am trying to make a function that shows the difference in team score from the perspective of the team in the vari

brownie AttributeError: 'NoneType' object has no attribute 'getEntranceFee'

Macbook Pro : Monterey Intel Core i7 Brownie v1.17.2 I am learning solidity according to reference(https://www.youtube.com/watch?v=M576WGiDBdQ&t=25510s). Wh

How to solve insufficient allawance issue when calling transferFrom? web3.js

I'm struggling with the trasferFrom method of my standad ERC20 contract. I'm working with web3.js and INFURA I have wallet1 with 50 token allowance, now if I ca

there is a problem in the gas requirement

I have been written a smart contract, I am trying to execute the following code but I have these problems: 1- "Gas requirement of function EKM.register_PK is in

Near Protocol, Smart Contract

When I run the command yarn build:release i get the error "command not found: asb" enter image description here

window.solana not found on js web3

I want to connect a Solana wallet (phantom or any other) to a web aplication through the js web3 library. I've read docs for most wallets and it seems like it's

.balanceOf is not a function - Interact with existing Contract on Blockchain

I want to automate my staking on The Sandbox. For that I need in the first step to interact with the mSand-Matic Pool Contract. It is this one: https://polygons

AttributeError: 'NoneType' object has no attribute '_with_attr' - Python running tests with pytest

My environment is : Python 3.9.9 Pytest 6.2.5 Brownie 1.17.1 I'm working on the test_fund_me.py from Patrick Collins' Smart Contract tutorial on Youtube; at thi

What is the 16 in (chainId, 16) in an Eth smart contract that is on the Rinkeby network

I am new to smart contracts and I am working on an Eth Rinkeby dapp and was wondering if anyone can tell me what the "16" means in this section: } network =

How to deploy multiple smart contracts using hardhat-deploy

I have two smart contracts that I want to deploy. I want to deploy the first one, then pass the address of the first into the constructor of the second one. I a

Restrict function access ONLY to one other specific contract in Solidity

I have a security problem in my Solidity contracts and I can't figure out how to fix it. The flow goes like this: First, we create an instance of contract A; Cr