简体   繁体   English

如何与已经部署的智能合约交互

[英]how to interact with an already deployed smart contract

I was reading this contract that I found in the solidity documentation and I assume this contract is unique and deployed by the auction house.我正在阅读我在solidity 文档中找到的这份合同,我认为这份合同是独一无二的,并且由拍卖行部署。 All users can make an offer.所有用户都可以出价。 From an implementation point of view, how does a user call the methods of this contract using web3.js if he didn't deploy it?从实现的角度来看,如果用户不部署,如何使用 web3.js 调用这个合约的方法?

You do not need to deploy contract for calling its methods using web3.js.您无需部署合约即可使用 web3.js 调用其方法。

Only if the methods need owner rights you could not be able to call its methods, but otherwise, you can call methods of the smart contract.只有当方法需要所有者权限时,你才能调用它的方法,否则,你可以调用智能合约的方法。

Also you can use Etherscan for calling contract methods.您也可以使用 Etherscan 来调用合约方法。 Navigate to the Contract section of your selected smart contract, then in sections Read Contract and Write Contract you can call contracts' methods.导航到您选择的智能合约的合约部分,然后在Read ContractWrite Contract部分,您可以调用合约的方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将 Function 添加到已部署的智能合约 - How to Add a Function to an Already Deployed Smart Contract 用户应如何与智能合约进行交互? - How should users interact with a smart contract? 如何将我的智能合约与另一个已部署的智能合约连接起来? - How to connect my smart contract with another deployed smart contract? 我可以更改已经部署在 BSC 上的智能合约吗? - Can I change smart contract which is already deployed on BSC? 提供者未设置或无效。 如何在没有钱包的情况下与智能合约交互? - Provider not set or invalid. How to interact with smart contract without wallet? 鉴于智能合约一旦部署就不可更改,uniswap 如何升级其智能合约? - How does uniswap upgrade its smart contract given that smart contract are immutable once deployed? 与部署在以太坊测试网rinkeby上的智能合约进行交互 - Interacting with a smart contract deployed on ethereum testnet rinkeby 在solidity Tron 智能合约中与TRC20 代币交互 - Interact with TRC20 tokens in solidity Tron Smart Contract 如何从以太坊中部署的合约部署合约? - How to deploy contract from deployed contract in Ethereum? 通过字节从新的智能合约调用已部署的智能合约功能。 - Call deployed smart contract function from new smart contract via bytes.?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM