Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Module System for Smart Contract and Frontend Integration #5

Open
behaviary opened this issue Feb 24, 2020 · 2 comments
Open

Module System for Smart Contract and Frontend Integration #5

behaviary opened this issue Feb 24, 2020 · 2 comments

Comments

@behaviary
Copy link

Where the contract is init, we should have a mapping.

With this, the frontend API can stay the same no matter what. Long term, this mapping will be part of smart contract meta data.

@NEARModule({
   methods: ['say_hi', 'getHi'],
   mappings: {
     'say_hi':'sayHi'
   }
})

Second benefit is that this is a place where you could actually pull in other contracts. This is the place where you would compose apps. I’ll write an NEP.

@chadoh
Copy link

chadoh commented Feb 26, 2020

Would it be worth making it possible to call a smart contract function using either snake_case or camelCase, regardless of how it was written? In which library would it make sense to implement such a lookup & conversion? Would this be part of near/NEPs#3?

Would that be simpler than your proposed module system, @potatodepaulo?

@behaviary
Copy link
Author

behaviary commented Feb 26, 2020 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants