Skip to content

Instantly share code, notes, and snippets.

View e00dan's full-sized avatar

e00dan

View GitHub Profile
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle'
});
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
contract HeadTail {
address payable public userOneAddress;
bytes public userOneSignedChoiceHash;
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle'
});
@e00dan
e00dan / gist:d6c519838ea2a53cc47798cc2dda548c
Created August 11, 2022 10:59
Godwoken Mainnet v1 Gnosis Safe v1.3.0 deployment
➜ safe-contracts git:(main) ✗ yarn deploy-custom
yarn run v1.22.19
$ rm -rf deployments/custom && yarn deploy-all custom
$ hardhat deploy-contracts --network custom
Nothing to compile
deploying "SimulateTxAccessor" (tx: 0x869e31990790ab2788f1db4441c9e0cf90f799837d56a935c17cbbd602883954)...: deployed at 0x4d71a6c0D22F7626e5fD84afe755dcf487402521 with 67871 gas
deploying "GnosisSafeProxyFactory" (tx: 0xa5947a2e6b3180056ebcd9dd6acca1a67a7a3d40793edf287ad1a86793105e80)...: deployed at 0x4Df7456E32E367C490EF5Bf5fd86Bde7c3eD352B with 112782 gas
deploying "DefaultCallbackHandler" (tx: 0x39f4da9f530afac9ea9a6c6ca41902683da095b67dd1ff6e70ef71bc7f7b2370)...: deployed at 0x644107bE6DBB9061AB6B4eb4922dbb6821186D45 with 88673 gas
deploying "CompatibilityFallbackHandler" (tx: 0x3174674f8d61f117d7ea5e9612365737a5bf307f7892360dc952eb88dbeeaf6e)...: deployed at 0x1f1Eb32F9C89D06C92cCAf8A612e45f1019A851a with 139695 gas
deploying "CreateCall" (tx: 0xc67a0a527e84b5d5e84d18720ee1a5a453654dd7dc9e462f354545219eae22f5)...: deploy
{
"language": "Solidity",
"sources": {
"contracts/ERC20.sol": {
"content": "pragma solidity ^0.5.2;\n\nimport \"./IERC20.sol\";\nimport \"./SafeMath.sol\";\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md\n * Originally based on code by FirstBlood:\n * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n *\n * This implementation emits additional Approval events, allowing applications to reconstruct the allowance status for\n * all accounts just by listening to said events. Note that this isn't required by the specification, and other\n * compliant implementations may not do it.\n */\ncontract ERC20 is IERC20 {\n using SafeMath for uint256;\n\n mapping (address => uint256) private _balances;\n\n mapping (address => mapping (address => uint256)) private _allowed;\n\n uint256 private _totalSupply;\n\n /**\n * @dev Total number o
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle'
});
import BigNumber from 'bignumber.js/bignumber';
import abiLibrary from 'lib/abi';
const daoAddress = process.env.DAO_ADDRESS || '';
const tributeToken = process.env.TRIBUTE_TOKEN_ADDRESS;
const paymentToken = process.env.TRIBUTE_TOKEN_ADDRESS;
const getDao = async (address: string) => {
const dao = await new web3.eth.Contract(abiLibrary.moloch2, address);
➜ nervos-testing git:(fix/eip155) npx truffle migrate --network ckb_testnet
Compiling your contracts...
===========================
> Everything is up to date, there is nothing to compile.
Starting migrations...
======================
> Network name: 'ckb_testnet'
{
"name": "Godwoken Testnet",
"logoURI": "https://raw.githubusercontent.com/compound-finance/token-list/master/assets/compound-interface.svg",
"keywords": [
"defi"
],
"timestamp": "2021-05-27T20:37:00.000+00:00",
"tokens": [
{
"chainId": 868455272153094,
{
"name": "Godwoken Testnet",
"logoURI": "https://raw.githubusercontent.com/compound-finance/token-list/master/assets/compound-interface.svg",
"keywords": [
"defi"
],
"timestamp": "2021-05-27T20:37:00.000+00:00",
"tokens": [
{
"chainId": 868455272153094,