Library for interacting with RMM protocol through ethers.js.

Overview

🍄 rmm-ethers

version npm license stars

Easily connect and transact with RMM protocol.

🧩 Features

  • 🌲 Deploy RMM protocol
  • ⚡️ Easily connect to an RMM deployment
  • 🌊 Create RMM pools
  • ☄️ Allocate or remove liquidity
  • 🎁 Transfer positions
  • 🔭 Read protocol data

📦 Installation

This software is in Alpha.

Installing locally:

# Clone the repository
git clone https://github.com/primitivefinance/rmm-ethers.git

# Install dependencies
yarn install

Installing as a package:

# Using yarn
yarn add @primitivefi/rmm-ethers

# Or using npm
npm i @primitivefi/rmm-ethers

Use it by connecting with a signer or provider:

// Import the EthersRmm class
import { EthersRmm } from '@primitivefi/rmm-ethers'

// Use the class by connecting to a deployment
await EthersRmm.connect(signerOrProvider)

✏️ Usage as a Package

This package is designed to extend the rmm-sdk package. The SDK has the entity models and interfaces that are used by rmm-ethers to send transactions.

🪝 As a react hook:

Here is an example of a React hook that makes use of web3-react and SWR:

import useSWR, { SWRResponse } from 'swr'
import { useWeb3React } from 'web3-react'
import { Signer } from '@ethersproject/abstract-signer'
import { EthersRmm } from '@primitivefi/rmm-ethers'

function getEthersRmm(signerOrProvider: Signer | Provider): () => Promise<EthersRmm> {
  return async () => await EthersRmm.connect(signerOrProvider)
}

/**
 * Connects to EthersRmm deployment from the connected provider or signer.
 */
export function useRmmProtocol(suspense = false): SWRResponse<EthersRmm, Error> {
  const { library: signerOrProvider, chainId } = useWeb3React()
  const shouldFetch = !!signerOrProvider && typeof chainId !== 'undefined'
  const result = useSWR(
    shouldFetch ? [signerOrProvider, 'ethers-rmm', chainId] : null,
    getEthersRmm(signerOrProvider?.getSigner() as Signer),
    {
      dedupingInterval: 60 * 1000,
      refreshInterval: 60 * 1000,
      suspense,
    },
  )

  return result
}

🌊 Fetch a pool

import { Pool } from '@primitivefi/rmm-sdk'
import { EthersRmm, Position } from '@primitivefi/rmm-ethers'

async function getPool(poolId: string): Promise<Pool> {
  return rmm.getPool(poolId).then(data => data)
}

⚱️ Fetching pool liquidity positions

import { Pool } from '@primitivefi/rmm-sdk'
import { EthersRmm, Position } from '@primitivefi/rmm-ethers'

async function getPoolPosition(pool: Pool, account: string): Promise<Position> {
  return rmm.getPosition(pool, account).then(data => data)
}

Adjusting Positions

When allocating or removing liquidity, the arguments must match the respective interfaces, which live in the rmm-sdk:

/** Flag to use a native currency in a transaction.  */
export interface NativeOptions {
  useNative?: NativeCurrency
}

/** Recipient address of any tokens which are output from transactions. */
export interface RecipientOptions {
  recipient: string
}

/** Timestamp which will revert the transaction if not yet mined. */
export interface Deadline {
  deadline?: BigNumber
}

/** Permit details on either risky or stable tokens. */
export interface PermitTokens {
  /** If defined, risky token can be permitted, saving the user an approve tx. */
  permitRisky?: PermitOptions

  /** If defined, stable token can be permitted, saving the user an approve tx. */
  permitStable?: PermitOptions
}

/** Token amounts to use for depositing or withdrawing into a margin account.  */
export interface MarginOptions extends PermitTokens, RecipientOptions, NativeOptions {
  amountRisky: Wei
  amountStable: Wei
}

/** Token amounts to use for allocating liquidity. */
export interface LiquidityOptions {
  /** Amount of risky tokens to provide as liquidity. */
  delRisky: Wei
  /** Amount of stable tokens to provide as Liquidity. */
  delStable: Wei
  /** Desired liquidity to mint. */
  delLiquidity: Wei
}

/** Provide liquidity argument details. */
export interface AllocateOptions extends PermitTokens, LiquidityOptions, RecipientOptions, NativeOptions, Deadline {
  fromMargin: boolean
  slippageTolerance: Percentage
  createPool?: boolean
}

/** Remove liquidity argument details. */
export interface RemoveOptions extends LiquidityOptions, RecipientOptions, NativeOptions, Deadline {
  expectedRisky: Wei
  expectedStable: Wei
  toMargin: boolean
  slippageTolerance: Percentage
}

🕳️ Allocating liquidity

import { Pool, AllocateOptions } from '@primitivefi/rmm-sdk'
import { EthersRmm, PositionAdjustmentDetails } from '@primitivefi/rmm-ethers'

async function onAllocate(rmm: EthersRmm, pool: Pool, options: AllocateOptions): Promise<PositionAdjustmentDetails> {
  return rmm.allocate({ pool, options }).then(data => data)
}

💎 Removing liquidity

import { Pool, AllocateOptions } from '@primitivefi/rmm-sdk'
import { EthersRmm, PositionAdjustmentDetails } from '@primitivefi/rmm-ethers'

async function onRemove(rmm: EthersRmm, pool: Pool, options: RemoveOptions): Promise<PositionAdjustmentDetails> {
  return rmm.remove({ pool, options }).then(data => data)
}

🧮 Usage locally

Before running any command, make sure to install dependencies:

yarn install

Compile

Compile the smart contracts with Hardhat:

yarn compile

Test

Run the Mocha tests:

yarn test

📃 Deploy RMM

Deploy the protocol to a network:

yarn deploy --network nameOfNetwork

This will call a hardhat task that deploys the RMM protocol contracts from a loaded signer and saves the addresses to /deployments.

Here are the options for the deploy task:

  • --defender (optional): Flag to attempt to use an Open Zeppelin Defender Relay Signer, if it exists in the hardhat.config.ts file.
  • --channel (optional): Directory name in /deployments/ to save the deployment to.
  • --gasPrice (optinal): Price to pay for gas.
  • --testweth (optional): Only for test networks, allows specifying a WETH9 address.

Deploy Primitive Engines - Pair contracts

yarn deploy:engine --network nameOfNetwork

This is a script that runs which requires two of the token addresses. Here is the script, which should be edited to suit the deployment needs:

