| 61 | const testcaseMethod = "testcase" |
| 62 | |
| 63 | func NewDeployWasmContract(signer *account.Account, code []byte) (*types.Transaction, error) { |
| 64 | mutable, err := utils.NewDeployCodeTransaction(0, 100000000, code, payload.WASMVM_TYPE, "name", "version", |
| 65 | "author", "email", "desc") |
| 66 | if err != nil { |
| 67 | return nil, err |
| 68 | } |
| 69 | err = utils.SignTransaction(signer, mutable) |
| 70 | if err != nil { |
| 71 | return nil, err |
| 72 | } |
| 73 | tx, err := mutable.IntoImmutable() |
| 74 | return tx, err |
| 75 | } |
| 76 | |
| 77 | func NewDeployNeoContract(signer *account.Account, code []byte) (*types.Transaction, error) { |
| 78 | mutable, err := utils.NewDeployCodeTransaction(0, 100000000, code, payload.NEOVM_TYPE, "name", "version", |