Giter VIP home page Giter VIP logo

darknode-sol's People

Contributors

0x31 avatar divyakoshy avatar jazg avatar loongy avatar negaex avatar susruth avatar vinceau 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

darknode-sol's Issues

Bytes or parameters for adapter payload

We have the option of requiring Shift Adapters to take in the payload as bytes or as arbitrary parameters:

function trade(
    uint256 amount, bytes32 nHash, bytes calldata sig,
    // Payload
    uint256 relayerFee, uint256 someOtherValue
) external payable {
    verifySig(sig, abi.encode(relayerFee, someOtherValue));
    ...
}

or

function trade(
    uint256 amount, bytes32 nHash, bytes calldata sig, bytes calldata payload
) external payable {
    [uint256 relayerFee, uint256 someOtherValue] = abi.decode(payload);
    verifySig(sig, payload);
    ...
}

Create registry of all contract addresses

This contract will be known as the Protocol contract and will be used by the Darknodes to retrieve DarknodeRegistry, DarknodePayment, ShifterRegistry, and any other relevant contract addresses.

Tracking

  • Protocol contract built
  • Tested
  • Deployed

Improve smart contract integration docs

Description

The developer docs only show how to include the basic Shifter and ShifterRegistry interfaces. A more comprehensive integration guide should be included.

Checklist

  • Publish contract repository to npm at @renproject/contracts.
  • Document importing contracts from @renproject/contracts.
  • Document setting up local tests using RenJS and ganache-cli.

Final smart contract changes

  • Rename Shifter to Gateway
  • Rename shiftIn/shiftOut to mint/burn
  • Rename shiftOutRef to n
  • Rename ShifterRegistry to GatewayRegistry
  • Rename ShiftedERC20 to RenERC20
  • Add permit function to renERC20s
  • Make the renERC20s are upgradable (with upgrading tests)
  • Add contract for continuous fees:
    • Public getter, authorised setter, for "rate" variable
    • Start "rate" at 1.0
    • Scale from raw amounts when minting
    • Scale to raw amounts when burning
  • Allow for upgradable deregistration time
  • Purge all references to "Republic"
  • Can look up gateways in GatewayRegistry by "BTC" instead of "renBTC"
  • Ensure payment contract can be changed to a completely different contract implementation
  • Comments, documentation, and testing

Update test suite

Substantial changes to the Solidity contracts have rendered our testing suite obsolete. We need to address this immediately. Each Solidity contract should have a dedicated test file configured for use with Truffle, that can be executed and verified by our CI.

withdrawal of fees error

Description

Attempted to withdrawal REN and ABC from darknode. Metamask wallet displays

ALERT: Transaction Error. Exception thrown in contract code
and contract gives
ren error

Contract 0x5d62ccc1086f38286dc152962a4f3e337eec1ec1
Warning! Error encountered during contract execution [Reverted]

https://kovan.etherscan.io/tx/0xfa08296a1fcd764da633b6b8215670126935851d3ecaf60e1581f22f9cf40b88 > example tx id from failed transaction.

Metamask address is 0x423f7a5f5b33a39b6db98f4b57126d35eb7e1b04
darknode eth address is 0x915d3214d40bc8661552Cf0Cc6628816c2727B2C
darknode ip address is 54.201.93.60

Expected Behavior

Click "withdrawal" on darknode and receive funds in metamask wallet

Steps to reproduce

click 'withdrawal"
metamask is unlocked, and asks to confirm transaction.
metamask displays "ALERT: Transaction Error. Exception thrown in contract code "
and once confirmed, tx will pend and then give error.

Version

MetaMask Version
4.9.2

Operating system

Google Chrome Version 68.0.3440.84 (Official Build) (64-bit)
Ubuntu Linux 18.04.1

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.