SimpleStorage - brownie #94
-
anyone tried to deploy name to favourite number function in brownie ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
def nameToReg(): thanks i tried and it worked :) + i modified that contract to save user name and registration number , then we can retrieve user name through registration number |
Beta Was this translation helpful? Give feedback.
def nameToReg():
account = get_account()
simple_storage = SimpleStorage.deploy({"from": account})
name = input("Enter your name?")
regno = input("Enter your reg no ?")
transaction = simple_storage.addPerson(name, regno, {"from": account})
transaction.wait(1)
regnoc = input("Enter Regno to check user name ?")
updated_stored_value = simple_storage.RegnotoName(regnoc)
print(updated_stored_value)
thanks i tried and it worked :) + i modified that contract to save user name and registration number , then we can retrieve user name through registration number