Giter VIP home page Giter VIP logo

dotnettest's Introduction

Schnoodle

Schnoodle is a progressive DeFi dog-themed meme token with multisig and DAO governance. The first of its kind.

Prerequisites

The following shared services should be set up only once per blockchain (except local):

  1. Gnosis Safe
    • Create Safe on Gnosis Safe (mainnet) or equivalent testnet (e.g., Rinkeby).
    • Update governance.proposers and governance.executors in migrations-config.[chain].js with Safe address (tutorial here if required).
  2. Snapshot / SafeSnap
    • Create a Snapshot space here using this guide.
    • Deploy and enable a SafeSnap DAO module instance with a default template as per the 'Setting up the module' instructions here.
    • Integrate the DAO module instance into Snapshot by adding the SafeSnap plugin to Snapshot space settings with config { "address": "<DAO module address>" }.

Setup

  1. Execute npm i.
  2. In Visual Studio Code, open each Solidity file in the contracts folder corresponding to the ABI files listed in Nethereum.Generator.json, and press F5 ('Solidity: Compile Contract' command).
  3. If target network is local, execute truffle develop in a separate terminal.
  4. Execute .\Migrate.ps1 <network> $true $true where <network> is the target network per the networks property in truffle-config.js.

Blockchain Launch

  1. Note the 'To' contract address of the create_0_1 internal transaction of the SchnoodleTimelockFactory Contract Creation transaction. Verify the SchnoodleTimelock contract using this address.
  2. Add liquidity to Uniswap V2, and note the liquidity token address (UNI-V2 token) from the corresponding transaction.
  3. Create a timelock contract to lock the full amount of the liquidity token held by the beneficiary wallet.

Operational Procedures

Timelock Tokens

Follow these steps to timelock tokens:

  1. Call create on SchnoodleTimelockFactory specifying the contract address of the token to be locked, the beneficiary, and the release time as a Unix timestamp.
  2. Once the transaction has been mined, note the 'To' contract address of the create_0 internal transaction. Verify that this is the SchnoodleTimelock clone address.
  3. Transfer the desired amount of tokens to be locked from the token contract address to the SchnoodleTimelock clone address.
  4. After timelock elapsed, go to SchnoodleTimelock clone address, and call release.

Configuration

  1. Perform a contract interaction with TransparentUpgradeableProxy to call a function (e.g., changeFeePercent, changeEleemosynary, maintenance, configure).

Contract Upgrade

  1. Execute .\Migrate.ps1 <network> where <network> is the target network per the networks property in truffle-config.js.
  2. Perform a contract interaction with ProxyAdmin to call upgrade using proxy and implementation parameters outputted in step 1.

Contract Interaction

Contract interaction is via either 1) multisig (SafeSnap optional) if SchnoodleGovernance is the contract owner, or 2) SafeSnap (DAO) directly if the Gnosis Safe address is the contract owner. The contract owner may be set during deployment or by calling transferOwnership on the contract. A multisig contract can be made into a DAO contract by following the multisig process using the transferOwnership function.

Multisig

  1. Go to the contract address to be interacted with and call the desired function.
  2. Copy the HEX DATA from MetaMask and reject the transaction.
  3. Follow steps 27 and 28 from here.
  4. Follow steps 29 and 30 from here per either of the following scenarios:
    • Multisig only: After timelock elapsed.
    • DAO: Interact with SchnoodleGovernance via the SafeSnap process instead of directly.

SafeSnap

  1. Go to Snapshot space settings and ensure address in strategy is the TransparentUpgradeableProxy contract address.
  2. Go to Snapshot space new proposal and add a 'Contract Interaction' transaction:
    • to is the contract address to be interacted with.
    • function is the function to be called.
    • Set the parameters as required.
  3. After voting is closed, anyone may trigger the following actions on the plugin:
    • Request execution to put the question on reality.eth for 24 hours.
    • Set the outcome with a bond (in ETH). The outcome should resolve in accordance with the vote in (game) theory.
    • After the question outcome is finalised and it is in favour, the upgrade transaction may be triggered by anyone to be executed on the interaction contract.
  4. If the proposal is malicious, it may be vetoed during the 24-hour cooldown period via Gnosis Safe by calling markProposalInvalid on the DAO module contract address.
    • The proposalId and txHashes values may be found from the Input Data of the relevant Add Proposal transaction on the DAO module contract.

dotnettest's People

Contributors

howlermonkey avatar koteakhaladze avatar neoxtreem avatar whichbritishschool avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.