Giter Site home page Giter Site logo

account-bound-proxies's People

Contributors

stevennevins avatar sweep-ai[bot] avatar

Stargazers

 avatar

Watchers

 avatar

account-bound-proxies's Issues

Sweep (slow): Create documentation and diagrams for contracts

Details

  • For each file in the src directory, create an overview markdown file
  • Write an overview for each contract in the src directory
  • The overview of each contract in the src directory should contain information about how the contracts function
  • The overview of each contract in the src directory should contain a description of how and when each external and public function is used
  • The overview of each contract in the src directory should contain a mermaid.js diagram for how a user interacts with the contracts
Checklist
  • docs/Router.md

• Write an overview of the Router contract, including its purpose and functionalities.
• Document each public and external function in the Router contract, explaining how and when they are used.
• Create a mermaid.js diagram to visually represent how a user interacts with the Router contract. Include this diagram in the markdown file.

  • docs/RouterRegistry.md

• Write an overview of the RouterRegistry contract, including its purpose and functionalities.
• Document each public and external function in the RouterRegistry contract, explaining how and when they are used.
• Create a mermaid.js diagram to visually represent how a user interacts with the RouterRegistry contract. Include this diagram in the markdown file.

  • docs/IOwner.md

• Write an overview of the IOwner interface, including its purpose and functionalities.
• Document each public and external function in the IOwner interface, explaining how and when they are used.
• Create a mermaid.js diagram to visually represent how a user interacts with the IOwner interface. Include this diagram in the markdown file.

  • docs/MultiSendCallOnly.md

• Write an overview of the MultiSendCallOnly library, including its purpose and functionalities.
• Document each public and external function in the MultiSendCallOnly library, explaining how and when they are used.
• Create a mermaid.js diagram to visually represent how a user interacts with the MultiSendCallOnly library. Include this diagram in the markdown file.

  • README.md

• Add a section that provides an overview of the documentation available for each contract in the src directory.
• Include links to the markdown files for each contract in the new section.

Sweep: Add the ability for the router to accept a transaction bundle signed by the owner

  • Add a nonce to Router.sol
  • Add a second multisend function that accepts a signed transaction bundle and nonce
  • The signature should recover to the owner of the router
  • Randomly increment the nonce value when a signed transaction bundle is executed
Checklist
  • src/Router.sol
  • Add a nonce variable of type uint256
    • Add a signedMultiSend function that accepts bytes calldata transactions, bytes calldata signature, and uint256 nonce
    • Verify the signature and recover the owner address
    • Check if the recovered owner address matches the current owner of the router
    • Increment the nonce value randomly
    • Call the multiSend function with the provided transactions parameter
  • test/Router.t.sol
  • Add test cases for the new signedMultiSend function
    • Test the functionality of verifying the signature, recovering the owner address, and incrementing the nonce

Sweep (fast): Write unit tests for Router contract

Details

  • Test when the caller is and is not the owner of the Router
  • Test the Multisend function with large transactions bundles
Checklist
  • test/RouterTest.sol

• Import the Router contract, the MultiSendCallOnly library, and the necessary testing libraries.
• Define the RouterTest contract.
• Write a test function to check if the caller is the owner of the Router. This function should create a Router contract, call a function on the contract with the owner as the caller, and assert that the function call is successful.
• Write a test function to check if the caller is not the owner of the Router. This function should create a Router contract, call a function on the contract with a non-owner as the caller, and assert that the function call reverts.
• Write a test function to check the multiSend function with large transaction bundles. This function should create a Router contract, create a large transaction bundle, call the multiSend function with the transaction bundle, and assert that the function call is successful.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.