Skip to content

SimpleStorage - brownie #94

Answered by mohsin5432
mohsin5432 asked this question in Q&A
Discussion options

You must be logged in to vote

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

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@PatrickAlphaC
Comment options

Answer selected by mohsin5432
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants