Slide 33
Slide 33 text
Test Code (1)
from brownie import *
import pytest
def test_deploy_and_settle(Token, IndivisibleAsset, OneTimeEscrow):
asset = accounts[0].deploy(IndivisibleAsset, "5322 Endo", "mˆ2", 300)
token = accounts[0].deploy(Token, "Test Token", "TEST", 18, "1000 ether")
Deploying token and asset contracts
The above is just the test code as it is, so in the console we will just type the inside of the function
First, let’s do seller = accounts[0] and buyer = accounts[1] for readability
Lecture 11 : Smart Contracts (w/ Demo) — FinTech — Financial Innovation and the Internet 2023 Fall — 2023-12-22 – p.33/40