Hi everyone,
Iām stuck with " Part 7 ā Interacting & Testing our proxy"
Every time I type in ātruffle developā, itās getting stuck and I have to restart my VS Code.
I donāt know what Iām doing wrong.
Below you can find some information.
Could not connect to your Ethereum client with the following parameters:
- host > 127.0.0.1
- port > 7545
- network_id > 5777
Please check that your Ethereum client:
- is running
- is accepting RPC connections (i.e., "--rpc" option is used in geth)
- is accessible over the network
- is properly configured in your Truffle configuration file (truffle-config.js)
Truffle v5.0.6 (core: 5.0.6)
Node v16.13.1
% truffle version
Truffle v5.0.6 (core: 5.0.6)
Solidity - 0.5.17 (solc-js)
Node v16.13.1
silkuijt@MBP-van-sil SmartContractUpgradeabilityFullExample %
pragma solidity 0.5.17;
import "./Storage.sol";
contract Proxy is Storage{
address currentAddress;
constructor(address _currenAddress) public{
currentAddress = _currenAddress;
}
function upgrade(address _newAddress) public{
currentAddress = _newAddress;
}
//Fallback Functie
function () payable external {
// Doorsturen naar currentAddress
address implementation = currentAddress;
require(currentAddress != address(0));
bytes memory data = msg.data;
assembly {
let result := delegatecall(gas, implementation, add(data, 0x20), mload(data), 0, 0)
let size := returndatasize
let ptr := mload(0x40)
returndatacopy(ptr, 0, size)
switch result
case 0 {revert(ptr, size)}
default{return(ptr, size)}
}
}
}
The only thing I changed at the truffle-config.js file, was:
compilers: {
solc: {
version: "0.5.17", // Fetch exact version from solc-bin (default: truffle's version)
// docker: true, // Use "0.5.1" you've installed locally with docker (default: false)
// settings: { // See the solidity docs for advice about optimization and evmVersion
// optimizer: {
// enabled: false,
// runs: 200
// },
// evmVersion: "byzantium"
// }
}
},
Can someone please help me? I really want to go forward, but this is keeping me behindā:sweat_smile: