Open telezhnaya opened 2 years ago
The same implementation works fine with all the other contracts:
1.contract.portalbridge.near
2.contract.portalbridge.near
3.contract.portalbridge.near
4.contract.portalbridge.near
6ebee61d68652fba1212afde0a7b6c8904d43f8b0c4cc337b2ece68b3bdf4a2a
9b204442fe63137a47930b78976c4f1a7c34d555e46fb51f614d0801520cac01
ato.tkn.near
aurora
aurora.tkn.near
avb.tkn.near
baby.tkn.near
beer.tkn.near
bones.tkn.near
boo.tkn.near
cart.tkn.near
cb.tkn.near
cdcode02.near
cdot.tkn.near
cheems.tkn.near
chromeknightsft.near
coin.asac.near
cointiva.tamada.near
confuzed.tkn.near
cont.tkn.near
convtest.near
craftingrusd.near
dacha.tkn.near
damn.tkn.near
dao.tkn.near
dcity.tkn.near
duck.tkn.near
elt.tkn.near
embr.playember_reserve.near
far.tkn.near
finarix.near
firerune.tkn.near
first.tkn.near
fradao.tkn.near
fritz.tkn.near
ft.metafoxonry.near
ft.nekotoken.near
ft.purefi_main.near
ftv2.nekotoken.near
fx.tkn.near
gear.enleap.near
gld.tkn.near
golddigger.tkn.near
gold.tkn.near
groove.tkn.near
gza.tkn.near
hak.tkn.near
haloutc.near
hbsc.tkn.near
hrt.tkn.near
hype.tkn.near
ikenga.tkn.near
illiapolosukhin.tkn.near
infinity.tkn.near
inspira.near
ixtm.near
kkd.tkn.near
kongztoken.near
kotya.tkn.near
kpr.tkn.near
ktch.tkn.near
lgbt.tkn.near
linear-protocol.near
lolcoin.qbit.near
loom.tkn.near
magic.tkn.near
marmaj.tkn.near
mbga.tkn.near
meritocracy.tkn.near
metrop.near
mike.tkn.near
mrktng.tkn.near
mvp.tkn.near
nb.tkn.near
nd.tkn.near
nearbit.tkn.near
neardog.tkn.near
near_flip.near
nearkat.tkn.near
nearnft.tkn.near
nearpunk.tkn.near
near_starter_index_token.near
near_starter_token.near
neir.tkn.near
nexp.near
nftm.tkn.near
nk.tkn.near
nmeme.tkn.near
np.tkn.near
ns.tkn.near
nut.tkn.near
otdai.tkn.near
pa.tkn.near
peter.tkn.near
play.tkn.near
poketa.tkn.near
purrr.tkn.near
pw.tkn.near
rekt.tkn.near
rimjob.tkn.near
rocketbois-reward.near
rocket-staking.near
rustyore.tkn.near
rvndl.tkn.near
ser.tkn.near
shit.tkn.near
skilltoken.allskills.near
snap.tkn.near
socialmeet.tkn.near
soultoken.near
taliban.tkn.near
tao.tkn.near
testing.tkn.near
test.sweat
tia-token.theiadev.near
timur.tkn.near
tkn_artfans.near
toes.tkn.near
token.cryptoblessing.near
token.elcafecartel.near
token.paras.near
token.pembrock.near
token.skyward.near
token.stlb.near
token.sweat
tsoy.tkn.near
ukc.tkn.near
usd.tkn.near
usdt.tether-token.near
usn
utopia.secretskelliessociety.near
vow_token.near
whuffie.tkn.near
wnear-at-120-0.wentokensir.near
wnear-at-150-0.wentokensir.near
wnear-at-40-0.wentokensir.near
wnear-at-80-0.wentokensir.near
wrap.near
xxx.tkn.near
ynp.tkn.near
@telezhnaya What is the error you observe when you try parsing the metadata? Their metadata looks fine to me:
$ near-cli-rs contract call-function as-read-only c944e90c64b2c07662a292be6244bdf05cda44a7.factory.bridge.near ft_metadata json-args {} network-config mainnet now
{
"decimals": 18,
"icon": null,
"name": "Graph Token",
"reference": "",
"reference_hash": "",
"spec": "ft-1.0.0",
"symbol": "GRT"
}
@frol We can't deserialise it with serde
Serialization failure: Error(\"invalid type: string \\\"\\\", expected a sequence\", line: 1, column: 2082)",
I also tried to deserialise it with Borsh, I get
Err(
Custom {
kind: InvalidInput,
error: "Unexpected length of input",
},
)
That's for 0316eb71485b0ab14103307bf65a021042c6d380.factory.bridge.near
, I took the first from the list
They have reference_hash with an empty string inside, that's why we have the issue, we require it to be valid Base64VecU8 I know how to fix that
@telezhnaya Your Base64VecU8
type misses proper serialization/deserialization implementation, see #[serde(with = "base64_bytes")]
in near-sdk-rs:
https://docs.rs/near-sdk/latest/src/near_sdk/json_types/vector.rs.html#6
These contracts are fine, it is a bug in this project.
I decided just to get rid of Base64VecU8 restriction, it's not even a part of NEP, so empty string is a valid string and all bridged contracts are now parsed successfully It's fixed in a branch, I'll merge it one day
@telezhnaya Can you reference the commit here just for future reference?
I'll surely do when I merge it, I'll anyway finalise it in the next 1-2 weeks Now it's here https://github.com/near/near-enhanced-api-server/commit/c9586bac47e42321efc93d52c654003bc680cb97
We can't parse FT metadata for
They do not follow NEP format https://nomicon.io/Standards/Tokens/FungibleToken/Metadata https://github.com/near/near-enhanced-api-server/blob/main/src/modules/coin/data_provider/metadata.rs#L21