@@ -120,8 +120,11 @@ func BuildGenesisBlock(defaultBookkeeper []keypair.PublicKey, genesisConfig *con
120120}
121121
122122func newGoverningToken () * types.Transaction {
123- mutable := utils .NewDeployTransaction (nutils .OntContractAddress [:], "ONT" , "1.0" ,
123+ mutable , err := utils .NewDeployTransaction (nutils .OntContractAddress [:], "ONT" , "1.0" ,
124124 "dad-go Team" , "contact@ont.io" , "dad-go Network ONT Token" , payload .NEOVM_TYPE )
125+ if err != nil {
126+ panic ("[NewDeployTransaction] construct genesis governing token transaction error " )
127+ }
125128 tx , err := mutable .IntoImmutable ()
126129 if err != nil {
127130 panic ("construct genesis governing token transaction error " )
@@ -130,8 +133,11 @@ func newGoverningToken() *types.Transaction {
130133}
131134
132135func newUtilityToken () * types.Transaction {
133- mutable := utils .NewDeployTransaction (nutils .OngContractAddress [:], "ONG" , "1.0" ,
136+ mutable , err := utils .NewDeployTransaction (nutils .OngContractAddress [:], "ONG" , "1.0" ,
134137 "dad-go Team" , "contact@ont.io" , "dad-go Network ONG Token" , payload .NEOVM_TYPE )
138+ if err != nil {
139+ panic ("[NewDeployTransaction] construct genesis governing token transaction error " )
140+ }
135141 tx , err := mutable .IntoImmutable ()
136142 if err != nil {
137143 panic ("construct genesis utility token transaction error " )
@@ -140,9 +146,12 @@ func newUtilityToken() *types.Transaction {
140146}
141147
142148func newParamContract () * types.Transaction {
143- mutable := utils .NewDeployTransaction (nutils .ParamContractAddress [:],
149+ mutable , err := utils .NewDeployTransaction (nutils .ParamContractAddress [:],
144150 "ParamConfig" , "1.0" , "dad-go Team" , "contact@ont.io" ,
145151 "Chain Global Environment Variables Manager " , payload .NEOVM_TYPE )
152+ if err != nil {
153+ panic ("[NewDeployTransaction] construct genesis governing token transaction error " )
154+ }
146155 tx , err := mutable .IntoImmutable ()
147156 if err != nil {
148157 panic ("construct genesis param transaction error " )
@@ -151,8 +160,11 @@ func newParamContract() *types.Transaction {
151160}
152161
153162func newGovConfigTx () * types.Transaction {
154- mutable := utils .NewDeployTransaction (nutils .GovernanceContractAddress [:], "CONFIG" , "1.0" ,
163+ mutable , err := utils .NewDeployTransaction (nutils .GovernanceContractAddress [:], "CONFIG" , "1.0" ,
155164 "dad-go Team" , "contact@ont.io" , "dad-go Network Consensus Config" , payload .NEOVM_TYPE )
165+ if err != nil {
166+ panic ("[NewDeployTransaction] construct genesis governing token transaction error " )
167+ }
156168 tx , err := mutable .IntoImmutable ()
157169 if err != nil {
158170 panic ("construct genesis config transaction error " )
@@ -161,8 +173,11 @@ func newGovConfigTx() *types.Transaction {
161173}
162174
163175func deployAuthContract () * types.Transaction {
164- mutable := utils .NewDeployTransaction (nutils .AuthContractAddress [:], "AuthContract" , "1.0" ,
176+ mutable , err := utils .NewDeployTransaction (nutils .AuthContractAddress [:], "AuthContract" , "1.0" ,
165177 "dad-go Team" , "contact@ont.io" , "dad-go Network Authorization Contract" , payload .NEOVM_TYPE )
178+ if err != nil {
179+ panic ("[NewDeployTransaction] construct genesis governing token transaction error " )
180+ }
166181 tx , err := mutable .IntoImmutable ()
167182 if err != nil {
168183 panic ("construct genesis auth transaction error " )
@@ -171,8 +186,11 @@ func deployAuthContract() *types.Transaction {
171186}
172187
173188func deployOntIDContract () * types.Transaction {
174- mutable := utils .NewDeployTransaction (nutils .OntIDContractAddress [:], "OID" , "1.0" ,
189+ mutable , err := utils .NewDeployTransaction (nutils .OntIDContractAddress [:], "OID" , "1.0" ,
175190 "dad-go Team" , "contact@ont.io" , "dad-go Network ONT ID" , payload .NEOVM_TYPE )
191+ if err != nil {
192+ panic ("[NewDeployTransaction] construct genesis governing token transaction error " )
193+ }
176194 tx , err := mutable .IntoImmutable ()
177195 if err != nil {
178196 panic ("construct genesis ontid transaction error " )
0 commit comments