genlayer-js 0.4.4 → 0.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/index.cjs +4 -4
- package/dist/index.js +4 -4
- package/package.json +1 -1
- package/src/contracts/actions.ts +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
+
## 0.4.5 (2024-12-02)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* set leaderOnly parameter camelCase ([#35](https://github.com/yeagerai/genlayer-js/issues/35)) ([a6a4cae](https://github.com/yeagerai/genlayer-js/commit/a6a4caed8ab2784c2de202e34429c68eeeb0482d))
|
|
9
|
+
|
|
3
10
|
## 0.4.4 (2024-11-28)
|
|
4
11
|
|
|
5
12
|
## 0.4.3 (2024-11-26)
|
package/dist/index.cjs
CHANGED
|
@@ -222,8 +222,8 @@ var overrideContractActions = (client) => {
|
|
|
222
222
|
return result;
|
|
223
223
|
};
|
|
224
224
|
client.writeContract = async (args) => {
|
|
225
|
-
const { account, address, functionName, args: params, value = 0n,
|
|
226
|
-
const data = [encode({ method: functionName, args: params }),
|
|
225
|
+
const { account, address, functionName, args: params, value = 0n, leaderOnly = false } = args;
|
|
226
|
+
const data = [encode({ method: functionName, args: params }), leaderOnly];
|
|
227
227
|
const serializedData = serialize(data);
|
|
228
228
|
const senderAccount = account || client.account;
|
|
229
229
|
if (!senderAccount) {
|
|
@@ -249,8 +249,8 @@ var overrideContractActions = (client) => {
|
|
|
249
249
|
return result;
|
|
250
250
|
};
|
|
251
251
|
client.deployContract = async (args) => {
|
|
252
|
-
const { account, code, args: constructorArgs,
|
|
253
|
-
const data = [code, encode({ args: constructorArgs }),
|
|
252
|
+
const { account, code, args: constructorArgs, leaderOnly = false } = args;
|
|
253
|
+
const data = [code, encode({ args: constructorArgs }), leaderOnly];
|
|
254
254
|
const serializedData = serialize(data);
|
|
255
255
|
const senderAccount = account || client.account;
|
|
256
256
|
if (!senderAccount) {
|
package/dist/index.js
CHANGED
|
@@ -222,8 +222,8 @@ var overrideContractActions = (client) => {
|
|
|
222
222
|
return result;
|
|
223
223
|
};
|
|
224
224
|
client.writeContract = async (args) => {
|
|
225
|
-
const { account, address, functionName, args: params, value = 0n,
|
|
226
|
-
const data = [encode({ method: functionName, args: params }),
|
|
225
|
+
const { account, address, functionName, args: params, value = 0n, leaderOnly = false } = args;
|
|
226
|
+
const data = [encode({ method: functionName, args: params }), leaderOnly];
|
|
227
227
|
const serializedData = serialize(data);
|
|
228
228
|
const senderAccount = account || client.account;
|
|
229
229
|
if (!senderAccount) {
|
|
@@ -249,8 +249,8 @@ var overrideContractActions = (client) => {
|
|
|
249
249
|
return result;
|
|
250
250
|
};
|
|
251
251
|
client.deployContract = async (args) => {
|
|
252
|
-
const { account, code, args: constructorArgs,
|
|
253
|
-
const data = [code, encode({ args: constructorArgs }),
|
|
252
|
+
const { account, code, args: constructorArgs, leaderOnly = false } = args;
|
|
253
|
+
const data = [code, encode({ args: constructorArgs }), leaderOnly];
|
|
254
254
|
const serializedData = serialize(data);
|
|
255
255
|
const senderAccount = account || client.account;
|
|
256
256
|
if (!senderAccount) {
|
package/package.json
CHANGED
package/src/contracts/actions.ts
CHANGED
|
@@ -48,10 +48,10 @@ export const overrideContractActions = (client: GenLayerClient<SimulatorChain>)
|
|
|
48
48
|
functionName: string;
|
|
49
49
|
args: CalldataEncodable[];
|
|
50
50
|
value: bigint;
|
|
51
|
-
|
|
51
|
+
leaderOnly?: boolean;
|
|
52
52
|
}): Promise<`0x${string}`> => {
|
|
53
|
-
const {account, address, functionName, args: params, value = 0n,
|
|
54
|
-
const data = [encode({method: functionName, args: params}),
|
|
53
|
+
const {account, address, functionName, args: params, value = 0n, leaderOnly = false} = args;
|
|
54
|
+
const data = [encode({method: functionName, args: params}), leaderOnly];
|
|
55
55
|
const serializedData = serialize(data);
|
|
56
56
|
|
|
57
57
|
const senderAccount = account || client.account;
|
|
@@ -85,10 +85,10 @@ export const overrideContractActions = (client: GenLayerClient<SimulatorChain>)
|
|
|
85
85
|
account?: Account;
|
|
86
86
|
code: string;
|
|
87
87
|
args: CalldataEncodable[];
|
|
88
|
-
|
|
88
|
+
leaderOnly?: boolean;
|
|
89
89
|
}) => {
|
|
90
|
-
const {account, code, args: constructorArgs,
|
|
91
|
-
const data = [code, encode({args: constructorArgs}),
|
|
90
|
+
const {account, code, args: constructorArgs, leaderOnly = false} = args;
|
|
91
|
+
const data = [code, encode({args: constructorArgs}), leaderOnly];
|
|
92
92
|
const serializedData = serialize(data);
|
|
93
93
|
|
|
94
94
|
const senderAccount = account || client.account;
|