renproject / darknode-sol Goto Github PK
View Code? Open in Web Editor NEWAn implementation of Darknode smart contracts, written in Solidity
Home Page: https://renproject.io
License: GNU General Public License v3.0
An implementation of Darknode smart contracts, written in Solidity
Home Page: https://renproject.io
License: GNU General Public License v3.0
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);
...
}
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.
The developer docs only show how to include the basic Shifter and ShifterRegistry interfaces. A more comprehensive integration guide should be included.
@renproject/contracts
.@renproject/contracts
.permit
function to renERC20sSubstantial 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.
Description
Attempted to withdrawal REN and ABC from darknode. Metamask wallet displays
ALERT: Transaction Error. Exception thrown in contract code
and contract gives
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.