import hre from 'hardhat'
import { Signer } from '@ethersproject/abstract-signer'
import { DefenderRelaySigner } from 'defender-relay-client/lib/ethers'
import { deployEngine } from '../utils/deployEngine'

type Signers = Signer | DefenderRelaySigner

export async function main() {
  const signer: Signers = await hre.run('useSigner')

  const rmm = await hre.connect(signer)
  const chainId = rmm.connection.chainId
  if (chainId === 1) throw new Error('Do not use this in prod!')

  const risky = '0xc778417E063141139Fce010982780140Aa0cD5Ab' // rinkeby:WETH: FIX
  const stable = '0x522064c1EafFEd8617BE64137f66A71D6C5c9aA3' // rinkeby:USDC: FIX

  await deployEngine(rmm, risky, stable)
}

main()
  .then(() => process.exit(0))
  .catch(error => {
    console.error(error)
    process.exit(1)
  })

🪞 Deploy RMM Pools Script

Warning: Currently failing for node versions above 14.7.4. Unresolved promises are not handled in the higher node versions, and instead the process is exited with a non-zero error code.

Work in progress: This script is still being improved! Consider it an alpha version.

Deploy pools in the config of the deploy-pools.ts script:

yarn deploy:pools --network nameOfNetwork

Creating RMM pools is a process that requires connecting to the protocol, fetching token metadata, and building the transaction's arguments. This script handles loading tokens from a saved pool deployment, located in /deployments/*/pools.json.

All the logic executed by a hardhat script must exist in the script file. Here is an example:

import hre from 'hardhat'
import { EthersRmm } from 'src/EthersRmm'
import { deployPools } from 'utils/deployPools'
import { poolDeployer } from 'utils/poolDeployer'

export async function main() {
  const signer: Signers = await hre.run('useSigner')
  const from = await signer.getAddress()

  const rmm = await hre.connect(signer)

  const chainId = rmm.connection.chainId

  if (chainId === 1) throw new Error('Do not use this in prod!')

  const deployer = new PoolDeployer(chainId, POOL_DEPLOYMENTS_SAVE, POOL_CONFIG_TO_DEPLOY, rmm)

  await deployPools(deployer)
}

main()
  .then(() => process.exit(0))
  .catch(error => {
    console.error(error)
    process.exit(1)
  })

📌 Misc. Scripts

Generate documentation locally:

yarn docs

Deploy to a local ganache-cli instance:

yarn deploy:devnet

Delete a local deployment to ganache-cli:

yarn delete-dev-deployments

🛡️ Use with Open Zeppelin Defender Relays

The OZ Defender relayers are a safer way to execute transactions on-chain.

The hardhat.config.ts is extended to include OZ defender relay API key and secret:

defender: {
    [chainIds.rinkeby]: {
      apiKey: RELAY_RINKEBY_API || '',
      apiSecret: RELAY_RINKEBY_SECRET || '',
    },
}

Adding this to the hardhat config will expose the relay signer through the task useSigner.

This task is currently only used in the deployPools.ts script, so pools can be deployed safely from the OZ defender relay.

🖋️ useSigner

If this subtask is run from task run with a --network flag, and the network has an OZ relayer config in the hardhat config file, this task will return the Signer object for the relayer. Else, useSigner will default to the ethers.getSigners(). This subtask can be used in custom scripts so you can choose to use a relayer or a private key stored in .env.

  • --i (optional): Index of the signer to use from ethers.getSigners()

Contribute

Feel free to suggest changes by opening a pull request, or posting an issue. There is a dedicated dev channel in the Primitive discord.

Credits

Inspired by Liquity Ethers.

