Skip to content

Commit

Permalink
Merge branch 'feat/dp' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
sjatsh committed Nov 8, 2023
2 parents bc2404d + 3aa7df0 commit 0672d7e
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions txtool/update_sub_account.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,27 +354,15 @@ func (s *SubAccountTxTool) BuildUpdateSubAccountTx(p *ParamBuildUpdateSubAccount
dpRecycleWhitelist = dpRecycleWhitelistMap[k]
}

dpContract, err := core.GetDasContractInfo(common.DasContractNameDpCellType)
if err != nil {
return nil, fmt.Errorf("GetDasContractInfo err: %s", err.Error())
}

dpBaseCapacity := types.CellOutput{
Lock: managerDasLock,
Type: dpContract.ToScript(nil),
}.OccupiedCapacity(make([]byte, 12))

dpOutputCells, dpOutputData, replenishNormal, err := core.SplitDPCell(&core.ParamSplitDPCell{
dpOutputCells, dpOutputData, replenishNormal, err := s.DasCore.SplitDPCell(&core.ParamSplitDPCell{
FromLock: managerDasLock,
ToLock: dpRecycleWhitelist,
DPLiveCell: manualDpLiveCells,
DPLiveCellCapacity: manualTotalCapacity,
DPTotalAmount: manualTotalAmount,
DPTransferAmount: manualPrice,
DPBaseCapacity: dpBaseCapacity,
DPContract: dpContract,
DPSplitCount: 2,
DPSplitAmount: 100,
DPSplitAmount: 25 * common.UsdRateBase,
NormalCellLock: dpRecycleWhitelist,
})
if err != nil {
Expand Down

0 comments on commit 0672d7e

Please sign in to comment.