Skip to content

Transaction encoding #2

@lsaether

Description

@lsaether

We define the transaction encoding to be

    byte    TemporalUnit           [1  byte ]
    address recipient              [32 bytes]
    uint256 value                  [32 bytes]
    uint256 callGas                [32 bytes]
    uint256 gasPrice               [32 bytes]
    uint256 executionWindowStart   [32 bytes]
    uint256 executionWindowLength  [32 bytes]
    uint256 bounty                 [32 bytes]
    uint256 fee                    [32 bytes]
    bytes   callData               [32+bytes]

where TemporalUnit is either 0x01 for block number based scheduling or 0x02 for unix timestamp based scheduling. Transaction parameters recipient, value, callGas, gasPrice, executionWindowStart, executionWindowLength, bounty, and fee are ABI encoded. The end of the string of bytes contains the callData.

Serialized this will look like this:

0x010000000000000000000000007ed1e469fcb3ee19c0366d829e291451be638e59000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000
00000000000000014000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000002800000000000000000000000000000000
00000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000003c0000000000000000000000000000000000000000000000000000000000000046

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions