diff --git a/packages/cli/src/codegen.ts b/packages/cli/src/codegen.ts
index a7594cd37..a0a18a830 100644
--- a/packages/cli/src/codegen.ts
+++ b/packages/cli/src/codegen.ts
@@ -815,8 +815,7 @@ export async function genLoadDeployments(config: Configuration) {
const source = `
${header}
- import { RunScriptResult, DeployContractExecutionResult } from '@alephium/cli'
- import { NetworkId } from '@alephium/web3'
+ import { RunScriptResult, DeployContractExecutionResult, NetworkId } from '@alephium/web3'
import { ${contractInstanceTypes} } from '.'
${imports}
diff --git a/packages/cli/src/deployment.test.ts b/packages/cli/src/deployment.test.ts
index ec32cca79..3d7bd0764 100644
--- a/packages/cli/src/deployment.test.ts
+++ b/packages/cli/src/deployment.test.ts
@@ -18,9 +18,8 @@ along with the library. If not, see .
import { PrivateKeyWallet } from '@alephium/web3-wallet'
import { Deployments, DeploymentsPerAddress, recordEqual, validatePrivateKeys } from './deployment'
-import { ContractInstance, web3 } from '@alephium/web3'
+import { DeployContractExecutionResult, ContractInstance, web3 } from '@alephium/web3'
import { randomContractAddress, testAddress } from '@alephium/web3-test'
-import { DeployContractExecutionResult } from './types'
describe('deployments', () => {
it('test record equal', () => {
diff --git a/packages/cli/src/deployment.ts b/packages/cli/src/deployment.ts
index 1f02ede9f..3f7669acc 100644
--- a/packages/cli/src/deployment.ts
+++ b/packages/cli/src/deployment.ts
@@ -36,22 +36,16 @@ import {
ExecutableScript,
isHexString,
isDevnet,
- TraceableError
+ TraceableError,
+ DeployContractExecutionResult,
+ RunScriptResult,
+ ExecutionResult
} from '@alephium/web3'
import { PrivateKeyWallet } from '@alephium/web3-wallet'
import path from 'path'
import fs, { promises as fsPromises } from 'fs'
import * as cryptojs from 'crypto-js'
-import {
- DeployContractExecutionResult,
- RunScriptResult,
- Network,
- Deployer,
- DeployFunction,
- Configuration,
- ExecutionResult,
- DEFAULT_CONFIGURATION_VALUES
-} from './types'
+import { Network, Deployer, DeployFunction, Configuration, DEFAULT_CONFIGURATION_VALUES } from './types'
import {
getConfigFile,
getDeploymentFilePath,
diff --git a/packages/cli/src/types.ts b/packages/cli/src/types.ts
index b2fa8fc6e..882485bde 100644
--- a/packages/cli/src/types.ts
+++ b/packages/cli/src/types.ts
@@ -30,7 +30,9 @@ import {
web3,
DEFAULT_COMPILER_OPTIONS,
NetworkId,
- ContractInstance
+ ContractInstance,
+ DeployContractExecutionResult,
+ RunScriptResult
} from '@alephium/web3'
import { getConfigFile, loadConfig } from './utils'
import { Project } from './project'
@@ -104,27 +106,6 @@ export function getEnv(configFileName?: string, networkId?:
}
}
-export interface ExecutionResult {
- txId: string
- unsignedTx: string
- signature: string
- gasAmount: number
- gasPrice: string
- blockHash: string
- codeHash: string
- attoAlphAmount?: string
- tokens?: Record
-}
-
-export interface DeployContractExecutionResult extends ExecutionResult {
- contractInstance: I
- issueTokenAmount?: string
-}
-
-export interface RunScriptResult extends ExecutionResult {
- groupIndex: number
-}
-
export interface Deployer {
provider: NodeProvider
account: Account
diff --git a/packages/web3/src/contract/deployment.ts b/packages/web3/src/contract/deployment.ts
new file mode 100644
index 000000000..88cd63134
--- /dev/null
+++ b/packages/web3/src/contract/deployment.ts
@@ -0,0 +1,40 @@
+/*
+Copyright 2018 - 2022 The Alephium Authors
+This file is part of the alephium project.
+
+The library is free software: you can redistribute it and/or modify
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+The library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public License
+along with the library. If not, see .
+*/
+
+import { ContractInstance } from './contract'
+
+export interface ExecutionResult {
+ txId: string
+ unsignedTx: string
+ signature: string
+ gasAmount: number
+ gasPrice: string
+ blockHash: string
+ codeHash: string
+ attoAlphAmount?: string
+ tokens?: Record
+}
+
+export interface DeployContractExecutionResult extends ExecutionResult {
+ contractInstance: I
+ issueTokenAmount?: string
+}
+
+export interface RunScriptResult extends ExecutionResult {
+ groupIndex: number
+}
diff --git a/packages/web3/src/contract/index.ts b/packages/web3/src/contract/index.ts
index 270cd6db3..65618310c 100644
--- a/packages/web3/src/contract/index.ts
+++ b/packages/web3/src/contract/index.ts
@@ -20,3 +20,4 @@ export * from './ralph'
export * from './contract'
export * from './events'
export * from './script-simulator'
+export * from './deployment'