New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@intercoin/control

Package Overview
Dependencies
Maintainers
0
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@intercoin/control

Smart contract providing the collectively way to manage by calling any method from external contract

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
0
Created
Source

ControlContract

Lets a community collectively manage a wallet and tokens by calliing any method from external contract

Deploy

when deploy it is no need to pass parameters in to constructor,
but need to run method init immediately after deploy

Once installed will be use methods:

method namecalled bydescription
initanyoneshould be executed by the creator immediately after deployment. can be executed only the one time
addMethodownersetup method, fraction, minimum and roles to invoke/endorse
invokemember who can invoke (see allowInvoke)initiating transaction
endorsemember who can endorse (see allowEndorse)endorsing transaction

Methods

init

should be executed by creator immediately after deploy. can be executed only the one time

Params:

nametypedescription
communityAddraddressaddress of community contract
GroupRolesSetting[]tuplearray of groups. Each group should contain
two roles: who can invoke and who can endorse.
[[invokeRoleGroup1,endorseRoleGroup1], ...]

invoke

method will initiate a creation transaction. return invokeID - invoke identificator and invokeIDWei - value in wei that can be send to contract directly to endorse
Params:

nametypedescription
contractAddressaddressaddress of external token
methodhexadecimal stringmethod of external token that would be executed
paramshexadecimal stringparams of external token's method

endorse

endorsed transaction by invokeID
Params:

nametypedescription
invokeIDuint256invoke identificator

addMethod

allow participant with invokeRoleName/endorseRoleName to invoke/endorse transaction with method of contractAddress
Note that attemptштп add method with different fraction/minimum will revert. so can be added only one time. But roles can be added it any time, just add the same fraction/minimum Params:

nametypedescription
contractAddressaddressaddress of external token
methodhexadecimal stringmethod of external token that would be executed
invokeRoleNamestringinvoke role name
endorseRoleNamestringendorse role name
minimumuint256minimum
fractionuint256fraction value mul by 1e10

Events

OperationInvoked

happens while calling method invoke Params:

nametypedescription
invokeIDuint256invokeID
invokeIDWeiuint40invokeIDWei
contractAddressaddresstoken's address
methodhexadecimal stringmethod of external token that would be executed
paramshexadecimal stringmethod's params

OperationEndorsed

happens while calling method endorse or sending eth directly to contract Params:

nametypedescription
invokeIDuint256invokeID
invokeIDWeiuint40invokeIDWei

OperationExecuted

happens when transaction should be executed Params:

nametypedescription
invokeIDuint256invokeID
invokeIDWeiuint40invokeIDWei

HeartBeat

happens when active group do smth Params:

nametypedescription
groupIndexuint256group's index that has been active now
timeuint256timestamp in GMT time

CurrentGroupIndexChanged

happens when group regained ownership Params:

nametypedescription
fromuint256group index of old owner
touint256group index of new owner
timeuint256timestamp in GMT time

Contracts MD

ControlContract.md
ControlContract.md

FAQs

Package last updated on 11 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts