Skip to content

Latest commit

 

History

History
73 lines (37 loc) · 2.72 KB

File metadata and controls

73 lines (37 loc) · 2.72 KB

Background

(From the assignment) "A fintech startup company has recently hired you. This company is disrupting the finance industry with its own cross-border, Ethereum-compatible blockchain that connects financial institutions. Currently, the team is building smart contracts to automate many of the institutions’ financial processes and features, such as hosting joint savings accounts.

To automate the creation of joint savings accounts, you’ll create a Solidity smart contract that accepts two user addresses. These addresses will be able to control a joint savings account. Your smart contract will use ether management functions to implement a financial institution’s requirements for providing the features of the joint savings account. These features will consist of the ability to deposit and withdraw funds from the account."

Images

Figure 1

Solidity Code

Fig 1 -

Figure 2

Using the setAccounts function

Fig 2 -

Figure 3

Test the deposit function.

Fig 3 -

Figure 4

Sending 1 ether as wei.

Fig 4 -

Figure 5

Sending 10 ether as wei

Fig 5 -

Figure 6

Sending 5 ether

Fig 6 -

Figure 7

Withdrawing 5 ether into accountOne Fig 7 -

Figure 8

Withdrawing 10 ether into accountTwo

Fig 8 -

Technologies

This contract was written in Solidity 0.5.0.

Usage

To use this app, open the JointSavings.sol file and paste into the Remix IDE.

Contributors

Antonia Hurst

License

Copyright (c) 2015-2021 Project Jupyter https://github.com/jupyterlab/jupyterlab/blob/master/LICENSE