Skip to main content
Using chain might confuse readers when it isn't meant to be in the context of block-chain, on a block-chain site.
Source Link

Each change in state in the auction contract passes a new datum (arbitrary data). The auction datum is made up of the 'Auction' and 'Bid' records. The bid record has a 'bBidder' field which is the public key of the bidder. You can't see this in the playground because the actual datum value isn't stored on-chain, the hash is which allows others to validate. When a validator (or the simulator) calculates the highest bidder, it does it from the start based off the series of eUXTOs'.

As to how does the auction example know who started the bid? When a new eUXTO is added to the chainseries of bids, the validator calculates the previous bids up to the current one, in order to discover the datum. This datum is then used in the contract script again to place the next bid.

The reason this can be done is because the result is entirely deterministic. Based off the same inputs (transactions in/endpoints), you'll get the same output.

Each change in state in the auction contract passes a new datum (arbitrary data). The auction datum is made up of the 'Auction' and 'Bid' records. The bid record has a 'bBidder' field which is the public key of the bidder. You can't see this in the playground because the actual datum value isn't stored on-chain, the hash is which allows others to validate. When a validator (or the simulator) calculates the highest bidder, it does it from the start based off the series of eUXTOs'.

As to how does the auction example know who started the bid? When a new eUXTO is added to the chain of bids, the validator calculates the previous bids up to the current one, in order to discover the datum. This datum is then used in the contract script again to place the next bid.

The reason this can be done is because the result is entirely deterministic. Based off the same inputs (transactions in/endpoints), you'll get the same output.

Each change in state in the auction contract passes a new datum (arbitrary data). The auction datum is made up of the 'Auction' and 'Bid' records. The bid record has a 'bBidder' field which is the public key of the bidder. You can't see this in the playground because the actual datum value isn't stored on-chain, the hash is which allows others to validate. When a validator (or the simulator) calculates the highest bidder, it does it from the start based off the series of eUXTOs'.

As to how does the auction example know who started the bid? When a new eUXTO is added to the series of bids, the validator calculates the previous bids up to the current one, in order to discover the datum. This datum is then used in the contract script again to place the next bid.

The reason this can be done is because the result is entirely deterministic. Based off the same inputs (transactions in/endpoints), you'll get the same output.

Removed commentary re: previous answer being wrong
Source Link
gRebel
  • 1.8k
  • 1
  • 9
  • 36

Previous response was wrong.

Each change in state in the auction contract passes a new datum (arbitrary data). The auction datum is made up of the 'Auction' and 'Bid' records. The bid record has a 'bBidder' field which is the public key of the bidder. You can't see this in the playground because the actual datum value isn't stored on-chain, the hash is which allows others to validate. When a validator (or the simulator) calculates the highest bidder, it does it from the start based off the series of eUXTOs'.

As to how does the auction example know who started the bid? When a new eUXTO is added to the chain of bids, the validator calculates the previous bids up to the current one, in order to discover the datum. This datum is then used in the contract script again to place the next bid.

The reason this can be done is because the result is entirely deterministic. Based off the same inputs (transactions in/endpoints), you'll get the same output.

Previous response was wrong.

Each change in state in the auction contract passes a new datum (arbitrary data). The auction datum is made up of the 'Auction' and 'Bid' records. The bid record has a 'bBidder' field which is the public key of the bidder. You can't see this in the playground because the actual datum value isn't stored on-chain, the hash is which allows others to validate. When a validator (or the simulator) calculates the highest bidder, it does it from the start based off the series of eUXTOs'.

As to how does the auction example know who started the bid? When a new eUXTO is added to the chain of bids, the validator calculates the previous bids up to the current one, in order to discover the datum. This datum is then used in the contract script again to place the next bid.

The reason this can be done is because the result is entirely deterministic. Based off the same inputs (transactions in/endpoints), you'll get the same output.

Each change in state in the auction contract passes a new datum (arbitrary data). The auction datum is made up of the 'Auction' and 'Bid' records. The bid record has a 'bBidder' field which is the public key of the bidder. You can't see this in the playground because the actual datum value isn't stored on-chain, the hash is which allows others to validate. When a validator (or the simulator) calculates the highest bidder, it does it from the start based off the series of eUXTOs'.

As to how does the auction example know who started the bid? When a new eUXTO is added to the chain of bids, the validator calculates the previous bids up to the current one, in order to discover the datum. This datum is then used in the contract script again to place the next bid.

The reason this can be done is because the result is entirely deterministic. Based off the same inputs (transactions in/endpoints), you'll get the same output.

added 40 characters in body
Source Link

Previous response was wrong.

Each change in state in the auction contract passes a new datum (arbitrary data). The auction datum is made up of the 'Auction' and 'Bid' records. The bid record has a 'bBidder' field which is the public key of the bidder. You can't see this in the playground because the actual datum value isn't stored on-chain, the hash is which allows others to validate. When a validator (or the simulator) calculates the highest bidder, it does it from the start based off the series of eUXTOs'.

As to how does the auction example know who started the bid? When a new eUXTO is added to the chain of bids, the validator calculates the previous bids up to the current one, in order to discover the datum. This datum is then used in the contract script again to place the next bid.

The reason this can be done is because the result is entirely deterministic. Based off the same inputs (transactions in/endpoints), you'll get the same output.

Previous response was wrong.

Each change in state in the auction contract passes a new datum (arbitrary data). The auction datum is made up of the 'Auction' and 'Bid' records. The bid record has a 'bBidder' field which is the public key of the bidder. You can't see this in the playground because the actual datum value isn't stored on-chain, the hash is which allows others to validate. When a validator (or the simulator) calculates the highest bidder, it does it from the start based off the series of eUXTOs'.

Previous response was wrong.

Each change in state in the auction contract passes a new datum (arbitrary data). The auction datum is made up of the 'Auction' and 'Bid' records. The bid record has a 'bBidder' field which is the public key of the bidder. You can't see this in the playground because the actual datum value isn't stored on-chain, the hash is which allows others to validate. When a validator (or the simulator) calculates the highest bidder, it does it from the start based off the series of eUXTOs'.

As to how does the auction example know who started the bid? When a new eUXTO is added to the chain of bids, the validator calculates the previous bids up to the current one, in order to discover the datum. This datum is then used in the contract script again to place the next bid.

The reason this can be done is because the result is entirely deterministic. Based off the same inputs (transactions in/endpoints), you'll get the same output.

added 40 characters in body
Source Link
Loading
Source Link
Loading