Skip to content

Commit

Permalink
remove max_coins field (#232)
Browse files Browse the repository at this point in the history
* remove max_coins field

* 1.17.0

* update version

---------

Co-authored-by: Ben <[email protected]>
  • Loading branch information
windushka and Ben-Rey authored May 24, 2023
1 parent b52c825 commit 85ad5c8
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 20 deletions.
4 changes: 2 additions & 2 deletions examples/smartContracts/contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"build": "run-s build:1 build:2"
},
"devDependencies": {
"@massalabs/as-types": "^0.0.3-dev",
"@massalabs/massa-as-sdk": "^2.0.2-dev",
"@massalabs/as-types": "^1.0.0",
"@massalabs/massa-as-sdk": "^2.1.0",
"assemblyscript": "^0.25.2",
"npm-run-all": "^4.1.5"
}
Expand Down
2 changes: 0 additions & 2 deletions examples/smartContracts/deployer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ export async function awaitTxConfirmation(
export const deploySmartContracts = async (
contractsToDeploy: ISCData[],
web3Client: Client,
maxCoins,
fee = 0n,
maxGas = 1_000_000n,
deployerAccount?: IAccount,
Expand Down Expand Up @@ -150,7 +149,6 @@ export const deploySmartContracts = async (
),
datastore,
fee,
maxCoins,
maxGas,
} as IContractData,
deployerAccount,
Expand Down
1 change: 0 additions & 1 deletion examples/smartContracts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ const pollAsyncEvents = async (
},
],
web3Client,
fromMAS(0.1),
0n,
1_000_000n,
deployerAccount,
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@massalabs/massa-web3",
"version": "1.16.1",
"version": "1.17.0",
"description": "massa's web3 sdk client",
"main": "dist/cmd/index.js",
"module": "dist/esm/index.js",
Expand Down Expand Up @@ -114,4 +114,4 @@
"utf-8-validate": "^6.0.2"
},
"prettier": "@massalabs/prettier-config-as"
}
}
4 changes: 0 additions & 4 deletions src/interfaces/IContractData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
* and an optional datastore for the smart contract's operational storage data.
*
* @see fee of type `bigint` represents the storage fee for the smart contract.
* @see maxCoins of type `bigint` represents maximum amount of coins allowed to be spent by the execution
* @see maxGas of type `bigint` represents the maximum gas that can be consumed by the smart contract.
* @see contractDataText of type `string | undefined` represents the contract's data as string (optional).
* @see contractDataBinary of type `Uint8Array | undefined` represents the contract's data as bytecode (optional).
Expand All @@ -17,9 +16,6 @@
*/
export interface IContractData {
fee: bigint;

maxCoins: bigint;

maxGas: bigint;
contractDataText?: string;
contractDataBinary?: Uint8Array;
Expand Down
7 changes: 0 additions & 7 deletions src/web3/BaseClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,11 +277,6 @@ export class BaseClient {
varintEncode((data as IContractData).maxGas),
);

// max coins amount
const maxCoinEncoded = Buffer.from(
varintEncode((data as IContractData).maxCoins),
);

// contract data
const contractDataEncoded = Buffer.from(scBinaryCode);
const dataLengthEncoded = Buffer.from(
Expand Down Expand Up @@ -319,7 +314,6 @@ export class BaseClient {
expirePeriodEncoded,
typeIdEncoded,
maxGasEncoded,
maxCoinEncoded,
dataLengthEncoded,
contractDataEncoded,
datastoreSerializedBufferLen,
Expand All @@ -331,7 +325,6 @@ export class BaseClient {
expirePeriodEncoded,
typeIdEncoded,
maxGasEncoded,
maxCoinEncoded,
dataLengthEncoded,
contractDataEncoded,
datastoreSerializedBufferLen,
Expand Down

0 comments on commit 85ad5c8

Please sign in to comment.