I'm trying to execute my first contract on Ethereum. I've been able to compile and deploy one of Vyper's test examples of an auction. I believe the contract is executed when a transaction is sent to it. The thing I'm not yet understanding is when the constructor and the methods are called. As I understand it the bytecode is sent to the nodes for computation, but I'm missing how/when/where the constructor and the methods themselves are called. For instance, below I have a method called 'bid', but how does the transaction know how to call 'bid'? I think I'm not quite understanding the entire process from transaction submission down to contract execution. Thanks for your help!
beneficiary: public(address) auctionStart: public(timestamp) auctionEnd: public(timestamp) highestBidder: public(address) highestBid: public(uint256) ended: public(bool) pendingReturns: public(map(address, uint256)) @public def __init__(_beneficiary: address, _bidding_time: uint256): self.beneficiary = _beneficiary self.auctionStart = block.timestamp self.auctionEnd = self.auctionStart + _bidding_time @public @payable def bid(): assert block.timestamp < self.auctionEnd assert msg.value > self.highestBid self.pendingReturns[self.highestBidder] += self.highestBid self.highestBidder = msg.sender self.highestBid = as_unitless_number(msg.value)