Skip to content

Instantly share code, notes, and snippets.

@drortirosh
drortirosh / TestCallWithValue.sol
Created June 21, 2020 13:57
Sample on funding proxy account without eth.
//SPDX-License-Identifier: MIT
pragma solidity ^0.6.9;
//helper: decode error message
// (NOT efficient: using calldata, which means string copies..)
library LibError {
function getError(string calldata txt, bytes calldata ret) external pure returns(string memory) {
if ( ret.length<36) return "";
return string(abi.encodePacked(txt, abi.decode(ret[4:], (string))));
}
@drortirosh
drortirosh / .env
Created May 1, 2020 14:13
docker-compose for easy startup of GSNv1 relay
HOST=myhost.com
NODE_URL=https://mainnet.infura.io/v3/c3422181d0594697a38defe7706a1e5b
RELAY_HUB=0xD216153c06E857cD7f72665E0aF1d7D82172F494
GAS_PRICE_PERCENT=70