Giter Club home page Giter Club logo

apes'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.

apes's People

Contributors

dmfxyz avatar gmsteuart avatar nmushegian avatar trouaux avatar

Stargazers

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

Watchers

 avatar  avatar

apes's Issues

Implement type sizes

The ape grammar doesn't support sizing for the following types: int, uint, bytes, fixed, ufixed

The grammar needs to be updated to allow for type sizing following Solidity's contract ABI specification

  • uint: unsigned integer type of M bits, 0 < M <= 256, M % 8 == 0. e.g. uint32, uint8, uint256.
  • int: two’s complement signed integer type of M bits, 0 < M <= 256, M % 8 == 0.
  • fixedx: signed fixed-point decimal number of M bits, 8 <= M <= 256, M % 8 == 0, and 0 < N <= 80, which denotes the value v as v / (10 ** N).
  • ufixedx: unsigned variant of fixedx.
  • bytes: binary type of M bytes, 0 < M <= 32.

Grammar needs to support calltype and callopts

The grammer currently only lets you do stuff like
int x = shitcoin.balanceOf(address 0xbeef)
which likely implies an implicit view and not a signed called or a delegated call. Whatever it implies, the other two types are missing.

The grammar should be extended to support what's described in the readme
int x = shitcoin.BalanceOf.view{gas: 10000}(address 0xbeef)

imo the calltype should be optional and default to one of view or call.

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.