![](/img/trans.png)
[英]BEP-20 Token transfer error( unable to locate corresponding transfer event log)
請在嘗試轉移硬幣時交易狀態顯示失敗,當我檢查區塊鏈時我看到一條錯誤消息 我試過轉移硬幣 ...
[英]BEP-20 Token transfer error( unable to locate corresponding transfer event log)
請在嘗試轉移硬幣時交易狀態顯示失敗,當我檢查區塊鏈時我看到一條錯誤消息 我試過轉移硬幣 ...
[英]Source "openzeppelin-contracts/contracts/token/ERC721/ERC721.sol" not found: File import callback not supported FOUNDRY ERROR
我正在做關於堅固性的 udemy 課程,我在 Foundry 合同中遇到了這個錯誤: 找不到源“openzeppelin-contracts/contracts/token/ERC721/ERC721.sol”:不支持文件導入回調我已經設法通過從 VSC 中的 Juan 的 Blanco solid ...
[英]When calling a smart contract function, do the params record on blockchain?
我想建立一個智能合約 function,它使用調用者的密碼作為參數。 我對區塊鏈安全一無所知,所以我問以下問題: 調用智能合約function時,參數是否記錄在區塊鏈上? 另外,地址調用智能合約的function,區塊鏈會記錄哪些信息? 我認為事件發出的日志必須記錄在區塊鏈上,除了這些,還有什么? ...
[英]"Not Enough Fund" when doing buying token transaction in Solidity with Remix IDE
我對這個區塊鏈世界完全陌生,所以我想嘗試學習它。 當我按照教程創建一個簡單的 ERC-1155 合約來鑄造代幣並設定其價格時。 當我嘗試從另一個地址運行 buyToken function 時,它一直說“資金不足”。 當我調試時,msg.value 值為 0,即使我的每個地址上都有 100 以太幣 ...
[英]How this uint accept Address value in this smart contract?
誰能解釋一下 uint 變量如何在這個智能合約中接受地址 // SPDX 許可證標識符:Apache-2.0。 pragma solidity ^0.6.12; 庫 CairoConstants { uint256 公共常量 FIELD_PRIME = 0x8000000000000110000 ...
[英]how i display return value eg: phone number : balance [9222111555 : 150] in solidity
當我撥打 function 詳細信息時,它只給我返回否。 那些我有薄荷,但我想要 { "9222111888": "150", "9093164641": "550", } ...
[英]I need to understand below smart contract code
你能幫我解釋一下我在 tomb finance 上找到的智能合約代碼, tomb.sol合約嗎?// Initial distribution for the first 24h genesis pools uint256 public constant INITIAL_GENESIS_POOL_D ...
[英]Uniswap v2 swap() function. What are balance0 & balance1?
我正在學習 Uniswapv2 合約是如何工作的,但我似乎無法全神貫注於swap() function。 參考: https://github.com/Uniswap/v2-core/blob/master/contracts/UniswapV2Pair.sol#L173 第 173-174 行包 ...
[英]Why is Chainlink oracle function call failing?
在嘗試為我提供資金時,合同告訴我它遇到了一個錯誤,但沒有具體說明錯誤。 我試圖通過基金 function 資助 0.1 eth,並在終端中顯示: 在 etherscan 中它說:狀態失敗: 我試着尋找我的代碼的問題,但沒有找到。 ...
[英]How to automate a ChainLink Job to call a smart-contract function that requires the caller to be a given admin address?
ChainLink 自動化支持有條件地執行智能合約功能。 但是,當從智能合約調用 function 時,調用 function 的是 ChainLink 注冊合約,而不是注冊 UpKeep 的地址。 因此,如果要調用的 function 具有強制調用者 (msg.sender) 為給定地址(例如 ...
[英]Faucet contract only permits owner to perform transactions
一切都很好,工作得很好,但是為什么當我需要調用 function requestTokens 時,只有 owner 可以成功交易而其他地址不能使用 function 因為合約導致執行恢復? 地址:0x8c08a469BDFd679CEF0729bDEa52BC688d4bDbBC 我盡我所能,就像 ...
[英]Is it possible to call methods of contract's initializer during its initialization?
我嘗試部署以下智能合約 但它失敗並顯示以下消息: 交易已恢復為初始state。注意:被叫function如果您發送價值,則應支付,並且您發送的價值應小於您當前的余額。 調試事務以獲取更多信息。 似乎不可能在初始化期間調用合同初始化程序(創建當前合同實例的合同)的方法。 我的問題是,Contract ...
[英]I'm trying to create a token store contract
創建此合同時,行“_buyer.transfer(buyers[_buyer]);” 生成錯誤““發送”和“轉移”僅適用於“應付地址”類型的對象,而不是“地址”類型的對象。“。 這是合同代碼。 我是 Solidity 的新手,並不是智能合約開發方面的專家。 盡我所能。 請幫幫我。 謝謝你。 ...
[英]How to call the function of another smart contract in Solidity? With an example of OpenZeppelin transferOwnership function
我在學習OpenZeppelin的時候,發現它的Ownable庫有一個function transferOwnership,可以給當前合約的所有者一個地址。 我可以理解將所有者更改為某人的帳戶地址,但是,它也可以將所有者更改為合同地址。 我的問題是:如果我將當前合約的所有者更改為另一個合約地址,我 ...
[英]Memory in solidity with different types of data
當創建一個接受 arguments 的 function 時,比如 int、uint、string 等等,為什么它需要指定該字符串是 memory,但是當傳遞一個 uint 時,它不需要指定它是一個 memory 示例: 為什么它必須是 memory 當它是一個字符串(在這種情況下是 _favWor ...
[英]find and remove element from array (solidity)
我已經完成了一項任務:在工作表中找到特定地址,將其移至工作表末尾,然后通過 function 彈出消息將其刪除:這是代碼: 交易到 Wote.removeAccount 錯誤:VM 錯誤:還原。 revert 交易已經恢復到最初的state。 注意:被叫function 應該是支付的,如果你發送 ...
[英]Is the payable only for contract address or also for account address?
我正在通過官方文檔學習可靠性,我不確定的一件事是應付地址概念僅適用於合同地址? 因為我認為作為 msg.sender 的帳戶地址可以自動接收令牌,不是嗎? 順便說一句,如果 payable 是合約地址,那么下面的代碼就沒用了,對吧? ...
[英]How to check values of a variables and functions in solidity like javascript via console.log
如何通過 console.log 檢查變量和函數的值,如 javascript? 因為我需要結果的可見性才能深入理解。 我是新手... 我試過安全帽,但需要更多的了解。 ...
[英]How to optimize this smart contract function in Solidity about deleting an element in particular index of an array
我使用以下庫代碼根據其索引刪除數組中的元素。 在我看來,唯一的方法是使用循環,但它會消耗大量氣體。 還有其他優化代碼可以解決這個問題嗎? ...
[英]Get deployed contract by address
根據這個文檔。 我們可以使用ethers.getContract來獲取已部署的合約。 我已經在0x33F4623337b8F9EDc9529a79F0d68B2BeC98d5E2部署了我的合同,我的創建者地址是0x6e0F5B57FEdc8911722c92dcD5D7D0cf69ceA385現在我 ...