---
# System prepended metadata

title: update account metadata

---

# update account metadata

code: https://github.com/daoka/fushicho-samples/blob/master/src/metadata/updateAccountMetadata.ts

## First assign

key: icon
value: http://placehold.jp/150x150.png

### Transaction

https://fushicho.opening-line.jp:3001/transaction/29991DA330D82532881898AEEF78CB0E95397E453D3A2A74E4C4DB6E06362ADD

### get account metadata

https://fushicho.opening-line.jp:3001/metadata/account/9B97C0394662E7C37473F273FC04D1B7E78F6C4BD998E6D99D5033522CC043CE

```json
{
	"metadataEntries": [{
		"metadataEntry": {
			"compositeHash": "9BC2E907DE294DA246CD376B92C20B37A04E5B09081E3642079EC627F65F84E6",
			"senderPublicKey": "9B97C0394662E7C37473F273FC04D1B7E78F6C4BD998E6D99D5033522CC043CE",
			"targetPublicKey": "9B97C0394662E7C37473F273FC04D1B7E78F6C4BD998E6D99D5033522CC043CE",
			"scopedMetadataKey": "D1AF63DB37DCB9C1",
			"targetId": "0000000000000000",
			"metadataType": 0,
			"valueSize": 31,
			"value": "687474703A2F2F706C616365686F6C642E6A702F313530783135302E706E67"
		},
		"id": "5DA9CDB9EC3900D3E7A65221"
	}]
}
```

## Update1

key: icon
expect value: http://placehold.jp/120x120.png

### transaction

https://fushicho.opening-line.jp:3001/transaction/6FF570B5DA821C2C485A29B988D1DA6037701D6F3B81B8C02ACCFC7B0EA819A7

### get account metadata

```json 
{
	"metadataEntries": [{
		"metadataEntry": {
			"compositeHash": "9BC2E907DE294DA246CD376B92C20B37A04E5B09081E3642079EC627F65F84E6",
			"senderPublicKey": "9B97C0394662E7C37473F273FC04D1B7E78F6C4BD998E6D99D5033522CC043CE",
			"targetPublicKey": "9B97C0394662E7C37473F273FC04D1B7E78F6C4BD998E6D99D5033522CC043CE",
			"scopedMetadataKey": "D1AF63DB37DCB9C1",
			"targetId": "0000000000000000",
			"metadataType": 0,
			"valueSize": 31,
			"value": "00000000000000000000000000000000000000000007000000070000000000"
		},
		"id": "5DA9CDB9EC3900D3E7A65221"
	}]
}

```

## Update2

key: icon
expect value: http://placehold.jp/100x100.png

### transaction

https://fushicho.opening-line.jp:3001/transaction/E972A07873169A2BC5A553046DCF1B97C0C40B6035154D202D72E09DC9C52EA5


### get account metadata


expected value is `http://placehold.jp/100x100.png` but result is `http://placehold.jp/170x170.png`??

```json

{
	"metadataEntries": [{
		"metadataEntry": {
			"compositeHash": "9BC2E907DE294DA246CD376B92C20B37A04E5B09081E3642079EC627F65F84E6",
			"senderPublicKey": "9B97C0394662E7C37473F273FC04D1B7E78F6C4BD998E6D99D5033522CC043CE",
			"targetPublicKey": "9B97C0394662E7C37473F273FC04D1B7E78F6C4BD998E6D99D5033522CC043CE",
			"scopedMetadataKey": "D1AF63DB37DCB9C1",
			"targetId": "0000000000000000",
			"metadataType": 0,
			"valueSize": 31,
			"value": "687474703A2F2F706C616365686F6C642E6A702F313730783137302E706E67"
		},
		"id": "5DA9CDB9EC3900D3E7A65221"
	}]
}
```

## update3

key: icon
expect value: http://placehold.jp/200x200.png

### transaction

https://fushicho.opening-line.jp:3001/transaction/41AC8CB14293D504646482BEEB8FD7DC353C5A09CD831696C7EE1D3EDEC618D3


### get account metadata

```json
{
	"metadataEntries": [{
		"metadataEntry": {
			"compositeHash": "9BC2E907DE294DA246CD376B92C20B37A04E5B09081E3642079EC627F65F84E6",
			"senderPublicKey": "9B97C0394662E7C37473F273FC04D1B7E78F6C4BD998E6D99D5033522CC043CE",
			"targetPublicKey": "9B97C0394662E7C37473F273FC04D1B7E78F6C4BD998E6D99D5033522CC043CE",
			"scopedMetadataKey": "D1AF63DB37DCB9C1",
			"targetId": "0000000000000000",
			"metadataType": 0,
			"valueSize": 31,
			"value": "00000000000000000000000000000000000000000307000003070000000000"
		},
		"id": "5DA9CDB9EC3900D3E7A65221"
	}]
}
```

## update4

key: icon
expect value: http://placehold.jp/300x300.png

### transaction

https://fushicho.opening-line.jp:3001/transaction/A0866CC604F11F1A06802BA15EBE496795264D258973830FDF898C6520CF1D3C

### get account metadata

expected value is `http://placehold.jp/300x300.png` but result is `http://placehold.jp/070x070.png`??


```json
{
	"metadataEntries": [{
		"metadataEntry": {
			"compositeHash": "9BC2E907DE294DA246CD376B92C20B37A04E5B09081E3642079EC627F65F84E6",
			"senderPublicKey": "9B97C0394662E7C37473F273FC04D1B7E78F6C4BD998E6D99D5033522CC043CE",
			"targetPublicKey": "9B97C0394662E7C37473F273FC04D1B7E78F6C4BD998E6D99D5033522CC043CE",
			"scopedMetadataKey": "D1AF63DB37DCB9C1",
			"targetId": "0000000000000000",
			"metadataType": 0,
			"valueSize": 31,
			"value": "687474703A2F2F706C616365686F6C642E6A702F303730783037302E706E67"
		},
		"id": "5DA9CDB9EC3900D3E7A65221"
	}]
}
```
