Imagine if an employee of a web2-based company is trying to buy a ticket to a work conference and the company wants to reimburse a part of that cost to the employee. That would take submitting checks to the financial department, taking up valuable company time and would cause a the amount of paperwork would frustrate any person. Pay Split is a Safe{Protocol} plugin that allows the employer to set limits to financial reimbursement, and employees to choose where to spend them, saving both parties lots of paperwork and nerves.
We leverage the new Safe{Core} Protocols to automate every part of the process, of both accepting, calculating and rerouting assets. The limits are set as a parameter to the smart contract. An external call to a users wallet is made through a metamask boilerplate. We started considering and implementing crosschain interoperability through Axelar - so that plugin functionality can be accessed from any chain.
contracts
- contains plugin smart contracts, deployed throughhardhat
web
- contains web interface for the plugin, automatically deployed togithub-pages
. Deployed withyarn
.web/payer
- contains a bolierplate metamask wallet connection to simulate a user wallet. Deployed withyarn
.
- The owner of the contract sets the reimbursement rate.
- The employee initiates the payment to a third party.
- Employees money accumulates on the plugin account.
- The requestet transaction is sent to the third party from the SAFE Wallet.
- All the funds from the plugin account can be "drained" to the SAFE Wallet on request of the owner.
- ipsavitsky234.github.io - the deployed plugin web landing
- 0x2B899F5672C9da3310B8adCCAFb82D3f92D6Bc45 - deployed plugin smart contract
Linea Smart contract transaction path:
https://goerli.etherscan.io/tx/0xd8295d845d0b94810dee5152dfe1e4a7e14eae71adbc43f319bd01007053c3fe - transaction to the plugin on the other side
Linea deployment RPC - a requirement for Linea bounty