Code Monkey home page Code Monkey logo

multisig's Introduction

Rico Credit System

RICO is an ERC20 token that's designed to be stable with respect to RISK, an ERC20 token used to purchase accumulated fees from debt positions.

For a brief primer, see the Litepaper.

overview

  • bank.sol -- core RCS functions
  • math.sol -- internal math funcitons
  • flog.sol -- external function call events
  • palm.sol -- storage variable modified events

developing

You need node/npm, and you need ipfs daemon running. This repo uses submodules for managing some dependencies.

  • npm run initialize -- this will perform:
    • npm install
    • npm run download-submodules
    • npm run install-submodules
    • npm run build:all
  • FOUNDRY_PROFILE=lite npm test

To run js tests with ipfs daemon running:

  • npm run js-test

To deploy from hardhat console:

  • pack = await hre.run('deploy-ricobank', { writepack: 'true', netname: <network name from which to load settings>, tokens: './tokens.json', mock: 'true', gasLimit: <gas limit> })

dpack

To deploy ricobank and create a new pack for it, run the deploy-ricobank task. It will return the pack object and also write it to a json file in ./pack/. To load the pack,

  • pack = require(path_to_pack_file) or pack = hre.run('deploy-ricobank', ...)
  • dapp = await dpack.load(pack, ethers, signer)
  • bank = dapp.bank

dapp contains bank, the core ricobank object and some other contracts, all as ethers.js Contract objects.

To create a CDP, approve your tokens to bank, and run bank.frob(dink, dart) using the ethers Solidity ABI.

  • bank.keep() - balance surplus/deficit and poke the par price
  • bank.bail(usr) - liquidate a position

Notice

See NOTICE file for copyrights and credits.

multisig's People

Contributors

dmfxyz avatar nmushegian avatar stobiewan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

multisig's Issues

log call success

multisig/src/Multisig.vy

Lines 78 to 79 in ffb598d

raw_call(target, data, value=amount)
log Executed(msg.sender, target, amount, data)

this raw_call could revert, I believe the return value is a bool indicating whether it succeeded or not, this should be logged

make `exec` payable

Right now if exec has a nonzero value, you have to first fund the multisig, but why not let caller of exec transfer the value, this way only 1 transaction instead of 2

replace `mock-deploy` task

This isn't a singleton so we don't have "mock" deploys, we should have a simple deploy script, it should probably be incorporated into a helper CLI tool msig, this can spit out a dpack if you do msig create or something

related to #12 because I guess it also packs a gemfab for testing

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.