Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ft metadata #53

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
Draft

Update ft metadata #53

wants to merge 12 commits into from

Conversation

0x3bfc
Copy link
Contributor

@0x3bfc 0x3bfc commented Jul 2, 2021

closes #48

@0x3bfc 0x3bfc changed the title Update ft metadata [WIP] Update ft metadata Jul 21, 2021
@0x3bfc 0x3bfc marked this pull request as ready for review July 22, 2021 09:06
@0x3bfc 0x3bfc requested a review from paouvrard as a code owner July 22, 2021 09:06
@0x3bfc 0x3bfc requested a review from mfornet July 22, 2021 09:06
Copy link
Member

@paouvrard paouvrard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@0x3bfc I'm really sorry about the delay. The main branch refactor for v2 is now merged, so you can rebase your changes.
I think we should try to keep @near-eth/utils functional so that it doesn't depend on the state of other packages like @near/client

@@ -0,0 +1,32 @@
import { ethers } from 'ethers'
import { getMetadata } from '@near-eth/nep141-erc20/dist/natural-erc20'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should try to avoid making connector packages a dependency of @near-eth/utils to avoid the circular import.
For flexibility, the api of updateFungibleTokenMetadata can take a provider, nearAccount and metadata values as argument so that it can be used independently of @near-eth/client.

@@ -29,10 +30,17 @@ export function setEthProvider (provider: any): any {
return ethProvider
}

export function getAuroraProvider (): any {
auroraJsonRpcProvider = () => new ethers.providers.JsonRpcProvider({
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are removing process.env from the library. getAuroraProvider should return the provider which was set by setAuroraProvider.

@0x3bfc 0x3bfc changed the base branch from fix/user-get-balance to main August 13, 2021 09:21
@0x3bfc
Copy link
Contributor Author

0x3bfc commented Aug 13, 2021

@0x3bfc I'm really sorry about the delay. The main branch refactor for v2 is now merged, so you can rebase your changes.
I think we should try to keep @near-eth/utils functional so that it doesn't depend on the state of other packages like @near/client

Thanks for the review ... I've rebased the PR and will fix the conflicts and your comments.

@mfornet
Copy link
Contributor

mfornet commented Aug 26, 2021

@0x3bfc can you address conflicts and Pierre comments to merge this PR. I plan to use it for bridge-cli

@paouvrard paouvrard marked this pull request as draft June 22, 2022 05:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create function to update metadata in FT contracts
3 participants