#0
nonstandard
0.00004000 BSV
Q!PÐcßà2 ³î)¥äá´å«ruÒÌÁLïRdaBQ®MN{"__cls":"class ProviderList {\n constructor(owners, editors, title, country) {\n this.contractTypeID = \"7b0e3257-43c5-48cb-a830-e9b66fed9188\";\n this.contractTypeName = \"ProvidersList\";\n this.contractTypeVersion = \"0.0.1\";\n this._owners = owners;\n this.editors = editors;\n this.country = country;\n this.title = title;\n this.providers = [];\n }\n\n addProviders(callerPk, _providers) {\n if (!this._owners.includes(callerPk) && !this.editors.includes(callerPk)) {\n throw new Error(\"You do not have permission to add this provider.\");\n }\n _providers.forEach(p => {\n if (!this.providers.includes(p)) {\n this.providers.push(p);\n }\n });\n return \"Add Providers Executed Successfully.\";\n }\n\n addEditor(editorPk) {\n let response = \"\";\n if (!this.editors.includes(editorPk)) {\n this.editors.push(editorPk);\n response = \"success\";\n } else {\n throw new Error(\"The Public Key was already in the list. \");\n }\n return response;\n }\n\n removeEditor(editorPk) {\n let response = \"\";\n if (this.editors.includes(editorPk)) {\n let index = this.editors.indexOf(editorPk);\n this.editors.splice(index, 1);\n response = \"success\";\n } else {\n throw new Error(\"The Public Key was not lin the list.\");\n }\n return response;\n }\n}","__index":{"obj":0},"__args":[["035002d063dfe032a0b3ee29a5e4e1b404e587ab7275d2ccc14cef52646142171f"],["035002d063dfe032a0b3ee29a5e4e1b404e587ab7275d2ccc14cef52646142171f"],"4thTimesACharm","USA"],"__func":"constructor"}u
https://whatsonchain.com/tx/c545f7cc40252bdb247929da4ac2b18d70ea9288a683ec5cc0e1df35f716875e