Skip to content

Commit 1ccbad0

Browse files
committed
v0.2.0 beta release
1 parent 796b386 commit 1ccbad0

File tree

8 files changed

+60
-7
lines changed

8 files changed

+60
-7
lines changed

packages/react/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @tokenbound/react
22

3+
## 0.1.1
4+
5+
### Patch Changes
6+
7+
- Fixed build issues
8+
39
## 0.1.0
410

511
### Minor Changes

packages/react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@tokenbound/react",
33
"private": true,
4-
"version": "0.1.0",
4+
"version": "0.1.1",
55
"type": "module",
66
"files": [
77
"dist"

packages/sdk-ethers/CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# @tokenbound/sdk-ethers
22

3+
## 0.2.0
4+
5+
### Minor Changes
6+
7+
- Added initialization call to createAccount
8+
9+
## 0.1.1
10+
11+
### Patch Changes
12+
13+
- Fixed build issues
14+
315
## 0.1.0
416

517
### Minor Changes

packages/sdk-ethers/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@tokenbound/sdk-ethers",
3-
"version": "0.1.0",
3+
"version": "0.2.0",
44
"type": "module",
55
"files": [
66
"dist"

packages/sdk-ethers/src/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,17 @@ export async function createAccount(
4747

4848
const { chainId } = await signer.provider.getNetwork();
4949

50+
const initData = new utils.Interface([
51+
"function initialize()",
52+
]).encodeFunctionData("initialize");
53+
5054
return registry.createAccount(
5155
erc6551AccountImplementationAddress,
5256
chainId,
5357
tokenContract,
5458
tokenId,
5559
0,
56-
"0x"
60+
initData
5761
);
5862
}
5963

packages/sdk/CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
# @tokenbound/sdk
22

3+
## 0.2.0
4+
5+
### Minor Changes
6+
7+
- Added initialization call to createAccount
8+
9+
## 0.1.2
10+
11+
### Patch Changes
12+
13+
- Fixed contract address issue
14+
15+
## 0.1.1
16+
17+
### Patch Changes
18+
19+
- Fixed build issues
20+
321
## 0.1.0
422

523
### Minor Changes

packages/sdk/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@tokenbound/sdk",
3-
"version": "0.1.0",
3+
"version": "0.2.0",
44
"type": "module",
55
"files": [
66
"dist"

packages/sdk/src/index.ts

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export async function getAccount(
2222
client: PublicClient
2323
): Promise<`0x${string}`> {
2424
const registry = getContract({
25-
address: "0x1472d0f5c6c151df96352ec271b8df1093370a7a",
25+
address: erc6551RegistryAddress,
2626
abi: erc6551RegistryAbi,
2727
publicClient: client,
2828
});
@@ -46,20 +46,33 @@ export async function createAccount(
4646
client: WalletClient
4747
) {
4848
const registry = getContract({
49-
address: "0x1472d0f5c6c151df96352ec271b8df1093370a7a",
49+
address: erc6551RegistryAddress,
5050
abi: erc6551RegistryAbi,
5151
walletClient: client,
5252
});
5353

5454
const chainId = await client.getChainId();
5555

56+
const initData = encodeFunctionData({
57+
abi: [
58+
{
59+
inputs: [],
60+
name: "initialize",
61+
outputs: [],
62+
stateMutability: "nonpayable",
63+
type: "function",
64+
},
65+
],
66+
functionName: "initialize",
67+
});
68+
5669
return registry.write.createAccount([
5770
erc6551AccountImplementationAddress,
5871
chainId,
5972
tokenContract,
6073
tokenId,
6174
0,
62-
"",
75+
initData,
6376
]);
6477
}
6578

0 commit comments

Comments
 (0)