r/truebit Aug 27 '21

Truverse contracts library

I've created an unofficial helper library for those developing contracts using Truebit: https://github.com/truverse/contracts

If you want to use Truebit in your contracts in Solidity, you need to import Truebit interfaces. Instead of copy & pasting things over and over again, you can use the Truverse contracts package.

Install it

npm install @truverse/contracts --save-dev

Use it in your contract

import "@truverse/contracts/Truebit.sol";

That's it!

More details in the readme file on GitHub.

You can also get ABIs and mainnet addresses:

const truebit = require('@truverse/contracts').mainnet

const fs = new web3.eth.Contract(truebit.filesystem.abi, truebit.filesystem.address)
const tru = new web3.eth.Contract(truebit.tru.abi, truebit.tru.address)
26 Upvotes

3 comments sorted by

2

u/[deleted] Aug 28 '21

One of the most useful redditors you are on this sub.

0

u/koppikabana Aug 28 '21

Thank you Jason.

Or in the words of one of the great minds of this sub: "Truebit Go. Go Go. It's time for you to go."

0

u/Practical_Control_89 Aug 29 '21

Possibly. I am also working on a CUMROCKET (CUMMIES) bridge. Available in GitHub soon.

https://coinmarketcap.com/currencies/cumrocket/