This gist has been deprecated. Please refer to the Gnosis Safe Devloper portal for all resources or reach out to the team via Discord.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ------------------------ */ | |
// Call Vault Manager (DsProxyActions.sol) | |
/* ------------------------ */ | |
function callVaultManager (bytes memory _data) public payable { | |
IDSProxy proxy = IDSProxy(dss_proxy); | |
proxy.execute.value(msg.value)(vault_manager, _data); | |
} | |
function callVaultManager (uint256 _amount, bytes memory _data) public { | |
IDSProxy proxy = IDSProxy(dss_proxy); |
Get the value of COMP earned for an address that uses the Compound protocol. This can be done using the Lens contract with JSON RPC or another Smart Contract. If you do an eth_call
with JSON RPC, it is free (no gas costs).
- Use the
getCompBalanceMetadataExt
method in the Lens contract https://etherscan.io/address/0xdCbDb7306c6Ff46f77B349188dC18cEd9DF30299#code - Lens address is posted here https://github.com/compound-finance/compound-protocol/blob/master/networks/mainnet.json#L31
- Here is the definition https://github.com/compound-finance/compound-protocol/blob/master/contracts/Lens/CompoundLens.sol#L453
I recently stumbled upon Falsehoods programmers believe about time zones, which got a good laugh out of me. It reminded me of other great lists of falsehoods, such as about names or time, and made me look for an equivalent for Ethereum. Having found none, here is my humble contribution to this set.
Calling estimateGas
will return the gas required by my transaction
Calling estimateGas
will return the gas that your transaction would require if it were mined now. The current state of the chain may be very different to the state in which your tx will get mined. So when your tx i
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########### | |
# Imports # | |
########### | |
# the RPCs file should include RPC URLs and Etherscan API Keys for relevant networks | |
# (in a separate file so they don't get committed) | |
source "$(dirname "$0")/rpcs.sh" | |
# any useful addresses for various networks for easy reference | |
source "$(dirname "$0")/addresses.sh" | |
# any useful functions and definitions for interacting with Seaport |
OlderNewer