You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the documentation it says that for migration reasons all coins automatically have a paired_metadata counterpart, but AptosCoin type doesnt seem to have one when 0x1::coin::paired_metadata is called.
use aptos_framework::aptos_coin::AptosCoin;#[test]
fun test_paired_metadata_for_apt(){assert!(option::is_some(&coin::paired_metadata<AptosCoin>()), 1);}
Stack trace/error message
┌── test_paired_metadata_for_apt ──────
│ error[E11001]: test failure
│ ┌─ /sources/deployer.move:160:9
│ │
│ 159 │ fun test_paired_metadata_for_apt(){
│ │ ---------------------------- In this function in <addr>::deployer
│ 160 │ assert!(option::is_some(&coin::paired_metadata<AptosCoin>()), 0);
│ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Test was not expected to error, but it aborted with code 0 originating in the module <addr>::deployer rooted here
Expected Behavior
The assert shouldn't fail and instead of being empty, the option should have the paired metadata of the AptosCoin.
System information
Please complete the following information:
Aptos 3.5.0
Move
PopOS!
The text was updated successfully, but these errors were encountered:
This function should create fungible_asset in the coin_conversion_table and may resolve this issue the only problem is that, I can't do it in my smart contract as it requires aptos_framework (0x1) as a signer...
Calling this function in the init_module function in the aptos_coin module should virtually solve this problem
🐛 Bug
According to the documentation it says that for migration reasons all coins automatically have a paired_metadata counterpart, but AptosCoin type doesnt seem to have one when 0x1::coin::paired_metadata is called.
https://aptos.dev/en/build/smart-contracts/fungible-asset
To reproduce
Code snippet to reproduce
Stack trace/error message
Expected Behavior
The assert shouldn't fail and instead of being empty, the option should have the paired metadata of the AptosCoin.
System information
Please complete the following information:
The text was updated successfully, but these errors were encountered: