![](/img/trans.png)
[英]I'm trying to get the address of my smart contract using truffle and typescript and I get a type error
我正在嘗試使用 truffle 和 typescript 獲取我的智能合約的地址,但出現類型錯誤: 發生錯誤的方法: 錯誤描述: ...
[英]I'm trying to get the address of my smart contract using truffle and typescript and I get a type error
我正在嘗試使用 truffle 和 typescript 獲取我的智能合約的地址,但出現類型錯誤: 發生錯誤的方法: 錯誤描述: ...
[英]Truffle not able to get Solidity Compiler
jaypatel@192 Bridge Contract % truffle 編譯編譯你的合同... 錯誤:無法從以下位置獲取 Solidity 編譯器: https://relay.trufflesuite.com/solc/emscripten-wasm32/,https://binaries ...
[英]Truffle only compiles, does not deploy - Ganache
我在端口 8545 上使用 Ganache 啟動了一個私有 blockchain.network。我有一些正在成功編譯的智能合約。 但是,它們沒有部署到 localhost:8545 的 connected.network 這是我的 truffle-config.js ` ` 嘗試松露遷移我嘗試 ...
[英]Truffle doesn't create the file initial migration.js automatically
我正在嘗試在 ganache 上遷移智能合約,但我注意到文件 initial migration.js 不是自動創建的。 啟動 comand truffle 版本我得到這個: 怎么了? 是版本問題嗎? 提前致謝我使用 visual studio code 打開了一個終端。 我希望文件初始 migr ...
[英]how to setup basic environment for react and smart contract deployment
如何為 React 和智能合約部署設置基礎環境我無法在 vs code 上為 truffle、solidity、react 應用程序的技術堆棧基本環境設置環境 ...
[英]How can I test calling a contract function from a specific address?
這是我的合同:// SPDX-License-Identifier: ISC pragma solidity ^0.8.17; contract NoteDrop { string public text = "Hello, world!"; address public las ...
[英]ERC4907 compile issue in "function _beforeTokenTransfer"
我正在使用Truffle處理 NFT Marketplace 創建任務。 為此,我正在使用ERC4907智能合約並嘗試對其進行編譯。 以下是我的 ERC4907 代碼。 嘗試編譯時出現以下錯誤。 錯誤出在“_beforeTokenTransfer”函數上。 我正在使用以下版本松露 v5.6.8(核心 ...
[英]How to retrieve a value of a public state variable from Solidity smart contract in TypeScript?
我正在嘗試通過 JavaScript 以 solidity 返回公共狀態變量highestBid的值,將調用中的值保存到變量的可能方法是什么? 目前我得到: undefined 。 TS: 索爾: ...
[英]ProviderError: HttpProviderError at HttpProvider.request (.../node_modules/hardhat/src/internal/core/providers/http.ts:78:19)
我想在我的測試環境中部署一個 dex 這是 github 倉庫的鏈接https://github.com/hamed-elahifar/geoswa3 這是主要功能中 deploy.js 腳本中的步驟,首先我們部署 erc20 令牌,然后部署交換的路由器和工廠下一步將批准路由器在該腳本創建交換對后 ...
[英]Parser error when trying to run a smart contract
我是智能合約開發的新手,我剛剛在 ganache 上部署了我的第一個合約。 這是 SimpleLearn.sol 的代碼 這是 2_deploy_contract.js 的代碼 當我嘗試使用 deployed() 方法創建合約實例時,如下所示: let newinst = await SimpleL ...
[英]Declare constant at file level in solidity 0.4.17
我需要聲明一個可以被另一個合約訪問的“全局”常量。 給定一個非常簡單的 Solidity 合約如下:pragma solidity ^0.4.17; uint256 constant MY_CONSTANT = 3; contract MyContract { constructor() p ...
[英]Insufficient funds on bscTestnet when running migrate function on Truffle despite having .5 BNB in the contract account
test.net 交易沒有通過。 我需要調整 gas 或添加更多 BNB 嗎? 我不認為我必須將 BNB 轉換為 ETH,但我得到的 output 說合約地址有 0 wei。 我運行了 truffle migrate --reset -.network bscTes.net。 我配置了 truff ...
[英]Compilation warnings encountered(truffle test)
當我運行松露測試時,我得到以下聲明。 這是一個錯誤嗎? 遇到的編譯警告: project:/contracts/Fundraiser.sol:18:5: 警告:此聲明隱藏了現有聲明。 地址應付_受益人, ^----------------------------^ project:/cont ...
[英]Solidity-extension in VS Code can't resolve the imports from node_modules
請查看我的環境詳細信息。 環境安裝了nvm的節點 Truffle 安裝在不同的節點環境中,只需通過nvm use v16.17.0更改節點即可切換在我的 vs code 中,我為 VS Code 擴展安裝了 Truffle,它也緊密依賴於 solidity 擴展。 我已經安裝了Ganache桌面應用 ...
[英]ParserError: Function, variable, struct or modifier declaration expected(Truffle test)
我目前正在學習solidity。 我已經編寫了“使用 Solidity 和以太坊進行智能合約開發實踐”(O'Reilly/日文版)中出現的代碼,但是當我運行 TruffleTest 時,出現以下錯誤 CompileError: project:/contracts/Fundraiser.sol:9 ...
[英]How to get to previous deployment in truffle
所以我兩次部署了一個應用程序。 但我只想對第一個進行更改。 那么該怎么做呢? 這是我的總結: ...
[英]Meaning of deploying a Smart Contract
我正在研究以太坊 Solidity 區塊鏈,並使用 truffle.js 部署智能合約,我對智能合約的工作方式有點困惑。 部署智能合約是否等同於實例化它? (我的意思是稱它為構造函數) 因此,每次我需要創建一個智能合約的新實例時,我真的需要部署它嗎? 部署產生的地址是指向智能合約實例的指針,而不是 ...
[英]Console Goerli not functioning on Truffle - This version of µWS is not compatible with your Node.js build
當我嘗試運行 npx truffle console -.network goerli 來啟動控制台,然后使用 truffle 在 goerli tes.net 上遷移我的合同時,出現以下錯誤。 我的松露配置文件是: 我正在嘗試在Goerli上上傳一個ERC721智能合約。 問題在哪里? 是node ...
[英]Transaction was not mined within 750 seconds while deploying to rinkeby testnet
我正在嘗試在 rinkeby 測試網上部署智能合約。 但我不斷收到以下錯誤 我嘗試在 ropsten 上進行部署,它成功了,一切正常。 我使用的 rinkeby 網絡設置如下 這可能是什么原因? 提前致謝 ...
[英]Optimiser settings in truffle config is not working while migrating open-zeppelin proxy using deployProxy
賞金將在 6 天后到期。 此問題的答案有資格獲得+50聲望賞金。 Parshuram Thorat希望引起更多關注這個問題: 我只需要關閉TransparentUpgradableProxy的優化器,由於代理是由deployProxy模塊部署的,它通過bscscan驗證自己。 需要一個解決方案來 ...