MCPcopy Create free account
hub / github.com/PolymathNetwork/polymath-core / getSignGTMData

Function getSignGTMData

test/helpers/signData.js:120–148  ·  view source on GitHub ↗
(tmAddress, investorAddress, fromTime, toTime, expiryTime, validFrom, validTo, nonce, pk)

Source from the content-addressed store, hash-verified

118}
119
120function getSignGTMData(tmAddress, investorAddress, fromTime, toTime, expiryTime, validFrom, validTo, nonce, pk) {
121 let hash = web3.utils.soliditySha3({
122 t: 'address',
123 v: tmAddress
124 }, {
125 t: 'address',
126 v: investorAddress
127 }, {
128 t: 'uint256',
129 v: new BN(fromTime)
130 }, {
131 t: 'uint256',
132 v: new BN(toTime)
133 }, {
134 t: 'uint256',
135 v: new BN(expiryTime)
136 }, {
137 t: 'uint256',
138 v: new BN(validFrom)
139 }, {
140 t: 'uint256',
141 v: new BN(validTo)
142 }, {
143 t: 'uint256',
144 v: new BN(nonce)
145 });
146 let signature = (web3.eth.accounts.sign(hash, pk));
147 return signature.signature;
148}
149
150function getSignGTMTransferData(tmAddress, investorAddress, fromTime, toTime, expiryTime, validFrom, validTo, nonce, pk) {
151 let signature = getMultiSignGTMData(tmAddress, investorAddress, fromTime, toTime, expiryTime, validFrom, validTo, nonce, pk);

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected