All Projects → matryx → MatryxPlatform

matryx / MatryxPlatform

Licence: MIT license
Matryx Platform source code.

Programming Languages

javascript
184084 projects - #8 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to MatryxPlatform

eth-plot
r/place inspired Dapp
Stars: ✭ 36 (+111.76%)
Mutual labels:  truffle
create-truffle-dapp
Create and deploy Truffle projects with no configuration.
Stars: ✭ 17 (+0%)
Mutual labels:  truffle
ethane
A platform to create and distribute cryptotokens via Initial Coin Offerings (ICO)
Stars: ✭ 19 (+11.76%)
Mutual labels:  truffle
docker-eth-dev
Hacking together a containerized environment for Ethereum development with Truffle using Parity
Stars: ✭ 22 (+29.41%)
Mutual labels:  truffle
the-great-venus
🗿 The Great Venus (2018) - Turn-based web RPG based on Ethereum platform
Stars: ✭ 19 (+11.76%)
Mutual labels:  truffle
dungeons-and-dragons-nft
#chainlink #nft
Stars: ✭ 583 (+3329.41%)
Mutual labels:  truffle
Blockchain
Recently started working on Blockchain technologies. This repo contains material related to Blockchain technologies. My current focus on dAPP development using Hyperledger.
Stars: ✭ 21 (+23.53%)
Mutual labels:  truffle
web3j-example
Android web3j example
Stars: ✭ 27 (+58.82%)
Mutual labels:  truffle
solidity-contracts
📦 Resources for the Ethereum Smart Contract Development tutorial series.
Stars: ✭ 64 (+276.47%)
Mutual labels:  truffle
Acria-Contracts
Contracts for the ETH/BSC branch of the Acria Network
Stars: ✭ 31 (+82.35%)
Mutual labels:  truffle
trufflepig
🍄🐷Truffle contract artifact loading tool for local development
Stars: ✭ 45 (+164.71%)
Mutual labels:  truffle
SOMns
SOMns: A Newspeak for Concurrency Research
Stars: ✭ 62 (+264.71%)
Mutual labels:  truffle
proof-of-existence
Ethereum Smart Contract to prove a document's existence at some point by storing and verifying its hash.
Stars: ✭ 22 (+29.41%)
Mutual labels:  truffle
eth-decoder
Simple library to decode ethereum transaction and logs
Stars: ✭ 32 (+88.24%)
Mutual labels:  truffle
truffle-react-redux
Template for your next dapp with React and Redux
Stars: ✭ 20 (+17.65%)
Mutual labels:  truffle
mozart-graal
An implementation of Oz on top of Truffle and Graal
Stars: ✭ 37 (+117.65%)
Mutual labels:  truffle
circleci-ethereum
CI/CD for Ethereum Smart Contracts with CircleCI and Truffle
Stars: ✭ 21 (+23.53%)
Mutual labels:  truffle
React-Ethereum-Movie-Rating-Dapp
React-Ethereum Decentralized App Starter
Stars: ✭ 16 (-5.88%)
Mutual labels:  truffle
backend
Smart Contracts
Stars: ✭ 12 (-29.41%)
Mutual labels:  truffle
starter-kit-gsn
An OpenZeppelin starter kit focused on GSN.
Stars: ✭ 39 (+129.41%)
Mutual labels:  truffle

logo

Introduction

matryx.ai: A Collaborative Research and Development Platform

Platform Logic

Matryx consists of 3 major contracts: MatryxSystem, MatryxPlatform, and MatryxForwarder.

MatryxSystem

  • Contains all released versions of the Platform
  • Contains all used libraries addresses
  • Contains all relevant data needed to transform function signatures for forwarding calls

MatryxPlatform

  • Contains all data for Tournaments, Commits, and Submissions
  • Forwards calls from MatryxForwarder contracts to the relevant libraries

MatryxForwarder

  • Forwards calls to MatryxPlatform

When a call is made on a MatryxForwarder contract, such as MatryxTournament, MatryxForwarder forwards the call to MatryxPlatform, inserting msg.sender into the calldata so the original caller doesn't get lost. MatryxPlatform then looks up information from MatryxSystem to get the current library for that function and version of the Platform. It then uses this information to transform the calldata again, inserting state data from the Platform so that the library has access to Tournament, Commit, and Submission data.

For every library method in Matryx, MatryxSystem stores the function signature transformation data used to modify calldata. The calldata is modified by inserting MatryxPlatform storage slots for the delegatecall to the library method. This enables the libraries to modify MatryxPlatform's state while keeping the outwardly facing contract method signatures simple.

An example of this logic:

=> call to MatryxTournament.getBalance
=> call to MatryxSystem to lookup Platform address
=> call to MatryxPlatform (inserting msg.sender address)
=> call to MatryxSystem to lookup forwarding info
=> delegatecall to LibTournament.getBalance (inserting Platform storage data)

An example of a MTX transfer between MatryxForwarder contracts:

=> call to MatryxTournament.transferTo
=> delegatecall to LibForwarder.transferTo
=> call to MatryxToken.transfer

We set up the Matryx system like this to enable upgradeability, as well as to minimize gas costs of creating Tournaments, Commits, and Submissions.

Testing Matryx locally with truffle console

  1. Install dependencies, remove the build folder, and start ganache

    npm i
    rm -r build/
    ./ganache-local.sh
    
  2. Then in a new window, enter the truffle console

    truffle console
    
  3. Execute the following commands inside truffle console

    migrate --reset
    .load setup
    
  4. Lastly, you can test out the platform by running

    exec truffle/test.js
    

Architecture Diagram

architecture diagram


-The Matryx Team

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].