问题标签 [ganache]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
yaml - 布朗尼甘纳许链的时间戳不正确
我正在玩以太坊网络应用程序。为了测试我的前端客户端,我想在“过去”执行一些事务,所以当我的客户端读取当前时间戳时,视觉效果会相应更新。为此,我想用初始块启动我的本地链1980-01-01 00:00:00+00:00
。
我已经编辑为ganache ( )brownie-config.yaml
添加了一个选项,它似乎被传播到了命令中,但是该方法给了我当前时间:--time
time: 1980-01-01T00:00:00+00:00
ganache-cli
chain.time
我错过了什么吗?
amazon-web-services - 通过 AWS Route 53,ALB 公开使用端口 8545 的 ECS Fargate 容器的终端节点
我想通过 AWS Route 53、应用程序负载均衡器和 ECS Fargate 公开使用端口 8545 的工具的端点。我创建了一个包含以下内容的 docker 文件:
对于目标群体,我一直使用 HTTP 协议,端口 8546;对于 Application Load Balancer,我将 HTTP:80 设置为重定向到 443;对于 ECS 任务定义,我将容器端口设置为 8545
当我运行连接到此容器的脚本时,发生错误
Error: Connection refused or URL couldn't be resolved: https://Infura_node_URL
如果我浏览已配置的 Route 53 URL,它将继续加载,直到最终超时。
我对网络比较陌生,但我相信我设置的协议或端口可能有问题,有人可以帮忙吗?
*如果我在本地运行这个 docker 容器,http://localhost:8546
会显示“400 Bad Request”,这是正确的响应
ethereum - 为什么我的 Solidity 以太坊合约的 gas 用完了?
松露迁移——重置
编译你的合同...
一切都是最新的,没有什么要编译的。
开始迁移...
网络名称:'development' 网络 ID:5777 区块气体限制:672197500 (0x2810eb7c)
1_initial_migration.js
替换“迁移”
transaction hash: 0xf41feee2b768ba375d95ded5c40a48e7af3d59554f616738102a2a9805824d77 Blocks: 0 Seconds: 0 contract address: 0xe75Ea4aDD9728c9846778a695cE0CF32b66C1c52 block number: 1 block timestamp: 1621246185 account: 0x33b005e2f8d83120b4ab4bDde1bD7Ad704077801 balance: 99.99626098 gas used: 186951 (0x2da47) gas price: 20 gwei value sent: 0 ETH total cost: 0.00373902 ETH
保存迁移到链。保存工件
总成本:0.00373902 ETH
2_deploy_contracts.js
替换“加密男孩”
错误:*** 部署失败 ***
“CryptoBoys”的gas用完了(使用您在网络配置或部署参数中设置的值。)
- 区块限制:672197500 (0x2810eb7c)
- 气体发送:6721975 (0x6691b7)
当我编写此函数时,它导致了上述错误
ethereum - 使用 ganache-cli 和 web3.js 向复合协议提供测试资产时出错
我正在尝试使用本指南向 复合协议提供资产:向复合协议提供资产。
- 我在https://infura.io/创建了帐户并获得了我的 ProjectID。
- 我克隆了https://github.com/compound-developers/compound-supply-examples
- 执行
我的 ProjectID 在https://mainnet.infura.io/v3/ url
- 之后,我
node web3-js-examples/supply-eth-via-web3.js
在上一步supply-eth-via-web3.js使用生成的 privateKey 运行。
我得到了一个错误:
似乎是cEthContract.methods.mint().send()
正确执行的方法并且 ETH 钱包的余额正在发生变化。但在那之后所有其他方法都返回相同的错误(见上文)。
flutter - 如何解决“VM Exception while processing transaction: out of gas”
我在处理交易时遇到了 VM 异常:合同中的气体错误。
这是我的 truffle-config.js 文件
我的迁移文件
1_initial_migration.js
2_deploy_contracts.js
合同.sol 文件
contract_licking.dart 文件
它ganache-cli错误
我应该怎么办?请帮帮我!!ㅠㅠ
blockchain - 如何确定我在 Ganache 中连接的网络
如何连接确定我在 Ganache 中连接的网络
我试过这个 const networkId = await Web3.eth.net.getId()
但我得到的错误是这个
未处理的拒绝(TypeError):无法读取未定义的属性“网络”
ethereum - 为什么 truffe 迁移命令不起作用?为了我
Truffle v5.3.9(核心:5.3.9)节点 v16.3.0
这是来自这个视频https://youtu.be/XLahq4qyors?t=1385
是的,我的 ganache 已打开,我的 truffle-config.json 正确配置了正确的端口,并且所有尝试了这项工作的其他解决方案,但不幸的是它不起作用
我的配置
需要('babel-polyfill');
reactjs - 不断的重新渲染是否会使我的反应 dapp 变慢?还是web3有问题?
我目前正在尝试从头开始编写一个 dapp,使用 Dapp 大学的 EthSwap ( https://github.com/dappuniversity/eth_swap ) 作为模型(基本上是在不查看他的代码的情况下尝试重新创建这个 dapp)。基本上,dapp 只允许你购买 erc20 代币。它似乎确实有效,但它确实很慢。我认为这可能是 react 的一个问题,因为我目前是该框架的新手,并且可能陷入了一些性能问题。我尝试了以下方法以确保消除其他原因:
- 更改浏览器(Chrome --> Brave)并在两者上安装和使用元掩码
- 从 ganache gui 切换到 ganache-cli
- 我将与 web3 的连接视为一个单独的组件并导入它,但最后只是将此代码放入 App.js
这是我的代码:
ethereum - How can i store a contract address
I have create a Voting Dapp using web3j and ganache, but their is a small problem. I decide to deploy a voting contract every time a new election begin, and there will be a administrator who control the deploy of the contract and the begin and end of the election. So when the voting contract is deployed, only can the administrator get the contract contract address. how can I send the address to normal citizens so they can call the smart contract. I thought of storing the contract address in a normal database, but if the database is hacked or destroyed, the whole dapp would crash. Is there any function in web3j that I can store a string in the blockchain itself? ps. I saw the web3j.dbputString function but I have no idea how to use it.
here is the contract deployed segment.