Comments
  • build(deps): bump glob-parent from 5.1.1 to 5.1.2

    build(deps): bump glob-parent from 5.1.1 to 5.1.2

    Bumps glob-parent from 5.1.1 to 5.1.2.

    Release notes

    Sourced from glob-parent's releases.

    v5.1.2

    Bug Fixes

    Changelog

    Sourced from glob-parent's changelog.

    5.1.2 (2021-03-06)

    Bug Fixes

    6.0.2 (2021-09-29)

    Bug Fixes

    6.0.1 (2021-07-20)

    Bug Fixes

    • Resolve ReDoS vulnerability from CVE-2021-35065 (#49) (3e9f04a)

    6.0.0 (2021-05-03)

    ⚠ BREAKING CHANGES

    • Correct mishandled escaped path separators (#34)
    • upgrade scaffold, dropping node <10 support

    Bug Fixes

    • Correct mishandled escaped path separators (#34) (32f6d52), closes #32

    Miscellaneous Chores

    • upgrade scaffold, dropping node <10 support (e83d0c5)
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies released on @rc released 
    opened by dependabot[bot] 2
  • build(deps): bump path-parse from 1.0.6 to 1.0.7

    build(deps): bump path-parse from 1.0.6 to 1.0.7

    Bumps path-parse from 1.0.6 to 1.0.7.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies released on @rc released 
    opened by dependabot[bot] 2
  • build(deps): bump lodash from 4.17.20 to 4.17.21

    build(deps): bump lodash from 4.17.20 to 4.17.21

    Bumps lodash from 4.17.20 to 4.17.21.

    Commits
    • f299b52 Bump to v4.17.21
    • c4847eb Improve performance of toNumber, trim and trimEnd on large input strings
    • 3469357 Prevent command injection through _.template's variable option
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies released on @rc released 
    opened by dependabot[bot] 2
  • build(deps): bump shelljs from 0.8.4 to 0.8.5

    build(deps): bump shelljs from 0.8.4 to 0.8.5

    Bumps shelljs from 0.8.4 to 0.8.5.

    Release notes

    Sourced from shelljs's releases.

    v0.8.5

    This was a small security fix for #1058.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies released on @rc released 
    opened by dependabot[bot] 2
  • Fix/dev deployments

    Fix/dev deployments

    Changelog

    • Update delete-dev-deployments script to also delete pools in pools.json for dev network
    • Refactors pool deployments code to be more modular
    • Deploys rbn pools to rinkeby
    • Updates rmm-sdk, critical update to make sure reported price is using correct math for pools
    released on @rc released 
    opened by Alexangelj 2
  • build(deps): bump @openzeppelin/contracts from 4.4.2 to 4.7.2

    build(deps): bump @openzeppelin/contracts from 4.4.2 to 4.7.2

    Bumps @openzeppelin/contracts from 4.4.2 to 4.7.2.

    Release notes

    Sourced from @​openzeppelin/contracts's releases.

    v4.7.2

    :warning: This is a patch for three issues, including a high severity issue in GovernorVotesQuorumFraction. For more information visit the security advisories (1, 2, 3).

    1. GovernorVotesQuorumFraction: Fixed quorum updates so they do not affect past proposals that failed due to lack of quorum. (#3561)
    2. ERC165Checker: Added protection against large returndata. (#3587)
    3. LibArbitrumL2, CrossChainEnabledArbitrumL2: Fixed detection of cross-chain calls for EOAs. Previously, calls from EOAs would be classified as cross-chain calls. (#3578)

    v4.7.1

    :warning: This is a patch for a medium severity issue affecting SignatureChecker and a high severity issue affecting ERC165Checker. For more information visit the security advisories (1, 2).

    • SignatureChecker: Fix an issue that causes isValidSignatureNow to revert when the target contract returns ill-encoded data. (#3552)
    • ERC165Checker: Fix an issue that causes supportsInterface to revert when the target contract returns ill-encoded data. (#3552)

    v4.7.0

    • TimelockController: Migrate _call to _execute and allow inheritance and overriding similar to Governor. (#3317)
    • CrossChainEnabledPolygonChild: replace the require statement with the custom error NotCrossChainCall. (#3380)
    • ERC20FlashMint: Add customizable flash fee receiver. (#3327)
    • ERC4626: add an extension of ERC20 that implements the ERC4626 Tokenized Vault Standard. (#3171)
    • SafeERC20: add safePermit as mitigation against phantom permit functions. (#3280)
    • Math: add a mulDiv function that can round the result either up or down. (#3171)
    • Math: Add a sqrt function to compute square roots of integers, rounding either up or down. (#3242)
    • Strings: add a new overloaded function toHexString that converts an address with fixed length of 20 bytes to its not checksummed ASCII string hexadecimal representation. (#3403)
    • EnumerableMap: add new UintToUintMap map type. (#3338)
    • EnumerableMap: add new Bytes32ToUintMap map type. (#3416)
    • SafeCast: add support for many more types, using procedural code generation. (#3245)
    • MerkleProof: add multiProofVerify to prove multiple values are part of a Merkle tree. (#3276)
    • MerkleProof: add calldata versions of the functions to avoid copying input arrays to memory and save gas. (#3200)
    • ERC721, ERC1155: simplified revert reasons. (#3254, (#3438))
    • ERC721: removed redundant require statement. (#3434)
    • PaymentSplitter: add releasable getters. (#3350)
    • Initializable: refactored implementation of modifiers for easier understanding. (#3450)
    • Proxies: remove runtime check of ERC1967 storage slots. (#3455)

    Breaking changes

    • Initializable: functions decorated with the modifier reinitializer(1) may no longer invoke each other.

    v4.7.0-rc.0

    This prerelease is now available for open review! Let us know your feedback and if you find any security issues.

    We have a bug bounty with rewards of up to USD $25,000 and a special POAP for submitting a valid issue.

    See the announcement for more details.

    v4.6.0

    • crosschain: Add a new set of contracts for cross-chain applications. CrossChainEnabled is a base contract with instantiations for several chains and bridges, and AccessControlCrossChain is an extension of access control that allows cross-chain operation. (#3183)
    • AccessControl: add a virtual _checkRole(bytes32) function that can be overridden to alter the onlyRole modifier behavior. (#3137)
    • EnumerableMap: add new AddressToUintMap map type. (#3150)
    • EnumerableMap: add new Bytes32ToBytes32Map map type. (#3192)
    • ERC20FlashMint: support infinite allowance when paying back a flash loan. (#3226)

    ... (truncated)

    Changelog

    Sourced from @​openzeppelin/contracts's changelog.

    4.7.2

    • LibArbitrumL2, CrossChainEnabledArbitrumL2: Fixed detection of cross-chain calls for EOAs. Previously, calls from EOAs would be classified as cross-chain calls. (#3578)
    • GovernorVotesQuorumFraction: Fixed quorum updates so they do not affect past proposals that failed due to lack of quorum. (#3561)
    • ERC165Checker: Added protection against large returndata. (#3587)

    4.7.1

    • SignatureChecker: Fix an issue that causes isValidSignatureNow to revert when the target contract returns ill-encoded data. (#3552)
    • ERC165Checker: Fix an issue that causes supportsInterface to revert when the target contract returns ill-encoded data. (#3552)

    4.7.0 (2022-06-29)

    • TimelockController: Migrate _call to _execute and allow inheritance and overriding similar to Governor. (#3317)
    • CrossChainEnabledPolygonChild: replace the require statement with the custom error NotCrossChainCall. (#3380)
    • ERC20FlashMint: Add customizable flash fee receiver. (#3327)
    • ERC4626: add an extension of ERC20 that implements the ERC4626 Tokenized Vault Standard. (#3171)
    • SafeERC20: add safePermit as mitigation against phantom permit functions. (#3280)
    • Math: add a mulDiv function that can round the result either up or down. (#3171)
    • Math: Add a sqrt function to compute square roots of integers, rounding either up or down. (#3242)
    • Strings: add a new overloaded function toHexString that converts an address with fixed length of 20 bytes to its not checksummed ASCII string hexadecimal representation. (#3403)
    • EnumerableMap: add new UintToUintMap map type. (#3338)
    • EnumerableMap: add new Bytes32ToUintMap map type. (#3416)
    • SafeCast: add support for many more types, using procedural code generation. (#3245)
    • MerkleProof: add multiProofVerify to prove multiple values are part of a Merkle tree. (#3276)
    • MerkleProof: add calldata versions of the functions to avoid copying input arrays to memory and save gas. (#3200)
    • ERC721, ERC1155: simplified revert reasons. (#3254, (#3438))
    • ERC721: removed redundant require statement. (#3434)
    • PaymentSplitter: add releasable getters. (#3350)
    • Initializable: refactored implementation of modifiers for easier understanding. (#3450)
    • Proxies: remove runtime check of ERC1967 storage slots. (#3455)

    Breaking changes

    • Initializable: functions decorated with the modifier reinitializer(1) may no longer invoke each other.

    4.6.0 (2022-04-26)

    • crosschain: Add a new set of contracts for cross-chain applications. CrossChainEnabled is a base contract with instantiations for several chains and bridges, and AccessControlCrossChain is an extension of access control that allows cross-chain operation. (#3183)
    • AccessControl: add a virtual _checkRole(bytes32) function that can be overridden to alter the onlyRole modifier behavior. (#3137)
    • EnumerableMap: add new AddressToUintMap map type. (#3150)
    • EnumerableMap: add new Bytes32ToBytes32Map map type. (#3192)
    • ERC20FlashMint: support infinite allowance when paying back a flash loan. (#3226)
    • ERC20Wrapper: the decimals() function now tries to fetch the value from the underlying token instance. If that calls revert, then the default value is used. (#3259)
    • draft-ERC20Permit: replace immutable with constant for _PERMIT_TYPEHASH since the keccak256 of string literals is treated specially and the hash is evaluated at compile time. (#3196)
    • ERC1155: Add a _afterTokenTransfer hook for improved extensibility. (#3166)
    • ERC1155URIStorage: add a new extension that implements a _setURI behavior similar to ERC721's _setTokenURI. (#3210)
    • DoubleEndedQueue: a new data structure that supports efficient push and pop to both front and back, useful for FIFO and LIFO queues. (#3153)
    • Governor: improved security of onlyGovernance modifier when using an external executor contract (e.g. a timelock) that can operate without necessarily going through the governance protocol. (#3147)
    • Governor: Add a way to parameterize votes. This can be used to implement voting systems such as fractionalized voting, ERC721 based voting, or any number of other systems. The params argument added to _countVote method, and included in the newly added _getVotes method, can be used by counting and voting modules respectively for such purposes. (#3043)

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
  • build(deps): bump @openzeppelin/contracts from 4.4.2 to 4.7.1

    build(deps): bump @openzeppelin/contracts from 4.4.2 to 4.7.1

    Bumps @openzeppelin/contracts from 4.4.2 to 4.7.1.

    Release notes

    Sourced from @​openzeppelin/contracts's releases.

    v4.7.1

    :warning: This is a patch for a medium severity issue affecting SignatureChecker and a high severity issue affecting ERC165Checker. For more information visit the security advisories (1, 2).

    • SignatureChecker: Fix an issue that causes isValidSignatureNow to revert when the target contract returns ill-encoded data. (#3552)
    • ERC165Checker: Fix an issue that causes supportsInterface to revert when the target contract returns ill-encoded data. (#3552)

    v4.7.0

    • TimelockController: Migrate _call to _execute and allow inheritance and overriding similar to Governor. (#3317)
    • CrossChainEnabledPolygonChild: replace the require statement with the custom error NotCrossChainCall. (#3380)
    • ERC20FlashMint: Add customizable flash fee receiver. (#3327)
    • ERC4626: add an extension of ERC20 that implements the ERC4626 Tokenized Vault Standard. (#3171)
    • SafeERC20: add safePermit as mitigation against phantom permit functions. (#3280)
    • Math: add a mulDiv function that can round the result either up or down. (#3171)
    • Math: Add a sqrt function to compute square roots of integers, rounding either up or down. (#3242)
    • Strings: add a new overloaded function toHexString that converts an address with fixed length of 20 bytes to its not checksummed ASCII string hexadecimal representation. (#3403)
    • EnumerableMap: add new UintToUintMap map type. (#3338)
    • EnumerableMap: add new Bytes32ToUintMap map type. (#3416)
    • SafeCast: add support for many more types, using procedural code generation. (#3245)
    • MerkleProof: add multiProofVerify to prove multiple values are part of a Merkle tree. (#3276)
    • MerkleProof: add calldata versions of the functions to avoid copying input arrays to memory and save gas. (#3200)
    • ERC721, ERC1155: simplified revert reasons. (#3254, (#3438))
    • ERC721: removed redundant require statement. (#3434)
    • PaymentSplitter: add releasable getters. (#3350)
    • Initializable: refactored implementation of modifiers for easier understanding. (#3450)
    • Proxies: remove runtime check of ERC1967 storage slots. (#3455)

    Breaking changes

    • Initializable: functions decorated with the modifier reinitializer(1) may no longer invoke each other.

    v4.7.0-rc.0

    This prerelease is now available for open review! Let us know your feedback and if you find any security issues.

    We have a bug bounty with rewards of up to USD $25,000 and a special POAP for submitting a valid issue.

    See the announcement for more details.

    v4.6.0

    • crosschain: Add a new set of contracts for cross-chain applications. CrossChainEnabled is a base contract with instantiations for several chains and bridges, and AccessControlCrossChain is an extension of access control that allows cross-chain operation. (#3183)
    • AccessControl: add a virtual _checkRole(bytes32) function that can be overridden to alter the onlyRole modifier behavior. (#3137)
    • EnumerableMap: add new AddressToUintMap map type. (#3150)
    • EnumerableMap: add new Bytes32ToBytes32Map map type. (#3192)
    • ERC20FlashMint: support infinite allowance when paying back a flash loan. (#3226)
    • ERC20Wrapper: the decimals() function now tries to fetch the value from the underlying token instance. If that calls revert, then the default value is used. (#3259)
    • draft-ERC20Permit: replace immutable with constant for _PERMIT_TYPEHASH since the keccak256 of string literals is treated specially and the hash is evaluated at compile time. (#3196)
    • ERC1155: Add a _afterTokenTransfer hook for improved extensibility. (#3166)
    • ERC1155URIStorage: add a new extension that implements a _setURI behavior similar to ERC721's _setTokenURI. (#3210)
    • DoubleEndedQueue: a new data structure that supports efficient push and pop to both front and back, useful for FIFO and LIFO queues. (#3153)
    • Governor: improved security of onlyGovernance modifier when using an external executor contract (e.g. a timelock) that can operate without necessarily going through the governance protocol. (#3147)
    • Governor: Add a way to parameterize votes. This can be used to implement voting systems such as fractionalized voting, ERC721 based voting, or any number of other systems. The params argument added to _countVote method, and included in the newly added _getVotes method, can be used by counting and voting modules respectively for such purposes. (#3043)

    ... (truncated)

    Changelog

    Sourced from @​openzeppelin/contracts's changelog.

    4.7.1

    • SignatureChecker: Fix an issue that causes isValidSignatureNow to revert when the target contract returns ill-encoded data. (#3552)
    • ERC165Checker: Fix an issue that causes supportsInterface to revert when the target contract returns ill-encoded data. (#3552)

    4.7.0 (2022-06-29)

    • TimelockController: Migrate _call to _execute and allow inheritance and overriding similar to Governor. (#3317)
    • CrossChainEnabledPolygonChild: replace the require statement with the custom error NotCrossChainCall. (#3380)
    • ERC20FlashMint: Add customizable flash fee receiver. (#3327)
    • ERC4626: add an extension of ERC20 that implements the ERC4626 Tokenized Vault Standard. (#3171)
    • SafeERC20: add safePermit as mitigation against phantom permit functions. (#3280)
    • Math: add a mulDiv function that can round the result either up or down. (#3171)
    • Math: Add a sqrt function to compute square roots of integers, rounding either up or down. (#3242)
    • Strings: add a new overloaded function toHexString that converts an address with fixed length of 20 bytes to its not checksummed ASCII string hexadecimal representation. (#3403)
    • EnumerableMap: add new UintToUintMap map type. (#3338)
    • EnumerableMap: add new Bytes32ToUintMap map type. (#3416)
    • SafeCast: add support for many more types, using procedural code generation. (#3245)
    • MerkleProof: add multiProofVerify to prove multiple values are part of a Merkle tree. (#3276)
    • MerkleProof: add calldata versions of the functions to avoid copying input arrays to memory and save gas. (#3200)
    • ERC721, ERC1155: simplified revert reasons. (#3254, (#3438))
    • ERC721: removed redundant require statement. (#3434)
    • PaymentSplitter: add releasable getters. (#3350)
    • Initializable: refactored implementation of modifiers for easier understanding. (#3450)
    • Proxies: remove runtime check of ERC1967 storage slots. (#3455)

    Breaking changes

    • Initializable: functions decorated with the modifier reinitializer(1) may no longer invoke each other.

    4.6.0 (2022-04-26)

    • crosschain: Add a new set of contracts for cross-chain applications. CrossChainEnabled is a base contract with instantiations for several chains and bridges, and AccessControlCrossChain is an extension of access control that allows cross-chain operation. (#3183)
    • AccessControl: add a virtual _checkRole(bytes32) function that can be overridden to alter the onlyRole modifier behavior. (#3137)
    • EnumerableMap: add new AddressToUintMap map type. (#3150)
    • EnumerableMap: add new Bytes32ToBytes32Map map type. (#3192)
    • ERC20FlashMint: support infinite allowance when paying back a flash loan. (#3226)
    • ERC20Wrapper: the decimals() function now tries to fetch the value from the underlying token instance. If that calls revert, then the default value is used. (#3259)
    • draft-ERC20Permit: replace immutable with constant for _PERMIT_TYPEHASH since the keccak256 of string literals is treated specially and the hash is evaluated at compile time. (#3196)
    • ERC1155: Add a _afterTokenTransfer hook for improved extensibility. (#3166)
    • ERC1155URIStorage: add a new extension that implements a _setURI behavior similar to ERC721's _setTokenURI. (#3210)
    • DoubleEndedQueue: a new data structure that supports efficient push and pop to both front and back, useful for FIFO and LIFO queues. (#3153)
    • Governor: improved security of onlyGovernance modifier when using an external executor contract (e.g. a timelock) that can operate without necessarily going through the governance protocol. (#3147)
    • Governor: Add a way to parameterize votes. This can be used to implement voting systems such as fractionalized voting, ERC721 based voting, or any number of other systems. The params argument added to _countVote method, and included in the newly added _getVotes method, can be used by counting and voting modules respectively for such purposes. (#3043)
    • Governor: rewording of revert reason for consistency. (#3275)
    • Governor: fix an inconsistency in data locations that could lead to invalid bytecode being produced. (#3295)
    • Governor: Implement IERC721Receiver and IERC1155Receiver to improve token custody by governors. (#3230)
    • TimelockController: Implement IERC721Receiver and IERC1155Receiver to improve token custody by timelocks. (#3230)
    • TimelockController: Add a separate canceller role for the ability to cancel. (#3165)
    • Initializable: add a reinitializer modifier that enables the initialization of new modules, added to already initialized contracts through upgradeability. (#3232)

    ... (truncated)

    Commits
    • 3b8b4ba 4.7.1
    • 212de08 Fix issues caused by abi.decode reverting (#3552)
    • 8c49ad7 4.7.0
    • 0b238a5 Minor wording fixes ERC4626 contract (#3510)
    • e4748fb Support memory arrays in MerkleTree multiproof (#3493)
    • b971092 Make ERC4626 _deposit and _withdraw internal virtual (#3504)
    • 4307d74 Add a caution note to ERC4626 about EOA access (#3503)
    • 1e7d735 Clarify PaymentSplitter shares are static
    • 029706d Fix check for generated code when last updated is a release candidate
    • 97c46a7 Output diff when test:generation fails
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
  • Improve deployment/artifact pipeline

    Improve deployment/artifact pipeline

    Right now, artifacts + typings are spread across multiple packages, and used in random places from different sources.

    The artifacts + generated typechain should live in one "source of truth" which the rmm-ethers + rmm-sdk can pull from. However... this is a little difficult because:

    • rmm-ethers does deployments
    • SDK doesn't do deplyoments, but does use the artifacts
    • rmm-ethers uses sdk
    opened by Alexangelj 0
  • build(deps): bump decode-uri-component from 0.2.0 to 0.2.2

    build(deps): bump decode-uri-component from 0.2.0 to 0.2.2

    Bumps decode-uri-component from 0.2.0 to 0.2.2.

    Release notes

    Sourced from decode-uri-component's releases.

    v0.2.2

    • Prevent overwriting previously decoded tokens 980e0bf

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.1...v0.2.2

    v0.2.1

    • Switch to GitHub workflows 76abc93
    • Fix issue where decode throws - fixes #6 746ca5d
    • Update license (#1) 486d7e2
    • Tidelift tasks a650457
    • Meta tweaks 66e1c28

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.1

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • build(deps): bump qs from 6.5.2 to 6.5.3

    build(deps): bump qs from 6.5.2 to 6.5.3

    Bumps qs from 6.5.2 to 6.5.3.

    Changelog

    Sourced from qs's changelog.

    6.5.3

    • [Fix] parse: ignore __proto__ keys (#428)
    • [Fix] utils.merge`: avoid a crash with a null target and a truthy non-array source
    • [Fix] correctly parse nested arrays
    • [Fix] stringify: fix a crash with strictNullHandling and a custom filter/serializeDate (#279)
    • [Fix] utils: merge: fix crash when source is a truthy primitive & no options are provided
    • [Fix] when parseArrays is false, properly handle keys ending in []
    • [Fix] fix for an impossible situation: when the formatter is called with a non-string value
    • [Fix] utils.merge: avoid a crash with a null target and an array source
    • [Refactor] utils: reduce observable [[Get]]s
    • [Refactor] use cached Array.isArray
    • [Refactor] stringify: Avoid arr = arr.concat(...), push to the existing instance (#269)
    • [Refactor] parse: only need to reassign the var once
    • [Robustness] stringify: avoid relying on a global undefined (#427)
    • [readme] remove travis badge; add github actions/codecov badges; update URLs
    • [Docs] Clean up license text so it’s properly detected as BSD-3-Clause
    • [Docs] Clarify the need for "arrayLimit" option
    • [meta] fix README.md (#399)
    • [meta] add FUNDING.yml
    • [actions] backport actions from main
    • [Tests] always use String(x) over x.toString()
    • [Tests] remove nonexistent tape option
    • [Dev Deps] backport from main
    Commits
    • 298bfa5 v6.5.3
    • ed0f5dc [Fix] parse: ignore __proto__ keys (#428)
    • 691e739 [Robustness] stringify: avoid relying on a global undefined (#427)
    • 1072d57 [readme] remove travis badge; add github actions/codecov badges; update URLs
    • 12ac1c4 [meta] fix README.md (#399)
    • 0338716 [actions] backport actions from main
    • 5639c20 Clean up license text so it’s properly detected as BSD-3-Clause
    • 51b8a0b add FUNDING.yml
    • 45f6759 [Fix] fix for an impossible situation: when the formatter is called with a no...
    • f814a7f [Dev Deps] backport from main
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • build(deps): bump loader-utils from 1.4.0 to 1.4.2

    build(deps): bump loader-utils from 1.4.0 to 1.4.2

    Bumps loader-utils from 1.4.0 to 1.4.2.

    Release notes

    Sourced from loader-utils's releases.

    v1.4.2

    1.4.2 (2022-11-11)

    Bug Fixes

    v1.4.1

    1.4.1 (2022-11-07)

    Bug Fixes

    Changelog

    Sourced from loader-utils's changelog.

    1.4.2 (2022-11-11)

    Bug Fixes

    1.4.1 (2022-11-07)

    Bug Fixes

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • build(deps): bump @openzeppelin/contracts from 4.4.2 to 4.7.3

    build(deps): bump @openzeppelin/contracts from 4.4.2 to 4.7.3

    Bumps @openzeppelin/contracts from 4.4.2 to 4.7.3.

    Release notes

    Sourced from @​openzeppelin/contracts's releases.

    v4.7.3

    :warning: This is a patch for a high severity issue. For more information visit the security advisory.

    Breaking changes

    • ECDSA: recover(bytes32,bytes) and tryRecover(bytes32,bytes) no longer accept compact signatures to prevent malleability. Compact signature support remains available using recover(bytes32,bytes32,bytes32) and tryRecover(bytes32,bytes32,bytes32).

    v4.7.2

    :warning: This is a patch for three issues, including a high severity issue in GovernorVotesQuorumFraction. For more information visit the security advisories (1, 2, 3).

    1. GovernorVotesQuorumFraction: Fixed quorum updates so they do not affect past proposals that failed due to lack of quorum. (#3561)
    2. ERC165Checker: Added protection against large returndata. (#3587)
    3. LibArbitrumL2, CrossChainEnabledArbitrumL2: Fixed detection of cross-chain calls for EOAs. Previously, calls from EOAs would be classified as cross-chain calls. (#3578)

    v4.7.1

    :warning: This is a patch for a medium severity issue affecting SignatureChecker and a high severity issue affecting ERC165Checker. For more information visit the security advisories (1, 2).

    • SignatureChecker: Fix an issue that causes isValidSignatureNow to revert when the target contract returns ill-encoded data. (#3552)
    • ERC165Checker: Fix an issue that causes supportsInterface to revert when the target contract returns ill-encoded data. (#3552)

    v4.7.0

    • TimelockController: Migrate _call to _execute and allow inheritance and overriding similar to Governor. (#3317)
    • CrossChainEnabledPolygonChild: replace the require statement with the custom error NotCrossChainCall. (#3380)
    • ERC20FlashMint: Add customizable flash fee receiver. (#3327)
    • ERC4626: add an extension of ERC20 that implements the ERC4626 Tokenized Vault Standard. (#3171)
    • SafeERC20: add safePermit as mitigation against phantom permit functions. (#3280)
    • Math: add a mulDiv function that can round the result either up or down. (#3171)
    • Math: Add a sqrt function to compute square roots of integers, rounding either up or down. (#3242)
    • Strings: add a new overloaded function toHexString that converts an address with fixed length of 20 bytes to its not checksummed ASCII string hexadecimal representation. (#3403)
    • EnumerableMap: add new UintToUintMap map type. (#3338)
    • EnumerableMap: add new Bytes32ToUintMap map type. (#3416)
    • SafeCast: add support for many more types, using procedural code generation. (#3245)
    • MerkleProof: add multiProofVerify to prove multiple values are part of a Merkle tree. (#3276)
    • MerkleProof: add calldata versions of the functions to avoid copying input arrays to memory and save gas. (#3200)
    • ERC721, ERC1155: simplified revert reasons. (#3254, (#3438))
    • ERC721: removed redundant require statement. (#3434)
    • PaymentSplitter: add releasable getters. (#3350)
    • Initializable: refactored implementation of modifiers for easier understanding. (#3450)
    • Proxies: remove runtime check of ERC1967 storage slots. (#3455)

    Breaking changes

    • Initializable: functions decorated with the modifier reinitializer(1) may no longer invoke each other.

    v4.7.0-rc.0

    This prerelease is now available for open review! Let us know your feedback and if you find any security issues.

    We have a bug bounty with rewards of up to USD $25,000 and a special POAP for submitting a valid issue.

    See the announcement for more details.

    ... (truncated)

    Changelog

    Sourced from @​openzeppelin/contracts's changelog.

    4.7.3

    Breaking changes

    • ECDSA: recover(bytes32,bytes) and tryRecover(bytes32,bytes) no longer accept compact signatures to prevent malleability. Compact signature support remains available using recover(bytes32,bytes32,bytes32) and tryRecover(bytes32,bytes32,bytes32).

    4.7.2

    • LibArbitrumL2, CrossChainEnabledArbitrumL2: Fixed detection of cross-chain calls for EOAs. Previously, calls from EOAs would be classified as cross-chain calls. (#3578)
    • GovernorVotesQuorumFraction: Fixed quorum updates so they do not affect past proposals that failed due to lack of quorum. (#3561)
    • ERC165Checker: Added protection against large returndata. (#3587)

    4.7.1

    • SignatureChecker: Fix an issue that causes isValidSignatureNow to revert when the target contract returns ill-encoded data. (#3552)
    • ERC165Checker: Fix an issue that causes supportsInterface to revert when the target contract returns ill-encoded data. (#3552)

    4.7.0 (2022-06-29)

    • TimelockController: Migrate _call to _execute and allow inheritance and overriding similar to Governor. (#3317)
    • CrossChainEnabledPolygonChild: replace the require statement with the custom error NotCrossChainCall. (#3380)
    • ERC20FlashMint: Add customizable flash fee receiver. (#3327)
    • ERC4626: add an extension of ERC20 that implements the ERC4626 Tokenized Vault Standard. (#3171)
    • SafeERC20: add safePermit as mitigation against phantom permit functions. (#3280)
    • Math: add a mulDiv function that can round the result either up or down. (#3171)
    • Math: Add a sqrt function to compute square roots of integers, rounding either up or down. (#3242)
    • Strings: add a new overloaded function toHexString that converts an address with fixed length of 20 bytes to its not checksummed ASCII string hexadecimal representation. (#3403)
    • EnumerableMap: add new UintToUintMap map type. (#3338)
    • EnumerableMap: add new Bytes32ToUintMap map type. (#3416)
    • SafeCast: add support for many more types, using procedural code generation. (#3245)
    • MerkleProof: add multiProofVerify to prove multiple values are part of a Merkle tree. (#3276)
    • MerkleProof: add calldata versions of the functions to avoid copying input arrays to memory and save gas. (#3200)
    • ERC721, ERC1155: simplified revert reasons. (#3254, (#3438))
    • ERC721: removed redundant require statement. (#3434)
    • PaymentSplitter: add releasable getters. (#3350)
    • Initializable: refactored implementation of modifiers for easier understanding. (#3450)
    • Proxies: remove runtime check of ERC1967 storage slots. (#3455)

    Breaking changes

    • Initializable: functions decorated with the modifier reinitializer(1) may no longer invoke each other.

    4.6.0 (2022-04-26)

    • crosschain: Add a new set of contracts for cross-chain applications. CrossChainEnabled is a base contract with instantiations for several chains and bridges, and AccessControlCrossChain is an extension of access control that allows cross-chain operation. (#3183)
    • AccessControl: add a virtual _checkRole(bytes32) function that can be overridden to alter the onlyRole modifier behavior. (#3137)
    • EnumerableMap: add new AddressToUintMap map type. (#3150)
    • EnumerableMap: add new Bytes32ToBytes32Map map type. (#3192)
    • ERC20FlashMint: support infinite allowance when paying back a flash loan. (#3226)
    • ERC20Wrapper: the decimals() function now tries to fetch the value from the underlying token instance. If that calls revert, then the default value is used. (#3259)

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • build(deps-dev): bump semantic-release from 19.0.2 to 19.0.3

    build(deps-dev): bump semantic-release from 19.0.2 to 19.0.3

    Bumps semantic-release from 19.0.2 to 19.0.3.

    Release notes

    Sourced from semantic-release's releases.

    v19.0.3

    19.0.3 (2022-06-09)

    Bug Fixes

    • log-repo: use the original form of the repo url to remove the need to mask credentials (#2459) (58a226f), closes #2449
    Commits
    • 58a226f fix(log-repo): use the original form of the repo url to remove the need to ma...
    • 17d60d3 build(deps): bump npm from 8.3.1 to 8.12.0 (#2447)
    • ab45ab1 chore(lint): disabled rules that dont apply to this project (#2408)
    • ea389c3 chore(deps): update dependency yargs-parser to 13.1.2 [security] (#2402)
    • fa994db build(deps): bump node-fetch from 2.6.1 to 2.6.7 (#2399)
    • b79116b build(deps): bump trim-off-newlines from 1.0.1 to 1.0.3
    • 6fd7e56 build(deps): bump minimist from 1.2.5 to 1.2.6
    • 2b94bb4 docs: update broken link to CI config recipes (#2378)
    • b4bc191 docs: Correct circleci workflow (#2365)
    • 2c30e26 Merge pull request #2333 from semantic-release/next
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • build(deps): bump npm from 8.4.0 to 8.12.0

    build(deps): bump npm from 8.4.0 to 8.12.0

    Bumps npm from 8.4.0 to 8.12.0.

    Changelog

    Sourced from npm's changelog.

    v8.12.0 (2022-06-01)

    Features

    Bug Fixes

    Dependencies

    v8.11.0 (2022-05-25)

    Features

    Bug Fixes

    Documentation

    Dependencies

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
Releases(v1.1.0)
  • v1.1.0(Apr 6, 2022)

  • v1.0.0(Mar 22, 2022)

    1.0.0 (2022-03-22)

    Bug Fixes

    • build: updates node engines and latest sdk package (28b9cca)
    • deps: updates sdk to be in the main dependencies (c321afb)
    • dev-pools: updates delete dev script to delete dev pools (b714e6f)
    • factory-checks: add tasks to verify bytecode (ed52fc2)
    • hardhat-config: network accounts fix (4e505ec)
    • readme-code: code snippets now have their language (35252a1)
    • release: adds ts node transpile to release ci (d965cd9)
    • remove-diagram: removes the diagram, forces a release (0130d5c)
    • rmmContracts: updates rmmContract class with contract property (cf10614)
    • sdk-link: adds links to sdk (6250d34)
    • semantic-release: install semantic release (3293a3b)
    • shell-snippets: removes shell snippets for bash (e49a01e)

    Features

    • better-deployments: updates pool deployments scripts and settings (eae29cf)
    • bump-manager: updates rmm-sdk to latest and rmm-manager final release (2fb768f)
    • deploy-engine: added deploy engine script (47947fa)
    • deploy-pools: adds a script to deploy pools from a config (e11eed2)
    • mainnet: yoot (9673b9e)
    • rc-1: updates smart contract packages and deploys release candidate 1 (98c2bd2)
    • readme-docs: improves readme info for rmm-ethers (5de7f70)
    • tx-hash: adds tx hash to write calls from rmm ethers (8990ad3)
    • upgradable-renderer: deploys the position renderer as an upgrad… (#14) (9283655)
    • week-5-deployment: deploys the March version of the protcol, rc-3 (ae6c200)
    Source code(tar.gz)
    Source code(zip)
  • v1.0.0-rc.8(Mar 22, 2022)

  • v1.0.0-rc.7(Mar 14, 2022)

  • v1.0.0-rc.6(Mar 3, 2022)

  • v1.0.0-rc.5(Feb 3, 2022)

  • v1.0.0-rc.4(Jan 31, 2022)

  • v1.0.0-rc.3(Jan 31, 2022)

  • v1.0.0-rc.2(Jan 28, 2022)

  • v1.0.0-rc.1(Jan 28, 2022)

    1.0.0-rc.1 (2022-01-28)

    Bug Fixes

    • deps: updates sdk to be in the main dependencies (c321afb)
    • dev-pools: updates delete dev script to delete dev pools (b714e6f)
    • readme-code: code snippets now have their language (35252a1)
    • rmmContracts: updates rmmContract class with contract property (cf10614)
    • sdk-link: adds links to sdk (6250d34)
    • semantic-release: install semantic release (3293a3b)
    • shell-snippets: removes shell snippets for bash (e49a01e)

    Features

    • better-deployments: updates pool deployments scripts and settings (eae29cf)
    • deploy-engine: added deploy engine script (47947fa)
    • deploy-pools: adds a script to deploy pools from a config (e11eed2)
    • readme-docs: improves readme info for rmm-ethers (5de7f70)
    • tx-hash: adds tx hash to write calls from rmm ethers (8990ad3)
    Source code(tar.gz)
    Source code(zip)
  • v0.0.11-beta.1(Jan 9, 2022)

    What's Changed

    • Feat/deploy pools by @Alexangelj in https://github.com/primitivefinance/rmm-ethers/pull/2

    Full Changelog: https://github.com/primitivefinance/rmm-ethers/compare/v0.0.1-beta.1...v0.0.11-beta.1

    Source code(tar.gz)
    Source code(zip)
  • v0.0.1-beta.1(Jan 6, 2022)

    What's Changed

    • v0.0.1-beta.1-release by @Alexangelj in https://github.com/primitivefinance/rmm-ethers/pull/1

    New Contributors

    • @Alexangelj made their first contribution in https://github.com/primitivefinance/rmm-ethers/pull/1

    Full Changelog: https://github.com/primitivefinance/rmm-ethers/commits/v0.0.1-beta.1

    Source code(tar.gz)
    Source code(zip)
Owner
Primitive
Crypto Derivatives without Oracles
Primitive
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
💻 ssher.vim is interacting remote machines(only linux) through ssh connection

?? ssher.vim is interacting remote machines(only linux) through ssh connection

Luma 3 Feb 21, 2022
Journeys is a django based community-focused website that allows users to bookmark URLs (through chrome extension) and share their journeys through timelines.

Journeys is a django based community-focused website that allows users to bookmark URLs (through chrome extension) and share their journeys through timelines. A timeline is a collection of links that share a common topic or a journey of building and learning something new. Users can create timelines, share them publicly, and explore resources.

Students' Web Committee 14 Jun 13, 2022
Using a RPI 3b+ to create a PT camera accessible through Windows browser and controllable through MQTT

web-camera_PT A Web flask server converts the MJPEG stream from RPI to JPG img using opencv, then display in browser. Controls added to move Camera in

null 11 Dec 20, 2022
📡Usagi-http-interaction: A library for interacting with Http Interaction API

?? - A library for interacting with Http Interaction API (API for receiving interactions.)

Rabbit House Corp 3 Oct 24, 2022
Compact library for interacting with Ankr Scan Multichain API.

ankrscan.js Compact SDK for interacting with Ankr Scan MultiChain JSON-RPC API. SDK supports following MultiChain methods: getLogs - logs matching the

Ankr 23 Jan 3, 2023
A Deno library for interacting with the mouse 🖱️ keyboard ⌨️ and screen 💻

A Deno library for interacting with the mouse ??️ keyboard ⌨️ and screen ?? . Litebot provides a simple API for creating kbm events, macros, & working with displays. Litebot leverages Deno's FFI to allow speedy low level control in C & C++ while having a typescript API exposed to the user.

Tyler Laceby 10 Aug 30, 2022
JavaScript library for parsing Dirtywave M8 files, complete with a CLI for interacting with M8 files.

m8-js This repository contains a JavaScript library for parsing Dirtywave M8 files, as well as a CLI for interacting with M8 files. The hopes are not

Jeremy Whitlock 20 Dec 17, 2022
Type safe library for interacting with Mindbody's Public API (v6) and Webhooks

Mindbody API Type safe library for interacting with Mindbody's Public API (v6) and Webhooks ⚠️ Read before installing This library is typed according

SplitPass 4 Dec 9, 2022
Build a Full Stack Marketplace on Ethereum with React, Solidity, Hardhat, and Ethers.js

Building a Digital Marketplace on Ethereum The technologies used in this workshop are React, Next.js, Tailwind CSS, HardHat, Solidity, and Ethers. Get

Nader Dabit 114 Nov 15, 2022
A web3 starter project using Typescript, Hardhat, ethers.js and @web3-react

Starter React Typescript Ethers.js Hardhat Project This repo contains a Hardhat and React Dapp starter project. The React Dapp in the frontend dir of

ChainShot 39 Dec 31, 2022
A Bed and Breakfast dApp run on Ethereum. Includes a token + schedule system (Solidity) and full front-end (React + ethers.js) built with Hardhat.

Hotel ETH - Watch Demo Video Hotel ETH A (fictional) Bed-and-Breakfast run on Ethereum Come Book a Room on Kovan or Rinkeby Networks View the Demo » C

Ryan Lambert 20 Aug 20, 2022
A comprehensive collection of useful tools developed with the help of Ethers.js to interact with the Ethereum Blockchain to develop great DeFi apps as quickly and easily as possible.

hudi-packages-ethersfactory How to install Installing with npm For more information on using npm check out the docs here. npm i @humandataincome/ether

HUDI 6 Mar 30, 2022
Decentralized twitter using Solidity, Ethereum, hardhat, ethers, IPFS, Next.JS, TypeScript, TailwindCSS.

DWITTER: Decentralized Twitter Check out the deployed version of this app at https://dwtr.wajeshubham.in Transactions on Ethereum are slow. Therefore,

Shubham Waje 12 Sep 2, 2022
Flashbots Ethers TypeScript example for Node.js and browser

Flashbots Ethers Example This project shows how to use Ethers to interact with Flashbots from JavaScript/TypeScript. The examples can be run in Node.j

Chris Hager 34 Jun 28, 2022
Introductory fullstack ethereum dapp using: solidity, hardhat, react.js, ethers.js

Intro to Fullstack Ethereum Development Check out deployed dapp here! (Make sure you're connected to the Rinkeby Testnet) This article will help you e

Christian Chiarulli 77 Dec 21, 2022
Parse Ethers.js errors with ease 💅🏻

ethers-error-parser Parse Ethers.js errors with ease ???? Highlights Zero dependencies ?? Lightweight (637 bytes gzipped) ?? Simple to use ⚡️ Work in

Enzo Ferey 30 Dec 28, 2022