Comments (2)
This would help. I have this hack in place now, I'm not sure if it will work..
For example:
struct transfer
from AccountName # may not be the message.sender if message.sender has delegated authority by from
to AccountName
amount UInt64
transfer inita initb 1
yields scope: ['inita', 'initb'], authorization: ['inita', ...]
given the following hack:
{// FIXME Hack, until an API call is available
const fields = Object.keys(definition.fields)
const f1 = fields[0]
if(definition.fields[f1] === 'AccountName') {
tx.scope.push(params[f1])
tx.messages[0].authorization.push({
account: params[f1],
permission: 'active'
})
}
if(fields.length > 1) {
const f2 = fields[1]
if(definition.fields[f2] === 'AccountName') {
tx.scope.push(params[f2])
}
}
}
Does not work with new account.. newacct probably should not be in the scope because it does not exist in the block that the newacct will execute in.
struct newaccount
creator AccountName
name AccountName
owner Authority
active Authority
recovery Authority
deposit Asset
yields scope: ['creator', 'newacct'], authorization: ['creator', ...]
So, I need the scope to be automated or done in an API call or I'll start adding these case by case to eosjs. Also, notice the authorizations is something we need too.
from eos.
OBE
from eos.
Related Issues (20)
- Signature verification for EOS account
- Logging In with QR code to pc with new account (greymass) HOT 1
- push_transaction无法发送交易 HOT 2
- [docs] explain that asserting in a contract is a bad thing to do
- Nodeos stuck and doesn't want to stop HOT 4
- ubuntu:~/eosio.cdt$ ./build.sh bash: ./build.sh: No such file or directory
- Makefile:140: recipe for target 'all' failed
- WASM is greater then 512 Kb and getting error in deploy unexpected end of JSON input last
- How to include multi_index.hpp HOT 3
- [Developer Preview] RocksDB Storage for DB and Key Value APIs ,what's the issue detail ? HOT 3
- Why is my local blockchain not requiring eosio.code permission when an inline action is executed? HOT 1
- Remove test consensus-validation-malicious-producers.py
- Handle failure case of db size being too small for snapshot more gracefully
- my local node can't produce block HOT 2
- Unable to broadcast the transaction to the mainnet HOT 1
- so let me get this straight the only possible way to use eos is if you can download cleos .. and cml -> and the only way you can get cleos is if your not on a window... HOT 2
- Ensure that you have created a wallet and have it open HOT 1
- Support for MacBook Pro with chip Apple M1 Pro running macOS Monterey HOT 1
- trying to create account with custom system account
- Why should wait 50ms before producing next block?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eos.