Closed aulneau closed 4 years ago
Why is makeSmartContractDeploy prefixed with Smart vs makeContractDeploy to be in line with makeContractCall?
Agree with removing "smart" from makeSmartContractDeploy
Why are we prefixing some things with STX? Would makeTokenTransfer make sense, and makeContractPostCondition?
The reason that those functions are prefixed with STX is because there could be other types of token transfer transactions.
I actually think the current naming is in line with is published in SIP-005 https://github.com/blockstack/stacks-blockchain/blob/sip/sip-005/sip/sip-005-blocks-and-transactions.md#type-1-instantiating-a-smart-contract
The smart
prefix is used for a deploy tx, but not for a contract-call
tx:
The payload type ID can take any of the following values:
0x00: the payload that follows is a token-transfer payload
0x01: the payload that follows is a contract-call payload
0x02: the payload that follows is a smart-contract payload
0x03: the payload that follows is a poison-microblock payload
0x04: the payload that follows is a coinbase payload.
Let's update the SIP to match the names Thomas suggested, and then we can make these changes in the tx-lib
I see we have these methods:
makeSmartContractDeploy
makeContractCall
makeContractSTXPostCondition
makeSTXTokenTransfer
Questions:
makeSmartContractDeploy
prefixed withSmart
vsmakeContractDeploy
to be in line withmakeContractCall
?STX
? WouldmakeTokenTransfer
make sense, andmakeContractPostCondition
?