1.2.7 • Published 2 years ago

@1inch/1inch-solidity-utils v1.2.7

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

This is package for deps in limit-order-protocol v2. The most actually npm package is solidity-utils.

Utils library for contracts and tests

Build Status Coverage Status NPM Package

About

This repository contains frequently used smart contracts, libraries and interfaces. Also it contains utils which are used in tests.

Solidity

directory.soldescription
contractsEthReceiver
contractsPermitable
contractsGasChecker
contracts/interfacesIDaiLikePermitInterface of token which has permit method like DAI token
contracts/interfacesIWETHWETH token interface
contracts/librariesAddressArraylibrary for work with array of addresses
contracts/librariesAddressSetlibrary for work with set of addresses
contracts/librariesRevertReasonParserlibrary parse the message from reverted method to readble format
contracts/librariesStringUtiloptimized methods to convert data to hex
contracts/librariesUniERC20

JS

modulefunctiondescrption
assertsassertThrowsAsync(action, msg)checks the async function action() thrown with message msg
assertsassertRoughlyEqualValues(expected, actual, relativeDiff)checks the expected value is equal to actual value with relativeDiff precision
utilstimeIncreaseTo(seconds)increases blockchain time to seconds sec
utilstrackReceivedToken(token, wallet, txPromise, ...args)returns amount of token which recieved the wallet in async method txPromise with arguments args
utilstrackReceivedTokenAndTx(token, wallet, txPromise, ...args)returns transaction info and amount of token which recieved the wallet in async method txPromise with arguments args
utilsfixSignature(signature)patchs ganache's signature to geth's version
utilssignMessage(signer, messageHex)signs messageHex with signer and patchs ganache's signature to geth's version
utilscountInstructions(txHash, instruction)counts amount of instruction in transaction with txHash hash
profileEVMprofileEVM(txHash, instruction, optionalTraceFile)the same as the countInstructions() with option of writing all trace to optionalTraceFile
profileEVMgasspectEVM(txHash, options, optionalTraceFile)returns all used operations in txHash transaction with options and their costs with option of writing all trace to optionalTraceFile

UTILS

...

1.2.7

2 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago