Git Product home page Git Product logo

delegatooooor's Introduction

Delegatooooor

Flow Chart

Granting Permission:

An account holder (the delegator) decides to grant permission to a delegate. They create and sign a transaction that includes a GrantPermission instruction, specifying the delegate's account. My program's process_instruction function gets called, which in turn calls Processor::process`` with the instruction data. Processor::process identifies the `GrantPermission` instruction and calls `grant_permission`, which updates a `DelegatePermissions` account to include a new permission (e.g., `Spend`).

Executing a Transaction:

When the delegate decides to execute a transaction on behalf of the delegator (e.g., buy tokens), they create and sign a transaction that includes an ExecuteTransaction instruction, specifying the details required for the transaction. The process_instruction function is invoked again, processing the ExecuteTransaction instruction. If the delegate has the appropriate Spend permission, as verified by the execute_transaction function, the program proceeds with the transaction logic.

Revoking Permission:

If the delegator wishes to revoke the delegate's permissions, they create and sign a transaction with a RevokePermission instruction. The process_instruction function handles this instruction similarly, removing the specified permissions from the delegate.

delegatooooor's People

Contributors

theghostmac avatar

Stargazers

xeno avatar Aniezeofor Chibueze Michael avatar  avatar

Watchers

 avatar

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.