WARNING: This repository is in early-alpha version, highly unstable and is not definitely ready for production use.
The Tryvium Universal Token Swapper, a new way to transform swaps into payments.
Initialize the ETH_INFURA_RPC_URL
variable with a valid infura RPC node URL to enable tests.
export ETH_INFURA_RPC_URL="<your-personal-infura-rpc-url>"
Copy the contracts in your project. After that you can refer to them in your contract like this:
pragma solidity ^0.8.13;
import "ITokenSwapper.sol";
contract MultiPayerExample {
swapper ITokenSwapper private immutable;
// and so on...
}
Or extend the functionality of the current swappers like this:
pragma solidity ^0.8.13;
import "ITokenSwapper.sol";
contract ExtendedTokenSwapper is ITokenSwapper {
// implement the ITokenSwapper virtual methods
}
that's it.
You can use ours !!! Check the contract we have in the contracts/test
folder.
First of all you need to install the dependencies
yarn install
Then you can add your solidity smart contracts to the contracts
directory and the contract tests to the test
directory.
Finally, you can build your contracts using
yarn build
and you can test them using hardhat
.
yarn hardhat test
You can also run mythril security tests using the command:
yarn run mythril-security-checks
# or simply
yarn mythril-security-checks
This project is powered by waffle
, Typescript
and hardhat
.
Please, see the details of the scripts in package.json
file.
The content comes from this page.
You can run your tests from Visual Studio Code by using one of its Mocha integration extensions. We recommend using Mocha Test Explorer.
Running tests written in TypeScript from Visual Studio Code requires you to set the vscode option "mochaExplorer.files"
to "test/**/*.{j,t}s"
.
Or simply use the vscode/settings.json
file from this repository.