Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DeFiCh/ain:1.7.x DeFi CustomTx (DfTx) #201

Closed
fuxingloh opened this issue May 10, 2021 · 1 comment · Fixed by #247
Closed

DeFiCh/ain:1.7.x DeFi CustomTx (DfTx) #201

fuxingloh opened this issue May 10, 2021 · 1 comment · Fixed by #247
Assignees
Labels
kind/feature New feature request triage/accepted Triage has been accepted

Comments

@fuxingloh
Copy link
Contributor

fuxingloh commented May 10, 2021

Similar to #108

Implementation of 1.7.x Custom DfTx
https://github.com/DeFiCh/ain/blob/6428ac0ca470dd16f973d62b74a1ec0b9e5444a8/src/masternodes/mn_checks.h#L62-L67

enum class CustomTxType : uint8_t
{
  AppointOracle         = 'o',
  RemoveOracleAppoint   = 'h',
  UpdateOracleAppoint   = 't',
  SetOracleData         = 'y',
}

in

packages/jellyfish-transaction/src/script/defi/*

All CustomTX has a starting signature of DfTx in utf8 or 0x44665478. It is as it is, don't need to convert from BE to LE.

They are structured as a

  1. VarUInt + [OP_RETURN + DfTx + TYPES[CxTxType] + ...]
  2. VarUInt + 6a + 44665478 + Type + ...

Refer to #108 for a detailed implementation guide

@fuxingloh fuxingloh added kind/feature New feature request triage/accepted Triage has been accepted area/jellyfish-transaction labels May 10, 2021
@fuxingloh fuxingloh changed the title 1.7.x DeFi CustomTx (DfTx) DeFiCh/ain:1.7.x DeFi CustomTx (DfTx) May 10, 2021
@fuxingloh fuxingloh assigned surangap and unassigned surangap May 10, 2021
@monstrobishi monstrobishi self-assigned this May 17, 2021
@monstrobishi
Copy link
Contributor

Will implement RemoveOracleAppoint as RemoveOracle and UpdateOracleAppoint as UpdateOracle to be in line with RPC calls and make more sense in general

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New feature request triage/accepted Triage has been accepted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants