Skip to content

Instantly share code, notes, and snippets.

View darrenrogan's full-sized avatar

Darren Rogan darrenrogan

View GitHub Profile
@z0r0z
z0r0z / ClubSig.sol
Last active September 24, 2022 19:47
EIP-712-signed multi-signature contract with NFT identifiers for signers and ragequit
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity >=0.8.4;
import "https://github.com/Rari-Capital/solmate/src/tokens/ERC721.sol";
import "https://github.com/kalidao/kali-contracts/blob/main/contracts/utils/NFThelper.sol";
/// @notice Minimal ERC-20 interface.
interface IERC20minimal {
function balanceOf(address account) external view returns (uint256);
@CoolCatsNFTPublic
CoolCatsNFTPublic / estimatingGas.js
Last active December 30, 2021 20:50
Estimating gas for a transaction
// Get the estimated gas from the adopt method
try {
methodGasPrice = await this.contract.methods.adopt(adoptNum).estimateGas({
value: price,
from: account
});
} catch (err) {
console.log("ERROR Method Gas Price");
}
@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')