<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                我們對比ethereum和ep的transaction的數據結構: 下面是ethereum的transaction的數據結構: ~~~ type Transaction struct { inner TxData // Consensus contents of a transaction time time.Time // Time first seen locally (spam avoidance) // caches hash atomic.Value size atomic.Value from atomic.Value } ~~~ 其中txData數據結構有三種實現:DynamicFeeTx, LegacyTx and AccessListTx. ~~~ type DynamicFeeTx struct { ChainID *big.Int Nonce uint64 GasTipCap *big.Int // a.k.a. maxPriorityFeePerGas GasFeeCap *big.Int // a.k.a. maxFeePerGas Gas uint64 To *common.Address `rlp:"nil"` // nil means contract creation Value *big.Int Data []byte AccessList AccessList // Signature values //`r and s are outputs of an ECDSA signature, and`v`is the recovery id V *big.Int `json:"v" gencodec:"required"` R *big.Int `json:"r" gencodec:"required"` S *big.Int `json:"s" gencodec:"required"` } ~~~ ~~~ // LegacyTx is the transaction data of regular Ethereum transactions. type LegacyTx struct { Nonce uint64 // nonce of sender account GasPrice *big.Int // wei per gas Gas uint64 // gas limit To *common.Address `rlp:"nil"` // nil means contract creation Value *big.Int // wei amount Data []byte // contract invocation input data V, R, S *big.Int // signature values } ~~~ ~~~ // AccessListTx is the data of EIP-2930 access list transactions. type AccessListTx struct { ChainID *big.Int // destination chain ID Nonce uint64 // nonce of sender account GasPrice *big.Int // wei per gas Gas uint64 // gas limit To *common.Address `rlp:"nil"` // nil means contract creation Value *big.Int // wei amount Data []byte // contract invocation input data AccessList AccessList // EIP-2930 access list V, R, S *big.Int // signature values } ~~~ 其中LegacyTx是歷史上的ethereum的結構,他們還是有些區別,其它兩種都與協議有關。另外,最開始的ethereum的transaction結構是沒有chainID的。 我們看看ep的transaction數據結構: ~~~ type Transaction struct { Nonce uint64 GasPrice *big.Int Gas uint64 To *Address Value *big.Int Input []byte V *big.Int R *big.Int S *big.Int Hash Hash From Address // Cache size atomic.Value } ~~~ 這個結構與上面的LegacyTx相比,多了From字段和Cache字段,對比其它的結構,對跨鏈數據交換影響不大(以太坊必須向后兼容LegacyTx)。 下面是對transaction的關鍵字段的說明: 1. **nonce**: The number of transaction serial numbers sent by this account (which can be roughly understood as “this is the first transaction of this account”). 2. **gasPrice**: The fee (measured in Wei) paid per unit of gas to perform this transaction and perform calculations. 3. **gasLimit**: The maximum amount of gas that can be used when executing this transaction. 4. **to**: If this transaction is used to send ether, here is the EOA address that receives ether; if this transaction is used to send a message to the contract (for example, calling a method in a smart contract), here is the address of the contract; if this The transaction is used to create the contract, here the value is empty. 5. **value**: If this transaction is used to send and receive ether, here is the amount of tokens measured in Wei in the receiving account; if this transaction is used to send a message call to the contract, here is the amount of Wei paid to the smart contract that receives this message ; if this transaction is used to create a contract, here is the amount of ether in Wei stored in the account when the contract was initialized. 6. **v, r, s**: Values ??used in the cryptographic signature of the transaction, which can be used to determine the sender of the transaction. 7. **data**(only used for value transfer and sending message calls to smart contracts) input data that accompanies the message call (for example, if you want to execute a setter method in a smart contract, the data field should include the identifier of the setter method, and the parameter value you want to set). All transactions in the block are also stored in the Merkle tree. And the root node hash value of this tree is saved by the block header!
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看