Skip to content

Commit ad93b3d

Browse files
authored
Merge pull request #68 from TacBuild/fix/gtac-erc20-precompile-address
fix: gTAC ERC20 precompile init on local
2 parents a1c140d + ca9b994 commit ad93b3d

1 file changed

Lines changed: 25 additions & 3 deletions

File tree

contrib/localnet/init.sh

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ sed -i.bak "s/cors_allowed_origins = \[\]/cors_allowed_origins = \[\"*\"\]/g" $H
227227
sed -i.bak "s/\"slash_fraction_downtime\": \"0.010000000000000000\"/\"slash_fraction_downtime\": \"$SLASH_DOWNTIME_PENALTY\"/g" $HOMEDIR/config/genesis.json
228228
sed -i.bak "s/\"signed_blocks_window\": \"100\"/\"signed_blocks_window\": \"$SLASH_SIGNED_BLOCKS_WINDOW\"/g" $HOMEDIR/config/genesis.json
229229

230-
# add token metadata
230+
# add token metadata (TAC + gTAC)
231231
jq '
232232
.app_state.bank.denom_metadata = [
233233
{
@@ -250,22 +250,44 @@ jq '
250250
"symbol": "TAC",
251251
"uri": "",
252252
"uri_hash": ""
253+
},
254+
{
255+
"description": "Liquid Staked TAC token",
256+
"denom_units": [
257+
{
258+
"denom": "stk/utac",
259+
"exponent": 0,
260+
"aliases": []
261+
},
262+
{
263+
"denom": "gTAC",
264+
"exponent": 18,
265+
"aliases": []
266+
}
267+
],
268+
"base": "stk/utac",
269+
"display": "gTAC",
270+
"name": "Gravity TAC",
271+
"symbol": "gTAC",
272+
"uri": "",
273+
"uri_hash": ""
253274
}
254275
]
255276
' $HOMEDIR/config/genesis.json > $HOMEDIR/config/genesis_patched.json && mv $HOMEDIR/config/genesis_patched.json $HOMEDIR/config/genesis.json
256277

278+
# gTAC ERC20 precompile address: keccak256("stk/utac") -> 0xa29260a07Ec319176A49f2710433F647E49B604f
257279
jq '
258280
.app_state.erc20 = {
259281
"params": {
260282
"enable_erc20": true,
261283
"native_precompiles": [
262-
"0xD4949664cD82660AaE99bEdc034a0deA8A0bd517"
284+
"0xa29260a07Ec319176A49f2710433F647E49B604f"
263285
],
264286
"dynamic_precompiles": []
265287
},
266288
"token_pairs": [
267289
{
268-
"erc20_address": "0xD4949664cD82660AaE99bEdc034a0deA8A0bd517",
290+
"erc20_address": "0xa29260a07Ec319176A49f2710433F647E49B604f",
269291
"denom": "stk/utac",
270292
"enabled": true,
271293
"contract_owner": "OWNER_MODULE"

0 commit comments

Comments
 (0)