Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
# Conflicts:
#	go.mod
#	go.sum
  • Loading branch information
scorpiotzh committed Jul 18, 2022
1 parent ec40962 commit bcd5eb1
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions txtool/create_sub_account_script.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"fmt"
"github.com/dotbitHQ/das-lib/common"
"github.com/dotbitHQ/das-lib/core"
"github.com/dotbitHQ/das-lib/molecule"
"github.com/dotbitHQ/das-lib/smt"
"github.com/dotbitHQ/das-lib/txbuilder"
"github.com/dotbitHQ/das-lib/witness"
Expand Down Expand Up @@ -39,15 +40,15 @@ func (s *SubAccountTxTool) BuildCreateSubAccountTxByScript(p *ParamBuildCreateSu
txParams.OtherWitnesses = append(txParams.OtherWitnesses, customScriptConfigWit)

// get price
//builderConfigCellSub, err := s.DasCore.ConfigCellDataBuilderByTypeArgs(common.ConfigCellTypeArgsSubAccount)
//if err != nil {
// return nil, fmt.Errorf("ConfigCellDataBuilderByTypeArgs err: %s", err.Error())
//}
//newRate, err := molecule.Bytes2GoU32(builderConfigCellSub.ConfigCellSubAccount.NewSubAccountCustomPriceDasProfitRate().RawData())
//if err != nil {
// return nil, fmt.Errorf("NewSubAccountCustomPriceDasProfitRate err: %s", err.Error())
//}
newRate := uint32(2000)
builderConfigCellSub, err := s.DasCore.ConfigCellDataBuilderByTypeArgs(common.ConfigCellTypeArgsSubAccount)
if err != nil {
return nil, fmt.Errorf("ConfigCellDataBuilderByTypeArgs err: %s", err.Error())
}
newRate, err := molecule.Bytes2GoU32(builderConfigCellSub.ConfigCellSubAccount.NewSubAccountCustomPriceDasProfitRate().RawData())
if err != nil {
return nil, fmt.Errorf("NewSubAccountCustomPriceDasProfitRate err: %s", err.Error())
}
//newRate := uint32(2000)
resPrice, err := GetCustomScriptMintTotalCapacity(&ParamCustomScriptMintTotalCapacity{
Action: common.DasActionCreateSubAccount,
//PriceApi: &PriceApiDefault{},
Expand Down

0 comments on commit bcd5eb1

Please sign in to comment.